Closet amount: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>StDoodle
mNo edit summary
Line 22: Line 22:
code=
code=
<syntaxhighlight>
<syntaxhighlight>
void main(){
if( item_amount($item[filthy lucre]) + display_amount($item[filthy lucre]) + closet_amount($item[filthy lucre]) >= 200)
  if( item_amount($item[filthy lucre]) + display_amount($item[filthy lucre]) + closet_amount($item[filthy lucre]) > 200 ){ print( "Go get olfaction!" ) }
  print( "Go get olfaction!" ); else print( "Keep going, you need more lucre!" );
  else print( "Keep going, you need more lucre!" );
}
</syntaxhighlight>
</syntaxhighlight>
}}|
}}|

Revision as of 20:58, 1 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

item_amount() | display_amount()

Special

Returns 0 when not logged in.