Stills available: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle Created page with '{{#vardefine:name|stills_available}} {{#vardefine:return_type|int}} {{FunctionPage| name={{#var:name}}| function_category=Item Management| function1={{Function| name={{#var:nam…' |
imported>Bale http://kolmafia.us/showthread.php?6433-stills_available()-returning-10-if-guild-is-still-locked |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{#vardefine:name|stills_available}} | {{ | ||
{{#vardefine:return_type|int}} | #vardefine:name|stills_available}}{{ | ||
#vardefine:return_type|int}}{{ | |||
FunctionPage| | |||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 13: | Line 13: | ||
}}| | }}| | ||
function_description=Returns the number of Nash Crosby's Still uses you have left for the day | function_description=Returns the number of Nash Crosby's Still uses you have left for the day. This is 0 if you are not a moxie class. If you are a moxie class, but have not opened the guild this returns 10.| | ||
code1={{CodeSample| | code1={{CodeSample| | ||
Line 27: | Line 27: | ||
create(1 , $item[Divine]); | create(1 , $item[Divine]); | ||
} else { | } else { | ||
print("You'd have to spend some meat to get a | print("You'd have to spend some meat to get a Divine." , "red"); | ||
} | } | ||
</syntaxhighlight>}}| | </syntaxhighlight>}}| | ||
Line 33: | Line 33: | ||
see_also={{SeeAlso|create|item_amount|print}}| | see_also={{SeeAlso|create|item_amount|print}}| | ||
}} | }} | ||
[[Category:Item Management]] |
Latest revision as of 04:43, 13 April 2011
Function Syntax
int stills_available()
Returns the number of Nash Crosby's Still uses you have left for the day. This is 0 if you are not a moxie class. If you are a moxie class, but have not opened the guild this returns 10.
Code Sample
This function attempts to create a Divine, or gives a warning if still uses aren't available.
if ((item_amount($item[orange]) > 0) &&
(item_amount($item[bottle of whiskey]) > 0) &&
(item_amount($item[bottle of whiskey]) > 0) &&
(item_amount($item[little paper umbrella]) > 0) &&
(stills_available() >= 2)) {
create(1 , $item[Divine]);
} else {
print("You'd have to spend some meat to get a Divine." , "red");
}