MUSHclient supports entering speedwalk strings by using a special "speedwalk identifier" (which defaults to the # character), like this:
However the requirement to type the # is one extra keystroke, and can clash with certain other aliases or MUD commands. It would be nice to do away with it.
The alias below does that - it uses a regular expression to match on the normal speedwalk characters n/s/e/w/u/d (north/south/east/west/up/down) as well as digits and spaces (eg. 4n 3w).
If it matches then it assumes you are typing a speedwalk, and sends it to the speedwalk processor.
There is also a slightly elaborate provision for using round brackets in speedwalks, for example:
To use this, simply copy from above and paste into your world (see http://www.mushclient.com/pasting) and it should now evaluate speedwalks without needing any special speedwalk prefix.
This alias does not use scripting so it will work with any (or no) scripting language.
The only potential problem I can see is that if something you type "looks like" a speedwalk but isn't.
For example, if you got asked a question: "Do you want to be a mage?" and you answered "n" then "n" might look like a speedwalk (and the correct answer to "Do you want to be a mage?" is not "north"!).
For this reason, it only activates if it gets at least 2 speedwalk characters.
# 4w 3s
However the requirement to type the # is one extra keystroke, and can clash with certain other aliases or MUD commands. It would be nice to do away with it.
The alias below does that - it uses a regular expression to match on the normal speedwalk characters n/s/e/w/u/d (north/south/east/west/up/down) as well as digits and spaces (eg. 4n 3w).
If it matches then it assumes you are typing a speedwalk, and sends it to the speedwalk processor.
<aliases>
<alias
match="^([nsewud\d\s]|\(.+?\)){2,}$"
enabled="y"
regexp="y"
send_to="11"
ignore_case="y"
sequence="100"
>
<send>%0</send>
</alias>
</aliases>
There is also a slightly elaborate provision for using round brackets in speedwalks, for example:
4s (pick lock) 2w (open door) 3(se)
To use this, simply copy from above and paste into your world (see http://www.mushclient.com/pasting) and it should now evaluate speedwalks without needing any special speedwalk prefix.
This alias does not use scripting so it will work with any (or no) scripting language.
The only potential problem I can see is that if something you type "looks like" a speedwalk but isn't.
For example, if you got asked a question: "Do you want to be a mage?" and you answered "n" then "n" might look like a speedwalk (and the correct answer to "Do you want to be a mage?" is not "north"!).
For this reason, it only activates if it gets at least 2 speedwalk characters.