Difference between revisions of "Adventuring"

From Kolmafia
Jump to navigation Jump to search
imported>Heeheehee
m (Spelling.)
imported>Slyz
(added expected_damage(). Some functions do not default to 0 when no monster is specified, they default to the last monster encountered.)
Line 13: Line 13:
 
{{Flink|monster [int]|get_monsters|location|desc=Returns a map of potential monsters at a given location.}}
 
{{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 (see page for details).}}
 
{{Flink|float [monster]|appearance_rates|location|desc=Returns a map of the expected frequency of each monster at the specified location under normal conditions (see page for details).}}
{{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).}}
+
{{Flink|int|monster_attack|{{opt|monster}}|desc=Returns the (base?) attack value of the specified monster (defaults to the last monster encountered or uses current monster in a consult script).}}
{{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_defense|{{opt|monster}}|desc=Returns the (base?) defense value of the specified monster (defaults to the last monster encountered 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).}}
+
{{Flink|int|monster_hp|{{opt|monster}}|desc=Returns the (base?) HP of the specified monster (defaults to the last monster encountered or uses current monster in a consult script).}}
{{Flink|element|monster_element|{{opt|monster}}|desc=Returns the elemental alignment of the specified monster (defaults to 0 without a specified monster or uses current monster in a consult script).}}
+
{{Flink|int|expected_damage|{{opt|monster}}|desc=Returns the amount of damage you are expected to take each round from the specified monster (defaults to the last monster encountered or uses current monster in a consult script).}}
 +
{{Flink|element|monster_element|{{opt|monster}}|desc=Returns the elemental alignment of the specified monster (defaults to the last monster encountered or uses current monster in a consult script).}}
 
{{Flink|buffer|run_combat|desc=Uses the current KoLmafia settings to run a combat (for use with [[visit_url|visit_url()]]).}}
 
{{Flink|buffer|run_combat|desc=Uses the current KoLmafia settings to run a combat (for use with [[visit_url|visit_url()]]).}}
 
{{Flink|boolean|retrieve_item|int|item|desc=Uses KoLmafia internal logic to gather items (see page for details).}}
 
{{Flink|boolean|retrieve_item|int|item|desc=Uses KoLmafia internal logic to gather items (see page for details).}}
 
{{Flink|boolean|change_mcd|int|desc=Tries to set your +ML device to a specified setting and reports on success.}}
 
{{Flink|boolean|change_mcd|int|desc=Tries to set your +ML device to a specified setting and reports on success.}}
 
{{Flink|boolean|hermit|int|item|desc=Trades worthless items (adventuring in the sewer if needed) to the hermit for specified items (see page for details).}}
 
{{Flink|boolean|hermit|int|item|desc=Trades worthless items (adventuring in the sewer if needed) to the hermit for specified items (see page for details).}}

Revision as of 14:37, 5 April 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.

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 (see page for details).

int monster_attack( [monster] )

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

int monster_defense( [monster] )

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

int monster_hp( [monster] )

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

int expected_damage( [monster] )

Returns the amount of damage you are expected to take each round from the specified monster (defaults to the last monster encountered or uses current monster in a consult script).

element monster_element( [monster] )

Returns the elemental alignment of the specified monster (defaults to the last monster encountered 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()).

boolean retrieve_item( int, item )

Uses KoLmafia internal logic to gather items (see page for details).

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 (see page for details).