I recently wrote a script intended to quickly list stat-appropriate locations to adventure. But it's not so quick. I got the location list the long way (suggested by degrassi above), but it takes about
20 seconds to load all locations and parse the monsters for safemox. Totally different example: a friend of mine is writing a bot that learns, adventuring in random locations until it begins to gather feedback and then adventuring more intelligently. (He's kind of a nerd like that -- we'll see how far he gets, since he's used to programming in more powerful languages.)
For anything that wants to 1) batch process / filter locations, or 2) select a location at random,
to_location(int) would come in very handy. I looked through adventures.txt and the only locations that don't have an adventure=XX url are noncombat locations (with the exception of a couple boss fights and the hedge maze, which have very limited availability, and which would probably be scripted specifically rather than in batch).
Presently, choosing a random combat location is involved and requires a disproportionately large amount of system resources. With
to_location(int), it's ridiculously easy:
Code:
int i;
repeat
i = random(200);
until (to_location(i) != $location[none])
I think this added functionality and ease-of-use outweighs not having every location present, especially considering that
1) Every unlimited combat location would be included, and
2) The excluded zones would in common use be scripted specifically (by name), rather than included in batch processing.