Closet amount: Difference between revisions
Jump to navigation
Jump to search
imported>Heeheehee m Some documentation and slight modifications to code. |
imported>Bale mNo edit summary |
||
Line 5: | Line 5: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 37: | Line 36: | ||
special=Returns 0 when not logged in. | special=Returns 0 when not logged in. | ||
}} | }} | ||
[[Category:Item Management]] |
Latest revision as of 21:45, 21 May 2010
Function Syntax
- it is the item to check
Returns the amount of a given item that is contained in your closet.
Sample Code
Checks if you have enough filthy lucre for Olfaction
item coin = $item[filthy lucre];
// Just to save some space later on.
if(!have_skill($skill[transcendent olfaction]) {
// This code will only fire if you don't have Olfaction yet.
if ((item_amount(coin) + display_amount(coin) + closet_amount(coin)) >= 200)
print( "Go get olfaction!" );
else print( "Keep going, you need more lucre!" );
}
See Also
display_amount() | equipped_amount() | item_amount() | shop_amount() | stash_amount() | storage_amount()
Special
Returns 0 when not logged in.