This is further to a forum post about how to make an alias "like Tintin".
If you add this alias to your world, you can type something like:
What this will do is create another alias, which matches on "h" and sends 'cure light'.
However it also allows for an optional player name, eg. "h nick", and then it sends "cast 'cure light' nick".
The alias is created with the same name as the matching string (eg. an alias "h" will be named "h") so that you can easily replace an existing one, in case you change what "h" is going to send.
This alias is scripted in Lua, you would need to enable scripting and set the script language to Lua. If you are using VBscript or some other language the alias will be the same, and you need to rework the script syntax slightly.
If you add this alias to your world, you can type something like:
#alias {h} {cast 'cure light'}
What this will do is create another alias, which matches on "h" and sends 'cure light'.
However it also allows for an optional player name, eg. "h nick", and then it sends "cast 'cure light' nick".
<aliases>
<alias
match="^\#alias \{(?P<match>[A-Za-z]+)\} \{(?P<send>.+)\}$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>do
local result =
AddAlias ("%<match>", "^%<match>(?P<target> [A-Za-z]{1,}){0,1}$",
"%<send>%%<target>",
alias_flag.Enabled +
alias_flag.RegularExpression +
alias_flag.Replace,
"")
if result ~= error_code.eOK then
ColourNote ("white", "red", error_desc [result])
else
ColourNote ("white", "green",
"Alias '%<match>' added which sends '%<send>'")
end -- if
end -- do</send>
</alias>
</aliases>
The alias is created with the same name as the matching string (eg. an alias "h" will be named "h") so that you can easily replace an existing one, in case you change what "h" is going to send.
This alias is scripted in Lua, you would need to enable scripting and set the script language to Lua. If you are using VBscript or some other language the alias will be the same, and you need to rework the script syntax slightly.