Difference between revisions of "My inebriety"

From Kolmafia
Jump to navigation Jump to search
imported>Metraxis
(New Page)
(No difference)

Revision as of 07:36, 23 January 2007

int 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]);
}