Adventuring: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>StDoodle
No edit summary
Line 1: Line 1:
== Part 5 - Adventuring ==
{{Flink|boolean|adventure|int|location|desc=Visits the desired location the the desired number of times. (''Sample'':[[%28ASHRM%29_Code_Samples#Sample_4:_Hedging|Hedging]])}}
<p><em>Go get &#8216;em, tiger!</em></p>
{{Flink|boolean|adventure|int|location|string|desc=Visits the desired location a specified number of times, using a combat filter function defined elsewhere in your script.}}
{{flink|boolean|adventure|int|location|desc=Visits the desired location the the desired number of times. (''Sample'':[[%28ASHRM%29_Code_Samples#Sample_4:_Hedging|Hedging]])}}
{{Flink|boolean|adv1|location|int|string|desc=Adventure exactly once in the specified location (even if it uses no turns). Chained choice adventures ARE followed. Int overrides default settings, and string is a filter, same as in [[adventure|adventure()]]}}
{{flink|boolean|adventure|int|location|string|desc=Visits the desired location a specified number of times, using a combat filter function defined elsewhere in your script.}}
{{Flink|void|add_item_condition|int|item|desc=Specifies adventuring conditions. With these in place, [[adventure|adventure()]] will successfully complete once the conditions are met.}}
{{flink|boolean|adv1|location|int|string|desc=Adventure exactly once in the specified location (even if it uses no turns). Chained choice adventures ARE followed. Int overrides default settings, and string is a filter, same as in [[adventure|adventure()]]}}
{{Flink|void|council|desc=Visits the Council of Loathing.}}
{{flink|void|add_item_condition|int|item|desc=Specifies adventuring conditions. With these in place, [[adventure|adventure()]] will successfully complete once the conditions are met.}}
{{Flink|item|guardians|desc=Climbs the Naughty Sorceress' Tower and passes the challenges it can, returning the first item needed to pass a failed stage.}}
{{flink|void|council|desc=Visits the Council of Loathing.}}
{{Flink|int|tavern|desc=Attempt to complete the tavern, and returns the number of squares visited?}}
{{flink|item|guardians|desc=Climbs the Naughty Sorceress' Tower and passes the challenges it can, returning the first item needed to pass a failed stage.}}
{{Flink|boolean|entryway}}
{{flink|int|tavern}}
{{Flink|boolean|hedgemaze}}
{{flink|boolean|entryway}}
{{Flink|boolean|chamber|desc=These three functions attempt to perform the associated tasks. The return value indicates the success.}}
{{flink|boolean|hedgemaze}}
{{Flink|boolean|train_familiar|int|string|desc=Trains your curren familiar to a given base or buffed weight or for a given number of turns. (string="base{{!}}buffed{{!}}goal")}}
{{flink|boolean|chamber|desc=Attempts to perform the associated tasks. The return value indicates the success.}}
{{Flink|location|my_location|desc=Returns the location where you last adventured.}}
 
{{Flink|void|refresh_status|desc=Refreshes the side-pane character info (health, effects, etc.).}}
 
{{Flink|monster [int]|get_monsters|location|desc=Returns a map of potential monsters at a given location.}}
 
{{Flink|float [monster]|appearance_rates|location|desc=Returns a map of the expected frequency of each monster at the specified location under normal conditions. Bosses, semirare encounters, and other one-time-only monsters have a value of 0.0; ultra-rare monsters have a negative value. Does not account for combat rate modifiers, olfaction, etc.}}
<p><strong>boolean train_familiar( int nGoal, string sGoal )</strong><br />
{{Flink|int|monster_attack|{{opt|monster}}|desc=Returns the (base?) attack value of the specified monster (defaults to 0 without a specified monster or uses current monster in a consult script).}}
Trains your currently-equipped familiar.  sGoal can be either &#8220;base&#8221;, &#8220;buffed&#8221;, or &#8220;turns&#8221;, and nGoal is either the target weight or desired number of battles.</p>
{{Flink|int|monster_defense|{{opt|monster}}|desc=Returns the (base?) defense value of the specified monster (defaults to 0 without a specified monster or uses current monster in a consult script).}}
 
{{Flink|int|monster_hp|{{opt|monster}}|desc=Returns the (base?) HP of the specified monster (defaults to 0 without a specified monster or uses current monster in a consult script).}}
<p><strong>location my_location()</strong><br />
{{Flink|element|monster_element|{{opt|monster}}|desc=Returns the elemental allignment of the specified monster (defaults to 0 without a specified monster or uses current monster in a consult script).}}
Returns the location where you last adventured. </p>
{{Flink|buffer|run_combat|desc=Uses the current KoLmafia settings to run a combat (for use with [[visit_url|visit_url()]]).}}
 
<p><strong>void refresh_status()</strong><br />
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_Datatype_Constants#.24location.5Bconstant.5D|location place]] )</strong><br />
Returns an integer indexed map of potential monsters in the given location.</p>
 
<p><strong>float [monster] appearance_rates( [[%28ASHRM%29_Datatype_Constants#.24location.5Bconstant.5D|location place]] )</strong><br />
Returns a map containing the expected appearance rate for the known monsters in the specified location, normally in the range 0..100. The rate is 0 for bosses, semirare encounters (e.g. Knob Goblin Elite Guard Captain), and other one-time-only monsters, negative for ultra-rare monsters.<br />
The map also contains an entry for $monster[none], giving the expected rate of noncombat encounters. This is negative for locations where this isn't known, in which case the monster encounter rates are calculated as if the location was 100% combats.<br />
The results take combat rate modifiers into account. Queue effects, Olfaction, and monster banishers are not considered. Special mechanics (such as monsters that are unlocked by some action) are also not considered.</p>
 
<p><strong>int monster_base_attack( [[%28ASHRM%29_Datatype_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_Datatype_Constants#.24monster.5Bconstant.5D|monster eek]] )</strong><br />
Returns the stats for the given monster.  </p>
 
<strong>element monster_attack_element( monster )</strong><br />
<strong>element monster_defense_element( monster )</strong><br />
Returns the given monsters attack element and element which it can defend against.
 
<strong>buffer run_combat()</strong><br />
Uses the built in mafia combat to run a combat. For use with visit_url.

Revision as of 16:26, 3 March 2010

boolean adventure( int, location )

Visits the desired location the the desired number of times. (Sample:Hedging)

boolean adventure( int, location, string )

Visits the desired location a specified number of times, using a combat filter function defined elsewhere in your script.

boolean adv1( location, int, string )

Adventure exactly once in the specified location (even if it uses no turns). Chained choice adventures ARE followed. Int overrides default settings, and string is a filter, same as in adventure()

void add_item_condition( int, item )

Specifies adventuring conditions. With these in place, adventure() will successfully complete once the conditions are met.

void council()

Visits the Council of Loathing.

item guardians()

Climbs the Naughty Sorceress' Tower and passes the challenges it can, returning the first item needed to pass a failed stage.

int tavern()

Attempt to complete the tavern, and returns the number of squares visited?

boolean entryway()

boolean hedgemaze()

boolean chamber()

These three functions attempt to perform the associated tasks. The return value indicates the success.

boolean train_familiar( int, string )

Trains your curren familiar to a given base or buffed weight or for a given number of turns. (string="base|buffed|goal")

location my_location()

Returns the location where you last adventured.

void refresh_status()

Refreshes the side-pane character info (health, effects, etc.).

monster [int] get_monsters( location )

Returns a map of potential monsters at a given location.

float [monster] appearance_rates( location )

Returns a map of the expected frequency of each monster at the specified location under normal conditions. Bosses, semirare encounters, and other one-time-only monsters have a value of 0.0; ultra-rare monsters have a negative value. Does not account for combat rate modifiers, olfaction, etc.

int monster_attack( [monster] )

Returns the (base?) attack value of the specified monster (defaults to 0 without a specified monster or uses current monster in a consult script).

int monster_defense( [monster] )

Returns the (base?) defense value of the specified monster (defaults to 0 without a specified monster or uses current monster in a consult script).

int monster_hp( [monster] )

Returns the (base?) HP of the specified monster (defaults to 0 without a specified monster or uses current monster in a consult script).

element monster_element( [monster] )

Returns the elemental allignment of the specified monster (defaults to 0 without a specified monster or uses current monster in a consult script).

buffer run_combat()

Uses the current KoLmafia settings to run a combat (for use with visit_url()).