Need some help with aliases. (SOLVED)

Post Reply
InsanityMG
Posts: 7
Joined: Tue Oct 29, 2013 1:11 pm

Need some help with aliases. (SOLVED)

Post by InsanityMG »

I just recently moved over to mudlet, I need some assistance with aliases.

The problem is that when I create certain aliases, they are interferring with in game commands.
for example:
Alias pattern: Cure Light
pattern: ^cl(.*)$
send("c 'cure light'" .. matches[2])

when I type clan gohall (which is an in game command) it outputs : c 'cure light'an gohall

This happens on multiple commands that I use, such as there is a skill in game called feign love, I use FL for an alias. This alias interfers with the "flee" command in game.

I was simply changing the aliases, but now it has become a situation where I have most of my settings recreated under mudlet, and a lot of them interfer with other in game commands.

Is there a solution for this?
Last edited by InsanityMG on Wed Oct 30, 2013 12:24 am, edited 1 time in total.

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: Need some help with aliases.

Post by demonnic »

I recommend using a space between cl and the thing you want to cure.

^cl (.*)$

Otherwise, any line which starts with cl will be picked up by the alias, as demonstrated with your 'clan gohall' .Same with fl and flee, if fl requires a target, putting a space between the target and the fl will keep it from picking up on 'flee'. If no argument is needed, you can just anchor it to both the beginning and end of the line.. ^fl$.

InsanityMG
Posts: 7
Joined: Tue Oct 29, 2013 1:11 pm

Re: Need some help with aliases.

Post by InsanityMG »

That was originally what I was doing, but by doing that I have to create two triggers, one for targetting and one for self. Since by using the ^cl (.*)$ and just typing CL will not c 'cure light" it requires a target. So should I stick with two aliases per alias where needed?
I need the alias to cl = c 'cure light'
and cl (target) c 'cure light' (target) without interfering with in game commands.
thanks

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: Need some help with aliases.

Post by demonnic »

^cl( .*)?$ would do what you want, I think. Then you would do:
Code: [show] | [select all] lua
if matches[2] then
  send("c 'cure light'" .. matches[2])
else
  send("c 'cure light'")
end
Essentially, this alias will fire either on a line which contains -only- 'cl' without the '', or one which is 'cl <anything else at all'. It will require that space to be in there, so that it won't pick up on other commands (like "clan gohall").

InsanityMG
Posts: 7
Joined: Tue Oct 29, 2013 1:11 pm

Re: Need some help with aliases.

Post by InsanityMG »

Thank you, I will try that and let you know if it works!

InsanityMG
Posts: 7
Joined: Tue Oct 29, 2013 1:11 pm

Re: Need some help with aliases.

Post by InsanityMG »

That works for both, but when I type clan gohall it still gives me: c 'cure light'an gohall.

InsanityMG
Posts: 7
Joined: Tue Oct 29, 2013 1:11 pm

Re: Need some help with aliases.

Post by InsanityMG »

Nevermind, I'm wrong it worked! I didn't add the ? mark the end, thank you so much for your help!

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: Need some help with aliases.

Post by demonnic »

You're quite welcome. Always happy to help.

Post Reply