My inebriety
This function returns the logged-in character's current level of drunkenness as an int. This information, combined with the character's inebriety_limit(), is vital for any script which intends to drink for the character, but without overdrinking.
An example:
if(inebriety_limit() - my_inebriety() < 5) {
int advisable = inebriety_limit() - my_inebriety() - 1;
drink(advisable,$item[Ram's Face Lager]);
}