Adventuring: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
Fixed multiple link typos: "Dataype" -> "Datatype"
Line 2: Line 2:
<p><em>Go get &#8216;em, tiger!</em></p>
<p><em>Go get &#8216;em, tiger!</em></p>


<p><strong>boolean adventure( int visits, [[%28ASHRM%29_Dataype_Constants#.24location.5Bconstant.5D|location place]] )</strong><br />
<p><strong>boolean adventure( int visits, [[%28ASHRM%29_Datatype_Constants#.24location.5Bconstant.5D|location place]] )</strong><br />
Visits the desired place the number of times that you wish.<br />
Visits the desired place the number of times that you wish.<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_4:_Hedging|Hedging]]</p>
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_4:_Hedging|Hedging]]</p>


<p><strong>void add_item_condition( int quantity, [[%28ASHRM%29_Dataype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
<p><strong>void add_item_condition( int quantity, [[%28ASHRM%29_Datatype_Constants#.24item.5Bconstant.5D|item it]] )</strong><br />
Specifies adventuring conditions.  With conditions in place, adventure(&#8230;) will successfully complete before using all the specified adventures if the conditions are all met.<br />
Specifies adventuring conditions.  With conditions in place, adventure(&#8230;) will successfully complete before using all the specified adventures if the conditions are all met.<br />
See the [http://kolmafia.sourceforge.net/scripting.html CLI manual] for additional condition programming.</p>
See the [http://kolmafia.sourceforge.net/scripting.html CLI manual] for additional condition programming.</p>
Line 36: Line 36:
Grabs a fresh copy of your sidebar, so that information on your health, effects, and such will be guaranteed accurate.  In theory, this is not necessary unless you are attempting to script your own custom combat function.</p>
Grabs a fresh copy of your sidebar, so that information on your health, effects, and such will be guaranteed accurate.  In theory, this is not necessary unless you are attempting to script your own custom combat function.</p>


<p><strong>monster [int] get_monsters( [[%28ASHRM%29_Dataype_Constants#.24location.5Bconstant.5D|location place]] )</strong><br />
<p><strong>monster [int] get_monsters( [[%28ASHRM%29_Datatype_Constants#.24location.5Bconstant.5D|location place]] )</strong><br />
returns an integer indexed map of potential monsters in the given location.</p>
returns an integer indexed map of potential monsters in the given location.</p>


<p><strong>int monster_base_attack( [[%28ASHRM%29_Dataype_Constants#.24monster.5Bconstant.5D|monster eek]] )<br />
<p><strong>int monster_base_attack( [[%28ASHRM%29_Datatype_Constants#.24monster.5Bconstant.5D|monster eek]] )<br />
int monster_base_defense( [[%28ASHRM%29_Dataype_Constants#.24monster.5Bconstant.5D|monster eek]] )<br />
int monster_base_defense( [[%28ASHRM%29_Datatype_Constants#.24monster.5Bconstant.5D|monster eek]] )<br />
int monster_base_hp( [[%28ASHRM%29_Dataype_Constants#.24monster.5Bconstant.5D|monster eek]] )</strong><br />
int monster_base_hp( [[%28ASHRM%29_Datatype_Constants#.24monster.5Bconstant.5D|monster eek]] )</strong><br />
Returns the stats for the given monster.  </p>
Returns the stats for the given monster.  </p>



Revision as of 07:33, 22 July 2007

Part 5 - Adventuring

Go get ‘em, tiger!

boolean adventure( int visits, location place )
Visits the desired place the number of times that you wish.
Sample:Hedging

void add_item_condition( int quantity, item it )
Specifies adventuring conditions. With conditions in place, adventure(…) will successfully complete before using all the specified adventures if the conditions are all met.
See the CLI manual for additional condition programming.

void council()
Visits the Council of Loathing.

item guardians()
Climbs the Naughty Sorceress’ Tower and passes the challenges that it can. If it completes the challenge, it returns $item[none]. Otherwise, it returns the item that is needed to pass the next stage.

boolean guild()
boolean gourd()
int tavern()
boolean nemesis()
boolean entryway()
boolean hedgemaze()
boolean chamber()

Attempts to perform the associated tasks. The return value indicates the success.
See the CLI manual for more details.
Sample:Hedging

boolean train_familiar( int nGoal, string sGoal )
Trains your currently-equipped familiar. sGoal can be either “base”, “buffed”, or “turns”, and nGoal is either the target weight or desired number of battles.

location my_location()
Returns the location where you last adventured.

void refresh_status()
Grabs a fresh copy of your sidebar, so that information on your health, effects, and such will be guaranteed accurate. In theory, this is not necessary unless you are attempting to script your own custom combat function.

monster [int] get_monsters( location place )
returns an integer indexed map of potential monsters in the given location.

int monster_base_attack( monster eek )
int monster_base_defense( monster eek )
int monster_base_hp( monster eek )

Returns the stats for the given monster.

spiceloop is a verified kolmafia ash function however the parameters and return type are speculation. This needs verified.
void spiceloop( int count )
Executes kolmafia’s internal spiceloop for the specified number of adventures.

element monster_attack_element( monster )
element monster_defense_element( monster )
Returns the given monsters attack element and element which it can defend against.