These two aliases give the ability to assign quick shortcuts to the digits 0-9, as well as stack various aliases together.
First create an alias with the following name:
^(\d)(.*)
Make sure to enable Regular Expression. Then give it the following text:
if "%2" == "" then
Execute(GetVariable("alias%1"))
elseif "%2" == " " then
Note ("Alias %1 is set to:" .. GetVariable("alias%1"))
else
Note ("Setting alias %1 to:%2")
SetVariable("alias%1", "%2")
end
What it will do, using the number 1 for an example:
1 kill Bill: Put the command "kill Bill" into variable alias1.
1: Executes command "kill Bill"
1 : (one space) Tells you what you previously stored in alias1.
So you can make quick aliases on the fly for whatever you need. They will persist within sessions. Spaces after the numbers are optional, so you could use 1kill bill for example.
But wait, there's more! Now add the following alias:
^(\d)(\d.*)
Make sure it is Regular Expression AND executes in a sequence BEFORE the first alias. Since the default Sequence is 100, you could give it a sequence of 90. Then give it the following text:
Execute("%1")
Execute("%2")
Now you can stack your digit aliases. For example, say you use:
1 kill Bill
2 kick
Now if you type 122222 the mud will receive
kill bill
kick
kick
kick
kick
kick
I'm sure you can come up with more creative examples. 314159265... is my instant "win in PK" alias. But I can't give away my secrets by telling you what each of those does...
Edited 1 time(s). Last edit at 12/08/2011 05:30PM by joecloud.