Adventuring: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
remove_item_condition is new in r9093
imported>Bale
add more versions of visit_url()
Line 2: Line 2:
{{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|string|desc=Visits the desired location a specified number of times, using a combat filter function defined elsewhere in your script.}}
{{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|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|string|visit_url|string|desc=Visits the specified address and returns the page source.}}
{{Flink|buffer|visit_url}}
{{Flink|buffer|visit_url|string}}
{{Flink|buffer|visit_url|string|boolean}}
{{Flink|buffer|visit_url|string|boolean|boolean|desc=Visits the specified address and returns the page source.}}
{{Flink|void|remove_item_condition|int|item|desc=Removes adventuring conditions.}}
{{Flink|void|remove_item_condition|int|item|desc=Removes adventuring conditions.}}
{{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|void|add_item_condition|int|item|desc=Specifies adventuring conditions. With these in place, [[adventure|adventure()]] will successfully complete once the conditions are met.}}

Revision as of 09:05, 27 April 2011

boolean adventure( int, location )

Visits the desired location the the desired number of times.

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

buffer visit_url()

buffer visit_url( string )

buffer visit_url( string, boolean )

buffer visit_url( string, boolean, boolean )

Visits the specified address and returns the page source.

void remove_item_condition( int, item )

Removes adventuring conditions.

void add_item_condition( int, item )

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

boolean is_goal( item )

Checks if a given item is a goal.

string get_counters( string, int, int )

Determine if a counter will expire in a specified period of time.

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.

location my_location()

Returns the location where you last adventured.

void set_location( location )

Changes the value returned by my_location().

void refresh_status()

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

buffer run_combat()

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

boolean retrieve_item( int, item )

Uses KoLmafia internal logic to gather items.

boolean change_mcd( int )

Tries to set your +ML device to a specified setting and reports on success.

boolean hermit( int, item )

Trades worthless items (adventuring in the sewer if needed) to the hermit for specified items.


About Monsters

For all of the below functions that accept an optional monster parameter, the default value is your most recently-encountered monster (that means your current monster if you're in combat).

monster last_monster()

Returns last monster encountered.

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.

int monster_attack( [monster] )

Returns the starting/current attack value of the specified monster.

int monster_defense( [monster] )

Returns the starting/current defense value of the specified monster.

int monster_hp( [monster] )

Returns the starting/current HP of the specified monster.

int expected_damage( [monster] )

Returns the amount of damage you are expected to take each round from the specified monster.

element monster_element( [monster] )

Returns the elemental alignment of the specified monster.


Misc.

int get_auto_attack()

Returns your current auto-attack setting.

void set_auto_attack( int )

Sets your auto-attack setting.