from tintin to mudlet
Posted: Thu May 08, 2014 8:11 am
Hi
I decided to change my mud client to mudlet but I have some serious problem with finding simple wildcard replacement to %1 that was working great in tintin. I think the best way will be to show you an example.
Tintin:
#alias {ep} {enter %1portal}
It allows me to type just 'ep' sending "enter portal" to mud. I can also type 'ep 2.' to send "enter 2.portal".
In Mudlet I tried many options but I cant find anything that matches the above example. I tried the following:
Pattern:
^ep (\d?\D?)$
Code:
send("enter "..matches[2].."portal")
but it forces me to type space after ep, otherwise its not working.
Pattern:
^ep ?(\d?\D?)$
Code:
send("enter "..matches[2].."portal")
seemed to work just fine untill I tried to use some other alias with Pattern: ^epe (\w+)$ doing something different. Typing epe sends both aliases to mud.
I can't find any solution, could you please help me with that? I am sure there must be a simple answer to this, but I am lost and cant figure it out.
I decided to change my mud client to mudlet but I have some serious problem with finding simple wildcard replacement to %1 that was working great in tintin. I think the best way will be to show you an example.
Tintin:
#alias {ep} {enter %1portal}
It allows me to type just 'ep' sending "enter portal" to mud. I can also type 'ep 2.' to send "enter 2.portal".
In Mudlet I tried many options but I cant find anything that matches the above example. I tried the following:
Pattern:
^ep (\d?\D?)$
Code:
send("enter "..matches[2].."portal")
but it forces me to type space after ep, otherwise its not working.
Pattern:
^ep ?(\d?\D?)$
Code:
send("enter "..matches[2].."portal")
seemed to work just fine untill I tried to use some other alias with Pattern: ^epe (\w+)$ doing something different. Typing epe sends both aliases to mud.
I can't find any solution, could you please help me with that? I am sure there must be a simple answer to this, but I am lost and cant figure it out.