I was just wondering how you could make it so a wildcard could be the parname in a function. I tried this, but it didn't work:
What I want to have happen is that you can type, for example, 'l n', and "look north" will be sent instead.
If someone could help me, that'd be great.
The reason why I want it as a function, is because I have three of these things that use the same directional thing.
After a while, it just gets really repetitive. :(
<alias
match="^l(|ook) (n|ne|e|se|s|sw|w|nw|u|d|north|northeast|east|southeast|south|southwest|west|northwest|up|down)$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
function dir2 ("%1")
if "%2" == "n" then
dir = "north"
elseif "%2" == "ne" then
dir = "northeast"
elseif "%2" == "e" then
dir = "east"
elseif "%2" == "se" then
dir = "southeast"
...
end -- function
Send (look, " ", dir)</send>
</alias>
What I want to have happen is that you can type, for example, 'l n', and "look north" will be sent instead.
If someone could help me, that'd be great.
The reason why I want it as a function, is because I have three of these things that use the same directional thing.
After a while, it just gets really repetitive. :(