Adventuring: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Grotfang
No edit summary
imported>Grotfang
No edit summary
Line 1: Line 1:
== Part 5 - Adventuring ==
== Part 5 - Adventuring ==
<p><em>Go get &#8216;em, tiger!</em></p>
<p><em>Go get &#8216;em, tiger!</em></p>
{{flink|boolean|adventure|desc=Visits the desired location the the desired number of times.}}
{{flink|boolean|adventure|int|location|desc=Visits the desired location the the desired number of times.}}


<p><strong>boolean [[adventure]]( int visits, [[%28ASHRM%29_Datatype_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 />

Revision as of 14:59, 3 March 2010

Part 5 - Adventuring

Go get ‘em, tiger!

boolean adventure( int, location )

Visits the desired location the the desired number of times.


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

boolean adventure( int visits, location place, string filterFunc )
Visits the desired place the number of times that you wish, using a combat filter function defined elsewhere in your script.

boolean adv1( location place, int turnsUsed, string filterFunc )
This will adventure exactly once in the specified location (even if it uses no turns), although it will follow chained choice adventures for as long as you have preset options.
turnsUsed overrides the normal number of adventures that are expected to be consumed at this location, or -1 can be passed to use the default. Specifically, 0 will prevent any counters from triggering - of course, if an adventure actually is consumed, any counters that you kept from triggering will be lost.
filterFunc is the name of a combat filter function defined elsewhere in your script, with the same behavior as in the 3-paramater version of adventure(…). An empty string can be passed to use your battle action or CCS as normal.
Your autoattack will be reset when adventuring with a combat filter active, just as if you were using a CCS.

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.

float [monster] appearance_rates( location place )
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.
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.
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.

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.

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

buffer run_combat()
Uses the built in mafia combat to run a combat. For use with visit_url.