My inebriety

From Kolmafia
Revision as of 07:36, 23 January 2007 by imported>Metraxis (New Page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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