Mudlet syntax

by Dysolis

Back to Mechanic's Corner.

Dysolis2011-10-26 06:02:15
I hate to bring up an old topic I had before but I am coming around more often and wondered how to do an old syntax for direction. For example CAST IGNITE AT .
Unknown2011-10-26 07:20:07
You mean to make an alias for it?

edit: changed .+ to \\w+ (habit of using .+ for many of my things, but both would work)

You'd do: ^nameOfAlias (\\w+) (\\w+)$

script would be..


send("cast ignite " .. matches .. " at " .. matches)


I'm actually not sure what you're looking for here, but I'm going to make a guess that both ice and briar end in wall (I'm not very PvP oriented). If that is the case, you'd want...


send("cast ignite " .. matches .. "wall at " .. matches)

also, forgot, if you don't want it to echo the command, use this instead
send("cast ignite " .. matches .. "wall at " .. matches, false)


So, you'd just type "nameOfAlias ice/briar direction" to use.

If you plan on making your own aliases in the future, a good start to this is knowing that all matches for your captures start at 2. matches will return the entire line. This is true for triggers and aliases both.
Dysolis2011-10-26 13:21:42
Thanks! I just had to change (\\w+) to (.*), that syntax made me remember what worked and I'm not exactly sure why your syntax didn't but the rest of it did.