help with who expression

Post Reply
eldarok
Posts: 7
Joined: Sat Feb 13, 2010 10:10 pm

help with who expression

Post by eldarok »

trigger .*


Players
-------
[48 Cle] Voxdeus "Madam in Eden, I'm Adam."
[49 Thi] Kravdra "Are we not drawn onward, we few, drawn onward to new era?"
[46 Pir] Eldarok >|~MiDnIgHt~Machine~|<
[50 Cle] Zim >|~MiDnIgHt~Machine~|<

4 characters displayed.

debug window shows it catching and firing only on zim whys that?? I'm pretty sure its my perl regular expression that is at fault here. Any help please??

edit::

Not to worried about the persons title if there is a way to get just the players level and class in the brackets and there players name would be cool thanks

hempa
Posts: 48
Joined: Sat Jan 02, 2010 1:07 pm

Re: help with who expression

Post by hempa »

Is your trigger pattern .* and nothing else? Also, check to see so there are no spaces..

The regex to capture the line would be something like: ^\[(\d+)\s(\w+)\] (\w+)

If you're going to do a .* trigger, you might as well use a "Lua function" trigger and put in "return true" in the pattern. I'd advice against that though, unless you switch it off or use a gate.

eldarok
Posts: 7
Joined: Sat Feb 13, 2010 10:10 pm

Re: help with who expression

Post by eldarok »

I have a trigger that is set to enable the above trigger witch is showing in the debug that it is firing.


edit
i tried your sting didn't work.

hempa
Posts: 48
Joined: Sat Jan 02, 2010 1:07 pm

Re: help with who expression

Post by hempa »

Can you post a screenshot with your triggers on it? I'll give it a look and see how it can be captured properly.
You can also make a replay and post it, and I'll look at it.

eldarok
Posts: 7
Joined: Sat Feb 13, 2010 10:10 pm

Re: help with who expression

Post by eldarok »

Players
-------
[50 Cle] Zim >|~MiDnIgHt~Machine~|<
[47 Pir] Eldarok >|~MiDnIgHt~Machine~|<

2 characters displayed.
triggers Players
inside enabletrigger whocap
.* tried using this to get the lines perl regex
.d+ characters displayed trigger disabletrigger .*
nothing else special in the trigger themselves nothing clicked or changed except name pattern and string types everything else is default thanks

hempa
Posts: 48
Joined: Sat Jan 02, 2010 1:07 pm

Re: help with who expression

Post by hempa »

You need to set the first trigger to stay open until it hits the end. On the right hand, it's the "fire length". Set this to 100 or something on the gate trigger, and in the closing trigger use setTriggerStayOpen("nameOfGateTrigger",0) to make sure it won't fire further than that.

Post Reply