Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
tkl1129
Beginner


Joined: 04 Jan 2010
Posts: 11

PostPosted: 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.
Reply with quote
Fizban1216
Apprentice


Joined: 03 Feb 2007
Posts: 170

PostPosted: Sat May 08, 2010 7:03 am   
 
Something like this should work:

#TRIG {~[(%w)~]} {#IF (%1 == chat OR %1 == rumor) {#capture %1}}
Reply with quote
tkl1129
Beginner


Joined: 04 Jan 2010
Posts: 11

PostPosted: 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...
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net