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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Nim
Newbie


Joined: 31 Aug 2004
Posts: 1

PostPosted: 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.
Reply with quote
Falan
Wanderer


Joined: 17 Aug 2004
Posts: 98
Location: OK, USA

PostPosted: 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
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Tue Aug 31, 2004 10:55 am   
 
Help pattern matching gives:

#Trigger {*{^is here|are here}} {}
#con {Next State}
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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