Inebriety limit: Difference between revisions
Jump to navigation
Jump to search
imported>Zarqon m more links |
imported>StDoodle mNo edit summary |
||
Line 1: | Line 1: | ||
{{#vardefine:name|inebriety_limit}} | |||
{{#vardefine:return_type|int}} | |||
{{FunctionPage| | |||
name={{#var:name}}| | |||
function_category=Your Character| | |||
function1={{Function| | |||
name={{#var:name}}| | |||
aggregate={{#var:aggregate}}| | |||
return_type={{#var:return_type}}| | |||
return_also={{#var:return_also}}| | |||
}}| | |||
<code> | function_description=Returns the maximum safe drunkenness of a character before becoming falling-down drunk.</p> | ||
<p>For characters without Liver of Steel, this value is 14. With Liver of Steel, the value is 19.| | |||
while ( | code1={{CodeSample| | ||
title=Code Sample| | |||
description=This example drinks you silly on St. Sneaky Pete's Day:| | |||
code= | |||
<syntaxhighlight> | |||
void get_sneaky() { | |||
item favored_drink = $item[grogtini]; | |||
while (my_inebriety() < inebriety_limit()) { | |||
overdrink(1 , favored_drink); | |||
} | } | ||
int cirrosis = inebriety_limit() + 10 - my_inebriety(); | |||
overdrink(cirrosis , $item[green beer]); | |||
if ( | if (inebriety_limit() < 16) { | ||
print("Not... drunk... enough. Need... !... potion."); | |||
} | } | ||
} | |||
</ | </syntaxhighlight>}}| | ||
When not logged in, this function returns 14. | see_also={{SeeAlso|my_inebriety}}| | ||
special=When not logged in, this function returns 14. | |||
}} |
Revision as of 19:59, 28 February 2010
Function Syntax
int inebriety_limit()
Returns the maximum safe drunkenness of a character before becoming falling-down drunk.
For characters without Liver of Steel, this value is 14. With Liver of Steel, the value is 19.
Code Sample
This example drinks you silly on St. Sneaky Pete's Day:
void get_sneaky() {
item favored_drink = $item[grogtini];
while (my_inebriety() < inebriety_limit()) {
overdrink(1 , favored_drink);
}
int cirrosis = inebriety_limit() + 10 - my_inebriety();
overdrink(cirrosis , $item[green beer]);
if (inebriety_limit() < 16) {
print("Not... drunk... enough. Need... !... potion.");
}
}
See Also
Special
When not logged in, this function returns 14.