Difference between revisions of "Inebriety limit"

From Kolmafia
Jump to navigation Jump to search
imported>Metraxis
m (Spelling)
imported>Efilnikufecin
Line 18: Line 18:
 
  }  
 
  }  
 
</code>
 
</code>
 +
[[Category:Your Character | Inebriety limit()]]
 +
[[Category:Ash Functions |Inebriety limit()]]

Revision as of 13:05, 26 June 2007

int inebriety_limit()

This function returns the minimum drunkenness at which the logged-in character will become falling-down drink as an int. For characters without a Liver of Steel, this value will be 15. For those characters with a Liver of Steel, this value is 20.

An example:

void get_sneaky() {
  item FavoredDrink = $item[grogtini];
  while(my_inebriety() < inebriety_limit()) {
    drink(1,FavoredDrink);
  }
  int cirrosis = inebriety_limit() + 10 - my_inebriety();
  drink(cirrosis,$item[green beer]);
  if(inebriety_limit() < 16) {
    print("Not ... drunk ... enough.  Need ... ! ... potion");
  }
}