Difference between revisions of "My inebriety"

From Kolmafia
Jump to navigation Jump to search
imported>Metraxis
(New Page)
 
imported>Efilnikufecin
Line 10: Line 10:
 
  }
 
  }
 
</code>
 
</code>
 +
[[Category:Your Character | My inebriety()]]
 +
[[Category:Ash Functions |My inebriety()]]

Revision as of 13:04, 26 June 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]);
}