 |
Nim Newbie
Joined: 31 Aug 2004 Posts: 1
|
Posted: Tue Aug 31, 2004 4:32 am
Programming Help: Need help checking incoming trigger.. |
What I want to do is receive the data, and if inside the data the words "is here" or "are here" is not present, I want it to go into the next "state" of the trigger.
Any help on setting this up would be appreciated. |
|
|
 |
Falan Wanderer

Joined: 17 Aug 2004 Posts: 98 Location: OK, USA
|
Posted: Tue Aug 31, 2004 6:56 am |
More info would be nice. An example of your MUD output is always good stuff, too. If there is a standard text output to which you are referring, then you could #TR it and #NOOP. If you are trying to match a blank line, well, good luck.
|
|
_________________ zMUD 7.05a |
|
|
 |
Danlo Magician

Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Tue Aug 31, 2004 10:55 am |
Help pattern matching gives:
#Trigger {*{^is here|are here}} {}
#con {Next State} |
|
|
 |
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Tue Aug 31, 2004 11:47 am |
#TRIG {EXITS~: *} {}
#COND {^(*)$} {This_line='%1';#IF (%pos( "is here", @This_line) OR %pos( "are here", @This_line)) {EXECUTE CODE HERE} {}}
#COND {^Next pattern ;State 2 $}
A beginning trigger pattern (EXITS~: * was used in this example) should be used because the first condition (^(*)$) will match every line and will slow down your system if it is always active. |
|
|
 |
|
|