Get inventory
Revision as of 18:18, 31 March 2010 by imported>Slyz
Function Syntax
int [item] get_inventory()
Returns a map where each key is an item in your inventory, with the integer value its quantity.
Simple Example
This example puts one of each item of your inventory in your closet if you have more than 5:
int[item] inventory = get_inventory() ;
foreach it in inventory
if ( inventory[it] > 5 )
put_closet( 1, it ) ;