Difference between revisions of "Closet amount"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>StDoodle
m
Line 1: Line 1:
{{#vardefine:name|closet_amount}}
+
{{
{{#vardefine:return_type|int}}
+
#vardefine:name|closet_amount}}{{
 +
#vardefine:return_type|int}}{{
  
{{FunctionPage|
+
FunctionPage|
 
name={{#var:name}}|
 
name={{#var:name}}|
 
function_category=Item Management|
 
function_category=Item Management|

Revision as of 20:31, 8 March 2010

Function Syntax

int closet_amount(item it )

  • 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

if ((item_amount($item[filthy lucre]) + display_amount($item[filthy lucre]) + closet_amount($item[filthy lucre])) >= 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.