Item Management: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
No edit summary
 
imported>MagiNinjA
m redid redirect
Line 1: Line 1:
== Part 2 - Item management ==
#REDIRECT[[(ASHRM) Item Management]]
<p><em>Now we&#8217;ll expand our focus to include some of your special &#8220;me-places&#8221; in the Kingdom and how to play with them.</em></p>
 
<p><strong>int my_meat()<br />
int my_closetmeat()</strong><br />
Returns your current meat in your inventory and Colossal Closet</p>
 
<p><strong>int pulls_remaining()</strong><br />
If you are in ronin, the number of additional items that you can remove from Ancestral Storage today</p>
 
<p><strong>boolean have_chef()<br />
boolean have_bartender()</strong><br />
Tells you if you have a robotic servant installed in your campground</p>
 
<p><strong>boolean have_mushroom_plot()</strong><br />
Tells you if you bought the mushroom plot in Degrassi Knoll.</p>
 
<p><strong>int stills_available()</strong><br />
Returns the number of transformations you can make at Nash Crosby&#8217;s Still today (or 0 if you have no access).</p>
 
<p><strong>int item_amount( [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
int closet_amount( [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
int museum_amount( [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
int shop_amount( [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
int storage_amount( [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
int stash_amount( [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Returns the amount of the given item in (respectively) your main inventory, your Colossal Closet, your Display Case, your Mall store, Hagnk&#8217;s Ancestral Storage, and your clan&#8217;s stash (to the degree that you have access to these locations).<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_5:_Collect_bounty|Collect_bounty]]</p>
 
<p><strong>boolean take_closet( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
boolean take_storage( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
boolean take_stash( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
boolean put_closet( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
boolean put_stash( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Attempts to move the desired number of the desired item into or out of the Colossal Closet, Ancestral Storage, or your clan&#8217;s stash.  The return value indicates the success of your endeavor.  If you have fewer than the desired number of the item, then the function will not place any.<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_5:_Collect_bounty|Collect_bounty]]</p>
 
<p><strong>boolean take_closet( int amount )<br />
boolean put_closet( int amount )</strong><br />
Transfers meat in or out of your Colossal Closet.</p>
 
<p><strong>boolean put_shop( int price, int limit, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Places all of the associated item into your mall store at the desired price and with the associated limit on purchases per day, if possible. If the price is set to 0, then the current price will remain unchanged if you already have that item in your store. If you do not already have that item in your store and If the price is set to 0, then the price set will be 999,999,999 meat.</p>
 
<p><strong>boolean buy( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Tries to buy items.  First preference is given to NPC stores that you have access to and then, if possible, will buy the cheapest available items from the mall.  When passing 0 or a negative number to the buy function, KoLmafia does nothing and automatically returns true.</p>
 
<p><strong>boolean sell_item( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Autosells the given items.</p>
 
<p><strong>boolean retrieve_item( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Uses KoLmafia internal logic to gather the items in the least destructive manner. See the &#8220;acquire&#8221; documentation in [http://kolmafia.sourceforge.net/scripting.html the CLI manual] for more details.</p>
 
<p><strong>boolean bounty_hunter_wants( [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Tells you if the bounty hunter is accepting the specified item today<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_5:_Collect_bounty|Collect_bounty]]</p>
 
<p><strong>boolean trade_bounty_hunter( [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Trades all of the specified item with the bounty hunter if he is accepting them today.<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_5:_Collect_bounty|Collect_bounty]]</p>
 
<p><strong>boolean trade_trapper( [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
boolean trade_trapper( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Trades yeti furs to the L33t Tr4pz0r&#8217;s in exchange for the indicated fur.  If you pass an integer then it will exchange that number, otherwise it exchanges your entire inventory.<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_5:_Collect_bounty|Collect_bounty]]</p>
 
<p><strong>boolean trade_hermit( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Buys the appropriate number of the given item from the Hermit.  It assumes that you have enough worthless items but will manage buying the Hermit Permits if needed.</p>
 
<p><strong>boolean use( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
boolean eat( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )<br />
boolean drink( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Consumes the given items.  These commands are synonymous, you can &#8220;use&#8221; food or &#8220;eat&#8221; booze if you wish.<br />
<em>This will not be true depending on your preferences &#8212; food must be consumed with eat(), booze with drink(), and non-foods with use() if not set to allow global use.</em></p>
 
<p><strong>boolean create( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Attempts to create the desired items.  Depending on your in-game settings and conditions, this may involve buying ingredients for the items or servants to create the items for you.</p>
 
<p><strong>int creatable_amount( [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Returns the number of copies of the item that you are capable of creating with your current inventory.  Servant availability and remaining adventures are not factored into this calculation.</p>
 
<p><strong>void refresh_stash()</strong><br />
Takes a new look at the contents of your clan stash.  Crucial if your clanmates have been manipulating the contents during your session.</p>
131168436504470188501416

Revision as of 21:01, 8 May 2007