In the same vein of "boolean is_accessible( coinmaster )" and "boolean gnomads_available()", it would check the availability of a location. Considering how many places are either unavailable at the start of a run, or becomes unavailable after a certain period (Cola Wars, pre-quest cyrpt/cemetary), this could be used in many automation scripts.
Currently, the availability of a location can be checked in 2 ways:
1) Using the adventure() function (since it's a boolean, if the location is not accessible it returns false). The downside to this is that you absolutely have to spend at least one adventure if it happens to be available. In a script that automates quests or that need careful expenditure of adventures (clan dungeons), spending that single adventure could screw things up.
2) Using visit_url() with a matcher or contains_text(), which clutters the script, specially considering the amount of locations that have the availability limited.
My suggestion:
This could be done by setting character prefs, something like "(location)isunlocked = false/true". These prefs would be modified when someone adventures in that location for the first time, hits the unlock flag (talking to the trapper and opening goatlet/mines), hits a flag (level 6 locking Cola War), and reset at ascension. This would generate less server hits too.
Currently, the availability of a location can be checked in 2 ways:
1) Using the adventure() function (since it's a boolean, if the location is not accessible it returns false). The downside to this is that you absolutely have to spend at least one adventure if it happens to be available. In a script that automates quests or that need careful expenditure of adventures (clan dungeons), spending that single adventure could screw things up.
2) Using visit_url() with a matcher or contains_text(), which clutters the script, specially considering the amount of locations that have the availability limited.
My suggestion:
This could be done by setting character prefs, something like "(location)isunlocked = false/true". These prefs would be modified when someone adventures in that location for the first time, hits the unlock flag (talking to the trapper and opening goatlet/mines), hits a flag (level 6 locking Cola War), and reset at ascension. This would generate less server hits too.