Item Management: Difference between revisions
imported>Bale |
imported>Bale fix |
||
Line 66: | Line 66: | ||
{{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|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).}} | ||
==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. | |||
===Utility functions=== | |||
{{Flink|coinmaster|to_coinmaster|string|item|desc=Converts a string to a valid coinmaster.}} | |||
{{Flink|boolean|is_coinmaster_item|item|desc=Is a given item acquirable from a coinmster.}} | |||
{{Flink|coinmaster|coinmaster_buying_item|item|desc=Returns the coinmaster that will buy a given item.}} | |||
{{Flink|coinmaster|coinmaster_selling_item|item|desc=Returns the coinmaster that will sell a given item.}} | |||
===Inquiries=== | |||
{{Flink|boolean|buys_item|coinmaster|item|desc=Is a specific item acquirable from the named coinmster.}} | |||
{{Flink|int|buy_price|coinmaster|item|desc=What is the coinmaster's purchase price for an item.}} | |||
{{Flink|boolean|sells_item|coinmaster|item|desc=Is a specific item sellable to the named coinmster.}} | |||
{{Flink|int|sell_price|coinmaster|item|desc=What is the coinmaster's selling price for an item.}} | |||
===Coinmaster transactions=== | |||
{{Flink|boolean|is_accessible|coinmaster|desc=Is a given coinmaster currently accessible.}} | |||
{{Flink|string|inaccessible_reason|coinmaster|desc=The reason a given coinmaster is currently inaccessible.}} | |||
{{Flink|boolean|visit|coinmaster|desc=Refreshes information at a coinmaster.}} | |||
{{Flink|boolean|buy|coinmaster|int|item|desc=Buys an item from a coinmaster.}} | |||
{{Flink|boolean|sell|coinmaster|int|item|desc=Sells an item to a coinmaster.}} | |||
[[Category:Scripting]] | [[Category:Scripting]] |
Revision as of 23:30, 18 July 2011
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_ingredients( 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()
float historical_age( item )
string to_plural( item )
int [item] item_drops( [monster] )
record [int] item_drops_array( [monster] )
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 )
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 )
Acquiring & Using Items
boolean retrieve_item( int, item )
boolean hermit( int, item )
boolean use( int, item )
string last_item_message()
boolean eatsilent( int, item )
boolean eat( int, item )
boolean overdrink( int, item )
boolean drink( int, item )
boolean create( int, item )
boolean buy( int, item )
boolean autosell( int, item )
int craft( string, int, item, item )
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.
Utility functions
coinmaster to_coinmaster( string, item )
boolean is_coinmaster_item( item )
coinmaster coinmaster_buying_item( item )
coinmaster coinmaster_selling_item( item )
Inquiries
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 )