Stills available: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>Bale
mNo edit summary
Line 5: Line 5:
FunctionPage|
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=Item Management|


function1={{Function|
function1={{Function|
Line 34: Line 33:
see_also={{SeeAlso|create|item_amount|print}}|
see_also={{SeeAlso|create|item_amount|print}}|
}}
}}
[[Category:Item Management]]

Revision as of 21:45, 21 May 2010

Function Syntax

int stills_available()

Returns the number of Nash Crosby's Still uses you have left for the day (0 if you don't have access).

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 Divne." , "red");
    }

See Also

create() | item_amount() | print()