Difference between revisions of "Adventuring"

From Kolmafia
Jump to navigation Jump to search
imported>Grotfang
imported>StDoodle
m
Line 7: Line 7:
 
{{flink|void|council|desc=Visits the Council of Loathing.}}
 
{{flink|void|council|desc=Visits the Council of Loathing.}}
 
{{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|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|int|tavern|desc=}}
+
{{flink|int|tavern}}
{{flink|boolean|entryway|desc=}}
+
{{flink|boolean|entryway}}
{{flink|boolean|hedgemaze|desc=}}
+
{{flink|boolean|hedgemaze}}
{{flink|boolean|chamber|desc=}}
+
{{flink|boolean|chamber|desc=Attempts to perform the associated tasks. The return value indicates the success.}}
{{flink|RETURN|NAME|PARAM1|PARAM2|desc=}}
+
 
Attempts to perform the associated tasks. The return value indicates the success.<br />
+
 
See the [http://kolmafia.sourceforge.net/scripting.html CLI manual] for more details.<br />
 
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_4:_Hedging|Hedging]]</p>
 
  
 
<p><strong>boolean train_familiar( int nGoal, string sGoal )</strong><br />
 
<p><strong>boolean train_familiar( int nGoal, string sGoal )</strong><br />

Revision as of 15:58, 3 March 2010

Part 5 - Adventuring

Go get ‘em, tiger!

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()

boolean entryway()

boolean hedgemaze()

boolean chamber()

Attempts to perform the associated tasks. The return value indicates the success.



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.