|
tkl1129 Beginner
Joined: 04 Jan 2010 Posts: 11
|
Posted: Sat May 08, 2010 5:00 am
#cond ( Rephase trigger } Problem |
Hi all,
I don't know it is bug or not, just an example, I want to capture the chat channel in different windows
[Chat] tkl: hello
[Rumor] tkl: Hello
Trigger:
Main pattern: ~[(%w)~]
cmds: {}
Cond 1:
Rephase : Chat
cmds : #capture chat
Cond 2:
Rephase : Rumor
cmds: #capture rumor
Suppose it should be capture to right window, as I make this base on the help file. but, the scenario was not.
when this sentence out
[party] tkl: I'm Chat !
The word within " [ ] " was not "Chat", but the "Chat" is appear in same line, the trigger still fired
this sentence was captured into the "Chat" Window....
Is that a bug?..or just I use the function not probarly? I think it's would base on (%w)...not the word outside...
Thanks. |
|
|
|
Fizban1216 Apprentice
Joined: 03 Feb 2007 Posts: 170
|
Posted: Sat May 08, 2010 7:03 am |
Something like this should work:
#TRIG {~[(%w)~]} {#IF (%1 == chat OR %1 == rumor) {#capture %1}} |
|
|
|
tkl1129 Beginner
Joined: 04 Jan 2010 Posts: 11
|
Posted: Sat May 08, 2010 7:49 am |
yes..sure, but that is old method, I just concern about the "rephase trigger" :P
becoz I want to use that to make more complex trigger which may have many string...but unfortunlly...the pattern all are chinese...
so it cannot work well if save in $vareriables... |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Sat May 08, 2010 11:55 pm |
What do you mean by "rephase trigger"? Do you mean reparse?
If that's what you mean, then no, it is not a bug. Reparse means it will run the condition on the entire original line, so of course condition 1 will fire if Chat is in the line. You really don't want to do this in a multistate trigger. It will work much better as a single state trigger. What are you trying to add to this "more complicated trigger" that precludes handling this part in the main trigger state? |
|
|
|
|
|