I am trying to set up an alias for healing
in my mud the command is heal <target> <amount of heal>
what i want to do is to be able to set up an alias so that i type hh BOB and I heal BOB for 200. I can't seem to get this to work because the variable appears in the middle of the send command. Can someone help?
help with alias
Re: help with alias
send("heal " .. matches[2] .. " " .. matches[3])
or
send(string.format("heal %s %s", matches[2], matches[3]))
or
send(string.format("heal %s %s", matches[2], matches[3]))
Re: help with alias
ok that worked BUT what i want to do is set the amount to 200 each time so I dont have to type that. and just type
heal target and have the amount set in the alias. Is that possible?
heal target and have the amount set in the alias. Is that possible?
Re: help with alias
send("heal " .. matches[2] .. " 200")
Re: help with alias
that's what i tried and it isn't working... my game is New Worlds Ateraan
pattern hh (.*)
and the send string as you have it above
pattern hh (.*)
and the send string as you have it above
Re: help with alias
you need to prefix the pattern with ^ othewise it'll fire on all hh sequences that you ever type
^hh (\w+)
send( "heal" .. matches[2] .. " 200" )
note the space before 200
^hh (\w+)
send( "heal" .. matches[2] .. " 200" )
note the space before 200
Re: help with alias
thanks! It's working now finally. it was the space and the (\w+) THANKS so much for the help