Adventuring: Difference between revisions
imported>StDoodle mNo edit summary |
imported>Bale add 4 missing functions |
||
Line 1: | Line 1: | ||
{{Flink|boolean|adventure|int|location|desc=Visits the desired location the the desired number of times. (''Sample'': [[Code_Samples#Hedging|Hedging]])}} | {{Flink|boolean|adventure|int|location|desc=Visits the desired location the the desired number of times. (''Sample'': [[Code_Samples#Hedging|Hedging]])}} | ||
{{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 | {{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|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.}} | ||
{{Flink|boolean|is_goal|item|desc=Checks if a given item is a goal.}} | |||
{{Flink|boolean|get_counters|string|int|int|desc=Checks if there is an active counter that matches the string.}} | |||
{{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.}} | ||
Line 10: | Line 12: | ||
{{Flink|boolean|chamber|desc=These three functions attempt to perform the associated tasks. The return value indicates the success.}} | {{Flink|boolean|chamber|desc=These three functions attempt to perform the associated tasks. The return value indicates the success.}} | ||
{{Flink|location|my_location|desc=Returns the location where you last adventured.}} | {{Flink|location|my_location|desc=Returns the location where you last adventured.}} | ||
{{Flink|void|set_location|location|desc=Changes the value returned by my_location().}} | |||
{{Flink|void|refresh_status|desc=Refreshes the side-pane character info (health, effects, etc.).}} | {{Flink|void|refresh_status|desc=Refreshes the side-pane character info (health, effects, etc.).}} | ||
{{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 | {{Flink|boolean|retrieve_item|int|item|desc=Uses KoLmafia internal logic to gather items.}} | ||
{{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 | {{Flink|boolean|hermit|int|item|desc=Trades worthless items (adventuring in the sewer if needed) to the hermit for specified items.}} | ||
==About Monsters== | ==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). | 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). | ||
{{Flink|monster|last_monster|desc=Returns last monster encountered.}} | |||
{{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 | {{Flink|float [monster]|appearance_rates|location|desc=Returns a map of the expected frequency of each monster at the specified location under normal conditions.}} | ||
{{Flink|int|monster_attack|{{opt|monster}}|desc=Returns the starting/current attack value of the specified monster.}} | {{Flink|int|monster_attack|{{opt|monster}}|desc=Returns the starting/current attack value of the specified monster.}} | ||
{{Flink|int|monster_defense|{{opt|monster}}|desc=Returns the starting/current defense value of the specified monster.}} | {{Flink|int|monster_defense|{{opt|monster}}|desc=Returns the starting/current defense value of the specified monster.}} |
Revision as of 07:17, 5 May 2010
boolean adventure( int, location )
boolean adventure( int, location, string )
boolean adv1( location, int, string )
void add_item_condition( int, item )
boolean is_goal( item )
boolean get_counters( string, int, int )
void council()
item guardians()
int tavern()
boolean entryway()
boolean hedgemaze()
boolean chamber()
location my_location()
void refresh_status()
buffer run_combat()
boolean retrieve_item( int, item )
boolean change_mcd( int )
boolean hermit( int, item )
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()
monster [int] get_monsters( location )
float [monster] appearance_rates( location )
int monster_attack( [monster] )
int monster_defense( [monster] )
int expected_damage( [monster] )
element monster_element( [monster] )