Trigger help?

Post Reply
Kanner
Posts: 6
Joined: Wed Nov 03, 2010 4:53 pm

Trigger help?

Post by Kanner » Thu Dec 09, 2010 6:20 pm

Hi, I'm pretty new to Mudlet and scripting and for my guild I have to be able to set a leader and grab the target that specific person calls for over our guild channel. I searched through the forum and the best that I could come up with is what's below but it's not working. Can someone help me out here?

I have two Aliases one sets my target and one sets the leader. I've echoed the commands so I know they work when I set them. They are "target" and "leader".

So for my trigger I have it set to perl regex and it looks like this:

^(Serenguard): (\w+) says, "Target (\w+)."\.$

And below I have:

if
matches[2] == leader
then
target = matches[3]
echo("Now targeting ".. matches[3] )
end

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Trigger help?

Post by Heiko » Thu Dec 09, 2010 8:23 pm

Your regex pattern is wrong. You need to escape all regex tokens e.g. \(Serenade\) instead of (Serenade).

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests