Item Management

From Kolmafia
Revision as of 13:58, 6 April 2010 by imported>StDoodle (minor spacing issues)
Jump to navigation Jump to search

Informational

int my_meat()

Returns the amount of meat you have on hand.

int my_closet_meat()

Returns the amount of meat you have in your Colossal Closet.

int pulls_remaining()

Returns the number of pulls you can make from storage, or 0 if not applicable.

boolean have_chef()

Returns true if you have a chef-boxen at your campground.

boolean have_bartender()

Returns true if you have a bartender-boxen at your campground.

int [item] get_campground()

Returns a map of your campground items.

boolean have_mushroom_plot()

Returns true if and only if you've purchased a mushroom plot this run.

int stills_available()

Returns the number of Nash Crosby's Still uses left for the day (0 if not accessible).

int item_amount( item )

int closet_amount( item )

int display_amount( item )

int equipped_amount( item )

int shop_amount( item )

int stash_amount( item )

int storage_amount( item )

These 7 functions return the total number available of a given item in the respective section of your inventory.

int available_amount( item )

Returns the total number available of a given item in all inventory sections accessible to your character based on current restrictions.

int creatable_amount( item )

Returns the amount of the item that you are capable of creating given your current inventory and skills.

int [item] get_ingredients( item )

Returns a map where each key is one of the required ingredients, with the integer value the number required. If you don't have the skills needed to make the item, it will return an empty map.

int [item] get_inventory()

Returns a map where each key is an item in your inventory, with the integer value its quantity.

int [item] get_related( item, string )

Returns associated items in a zap or fold group (see page for details).

boolean is_tradeable( item )

Returns whether the item can be placed in the mall.

boolean is_giftable( item )

Returns whether the item can be traded in a gift package.

boolean have_display()

Returns whether you have a display case.

boolean is_displayable( item )

Returns whether the item can be put in a display case (true for all but quest items).

boolean is_npc_item( item )

Returns whether the item can be bought from an NPC store.

void refresh_stash()

Takes a new look at the contents of your clan stash, as that section of inventory cannot be internally tracked due to access by others.

boolean mall_price( item )

Returns the current (lowest) mall price of the given item.

int autosell_price( item )

Returns the autosell price of the item (0 for items that cannot be autosold).

string to_plural( item )

Returns the plural of an item as a string.

int meat_drop( [monster] )

Returns a certain monster's base meat drop.

int [item] item_drops( [monster] )

Returns an array of a certain monster's base item drops, keying item to drop rate. Has certain limitations detailed on individual page.

record [int] item_drops_array( [monster] )

Returns an array of records holding information regarding a certain monster's base item drops.


Moving Items Around

boolean put_closet( int, [item] )

boolean put_display( int, item )

boolean put_stash( int, item )

boolean take_closet( int, [item] )

boolean take_display( int, item )

boolean take_stash( int, item )

boolean take_storage( int, item )

Attempts to take or put the specified item in the appropriate section of your inventory, and returns its success.
If the item parameter is omitted from put_closet() or take_closet(), meat is transferred instead of an item.

boolean put_shop( int, int, [int], item )

Puts items in your store (see page for details).


Acquiring & Using Items

boolean retrieve_item( int, item )

Uses KoLmafia internal logic to gather items (see page for details).

boolean hermit( int, item )

Trades worthless items (adventuring in the sewer if needed) to the hermit for specified items (see page for details).

boolean use( int, item )

Attempts to use items as specified and reports success.

boolean eat( int, item )

Attempts to eat items as specified and reports success.

boolean drink( int, item )

Attempts to drink items as specified and reports success.

boolean create( int, item )

Attempts to create the specified items, following your KoLmafia settings regarding purchases to gather ingredients & require boxen.

boolean buy( int, item )

int buy( int, item, int )

Tries to purchase the specified items (see page for details).

boolean autosell( int, item )

Attempts to autosell the given items and reports success.

int craft( string, int, item, item )

Raw crafting that obeys KoLmafia settings (see page for details).