Difference between revisions of "Closet amount"

From Kolmafia
Jump to navigation Jump to search
imported>Alhifar
(Created page with '{{#vardefine:name|closet_amount}} {{#vardefine:return_type|int}} {{FunctionPage| name={{#var:name}}| function_category=Item Management| function1={{Function| name={{#var:name}}…')
 
imported>Alhifar
m
Line 11: Line 11:
 
return_type={{#var:return_type}}|
 
return_type={{#var:return_type}}|
 
return_also={{#var:return_also}}|
 
return_also={{#var:return_also}}|
parameter1={{Param|item|checked}}|
+
parameter1={{Param|item|it}}|
p1desc=This is the item that will be checked for in the closet.|
+
p1desc={{Pspan|it}} is the item that will be checked for in the closet.|
 
}}|
 
}}|
  

Revision as of 18:08, 1 March 2010



Function Syntax

int closet_amount(item it )

  • it is the item that will be checked for in the closet.

Returns the amount of a given item that is contained in your closet.

Sample Code

Checks if you have enough filthy lucre for Olfaction

void main(){
   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

item_amount() | display_amount()

Special

Not logged in value: 0