A thousand thanks. With that additional OR, it seems to work every time now. (I haven't had to test the giveup condition yet.)
Wow, what a refreshing break. I've been having a ton of fun with this old MUD, but it was starting to get tedious having to type out that kill command constantly.
I'd like to explore a few more ideas with this scripting stuff ... if it isn't too insanely complicated.
A couple of ideas. How hard would it be to add a look alias that read in the monsters in the room, and then used this kill alias to eliminate them one at a time?
>look
You are standing at a bend in the path. A small pine tree has gained purchase in the wall here and grows up at a sharp angle.
[][][][][][]
M x []
-------- []
.......| []
.......|$ []
.......| []
M - frostbat, lynx
Send ("look")
wait for "M - "
if "M - " not there, do nothing -- no monsters in the room
otherwise, kill $1, then kill $2, etc...
And my other idea is for a sell alias. When standing at the shop, I have to type "sell [item]" repetitively.
inv
You are carrying some platemail, a brass-ring, a bottle, a key, a glass-ring, a flask, a flask, a mace, your spellbook and 100 gold pieces.
So my idea here would be to sell items that were in some kind of trinket list, but not sell my important magical items like my brass-ring.
trinkets = {pearl, shortsword, stone, whip,} etc...
|