Item Management: Difference between revisions
imported>Bale empty_closet |
imported>Bale buy_using_storage |
||
Line 61: | Line 61: | ||
==Acquiring & Using Items== | ==Acquiring & Using Items== | ||
{{Flink|boolean|autosell|int|item|desc=Attempts to autosell the given items and reports success.}} | {{Flink|boolean|autosell|int|item|desc=Attempts to autosell the given items and reports success.}} | ||
{{Flink|boolean|buy|int|item}} | {{Flink|boolean|buy|{{opt|coinmaster}}|int|item}} | ||
{{Flink|int|buy|int|item|int|desc=Tries to purchase the specified items.}} | |||
{{Flink|boolean|buy_using_storage|int|item}} | |||
{{Flink|int|buy_using_storage|int|item|int|desc=Tries to purchase the specified items using meat in Hangks.}} | |||
{{Flink|boolean|create|int|item|desc=Attempts to create the specified items, following your KoLmafia settings regarding purchases to gather ingredients & require boxen.}} | {{Flink|boolean|create|int|item|desc=Attempts to create the specified items, following your KoLmafia settings regarding purchases to gather ingredients & require boxen.}} | ||
{{Flink|boolean|drink|int|item|desc=Attempts to drink items as specified and reports success.}} | {{Flink|boolean|drink|int|item|desc=Attempts to drink items as specified and reports success.}} | ||
Line 70: | Line 73: | ||
{{Flink|boolean|overdrink|int|item}} | {{Flink|boolean|overdrink|int|item}} | ||
{{Flink|boolean|retrieve_item|int|item|desc=Uses KoLmafia internal logic to gather items (see page for details).}} | {{Flink|boolean|retrieve_item|int|item|desc=Uses KoLmafia internal logic to gather items (see page for details).}} | ||
{{Flink|int|craft|string|int|item|item|desc=Raw crafting that obeys KoLmafia settings (see page for details).}} | {{Flink|int|craft|string|int|item|item|desc=Raw crafting that obeys KoLmafia settings (see page for details).}} | ||
{{Flink|string|last_item_message|desc=Returns message that KoL reports in the event of error.}} | {{Flink|string|last_item_message|desc=Returns message that KoL reports in the event of error.}} |
Revision as of 08:21, 6 November 2014
Informational
int my_meat()
int my_closet_meat()
boolean have_chef()
boolean have_bartender()
int [item] get_campground()
item get_dwelling()
boolean have_mushroom_plot()
string item_type( item )
int [item] get_shop()
int [item] get_ingredients( item )
string craft_type( item )
int [item] get_inventory()
int [item] get_related( item, string )
boolean is_tradeable( item )
boolean is_giftable( item )
boolean is_displayable( item )
boolean have_shop()
boolean have_display()
boolean is_npc_item( item )
void refresh_stash()
void refresh_shop()
float historical_age( item )
string to_plural( item )
int [item] item_drops( [monster] )
record [int] item_drops_array( [monster] )
Moving Items Around
boolean empty_closet()
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 )
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 )
boolean take_shop( [int], item )
Acquiring & Using Items
boolean autosell( int, item )
boolean buy( [coinmaster], int, item )
boolean buy_using_storage( int, item )
int buy_using_storage( int, item, int )
boolean create( int, item )
boolean drink( int, item )
boolean eat( int, item )
boolean eatsilent( int, item )
boolean hermit( int, item )
boolean use( int, item )
boolean overdrink( int, item )
boolean retrieve_item( int, item )
int craft( string, int, item, item )
string last_item_message()
Coinmaster Control
Some items can be bought from or sold to various "coinmasters" which are like shops that deal in a currency other than meat. These coinmasters include the Dimemaster and Quartermaster during the Island War, the Hermit, the Mr. Store and many others. Some relevant information can be found in proxy records for the item and coinmaster data types. The rest is controlled by the following functions.
Inquiries
coinmaster to_coinmaster( string )
boolean is_coinmaster_item( item )
boolean buys_item( coinmaster, item )
int buy_price( coinmaster, item )
boolean sells_item( coinmaster, item )
int sell_price( coinmaster, item )
Coinmaster transactions
boolean is_accessible( coinmaster )
string inaccessible_reason( coinmaster )
boolean visit( coinmaster )
boolean buy( coinmaster, int, item )
boolean sell( coinmaster, int, item )