Command: prospect
If the MUD returns something with the word "gems" then:
mine gems
Otherwise:
read from a file to see where to move next, and move there
Check to see if vitality is 30 or below. If it is:
cast refresh, verify that it worked, if it didn't cast it again, repeat until it works.
If vitality is above 30:
prospect
and so it starts all over again. I can do most of this just fine, I've made simple triggers with reg. expressions that will see if I've found gems or not and if not, move on. What I'm having trouble with is that it'll only move in one direction. So it'll run to the end of this line of desert, but it just sits there at the end. (If you try prospecting where there's nothing it gives you a message like "There's nothing worth mining here." so it doesn't hit any triggers.) So... if someone could help me out with:
How to make a file that the script can read, line by line, to tell it where to go next from where it is now;
How to turn that file into a command that it gets when it hits the "where do we go next?" stage;
I think I can get the rest of it on my own.
Thanks in advance for your help!