Adventuring: Difference between revisions
Add "Choice Adventures" section |
Add "Goals and Conditions" section. Also update add_item_condition() |
||
Line 1: | Line 1: | ||
{{TOCright}} | |||
==General Adventuring== | |||
{{Flink|boolean| adventure|int|location|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.}} | ||
{{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()]]}} | ||
{{FunctionEmbed|visit_url| | {{FunctionEmbed|visit_url|format=signature|desc=yes}} | ||
{{Flink|string|get_counters|string|int|int|desc=Determine if a counter will expire in a specified | {{Flink|string|get_counters|string|int|int|desc=Determine if a counter will expire in a specified | ||
period of time.}} | period of time.}} | ||
Line 24: | Line 21: | ||
{{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.}} | ||
==Goals and Conditions== | |||
{{FunctionEmbed|add_item_condition|format=signature|desc=yes}} | |||
{{Flink|string [int]|get_goals|desc=Lists all current goals.}} | |||
{{Flink|boolean| is_goal|item|desc=Checks if a given item is a goal.}} | |||
{{Flink|boolean|goal_exists|string|desc=Checks if there is currently a given type of goal.}} | |||
{{Flink|void| remove_item_condition|int|item|desc=Removes adventuring conditions.}} | |||
==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). | ||
Line 49: | Line 51: | ||
{{flink|int|last_choice|desc=Returns the ID of the current (or last) choice adventure you encountered.}} | {{flink|int|last_choice|desc=Returns the ID of the current (or last) choice adventure you encountered.}} | ||
{{flink|buffer|run_choice|int|desc=Run the current choice adventure by selecting a choice number.}} | {{flink|buffer|run_choice|int|desc=Run the current choice adventure by selecting a choice number.}} | ||
==Misc.== | ==Misc.== | ||
{{Flink|int|get_auto_attack|desc=Returns your current auto-attack setting.}} | {{Flink|int|get_auto_attack|desc=Returns your current auto-attack setting.}} | ||
{{Flink|void|set_auto_attack|int|desc=Sets your auto-attack setting.}} | {{Flink|void|set_auto_attack|int|desc=Sets your auto-attack setting.}} | ||
[[Category:Scripting]] | [[Category:Scripting]] |
Revision as of 14:21, 23 December 2020
General Adventuring
boolean adventure( int, location )
boolean adventure( int, location, string )
boolean adv1( location, int, string )
- Returns the original HTML source of the page being overridden inside a relay override script.
buffer visit_url( string, boolean?, boolean? )
- Visits a web page and returns its HTML source.
string 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()
buffer run_choice()
buffer run_turn()
boolean change_mcd( int )
boolean hermit( int, item )
Goals and Conditions
void add_item_condition( int, item )
void add_item_condition( item, int )
- Adds a number of the given item to the current auto-adventuring conditions.
string [int] get_goals()
boolean is_goal( item )
boolean goal_exists( string )
void remove_item_condition( 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).
int jump_chance( [monster], [int], [int] )
int jump_chance( location, [int], [int] )
monster last_monster()
monster [int] get_monsters( location )
float [monster] appearance_rates( location, [boolean] )
int monster_attack( [monster] )
int monster_defense( [monster] )
int monster_initiative( [monster] )
phylum monster_phylum( [monster] )
int expected_damage( [monster] )
element monster_element( [monster] )
monster image_to_monster( string )
boolean is_banished( monster )
Choice Adventures
string [int] available_choice_options( boolean? )
- Returns all available choice options in the current (or last) choice adventure the player encountered.
boolean choice_follows_fight()
true
if the last finished combat is about to lead into a choice adventure.boolean handling_choice()
true
if you are currently in a choice.int last_choice()
buffer run_choice( int )