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
morinaga
Newbie


Joined: 28 Jul 2004
Posts: 2

PostPosted: Wed Jul 28, 2004 5:57 pm   

carriage returns for triggers with multi-line patterns
 
I've done a search of the forum and the best I can find is using the $ symbol for waiting for the end of the text? I awfully confused. Here's what I'm looking to do.

Patter in the MUD:

Someguy has fled!
Someguy rides east.


What I would like to do is trigger an action based off the direction they fled. So after seeing said text I would like to:

east; bash Someguy.

I have a variable set up to name Someguy @prey. So I don't need to capture his/her name in the trigger. I simply need to capture the direction. The caveat is that you will see people ride, walk, crawl, fly in various directions all the time. So the trigger would need to only engage when it's directly proceeded by @prey has fled!. When I'm using the zmud pattern line I don't know how to simulate the carriage return for the next line of @prey rides east. Last, since people walk, fly, crawl, ride the trigger will have to ignore that word.

I think I could get it to work if I could simply figure out how to get two lines of text in the pattern. (I think).

Thanks for any help you may provide.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Jul 28, 2004 6:21 pm   
 
As it says in the Pattern Matching helptopic.
Quote:
To match multiple lines include $ in the middle of the pattern to match the line boundary.

#TR {@prey has fled$@prey %w (%w)} {%1;bash @prey}

This can also be done with a multistate trigger, which Zugg says is much faster for processing.
#TR {@prey has fled} {#NOOP}
#COND {@prey %w (%w)} {%1;bash @prey} {Within|Param=1}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
morinaga
Newbie


Joined: 28 Jul 2004
Posts: 2

PostPosted: Wed Jul 28, 2004 6:24 pm   
 
LightBulb wrote:
As it says in the Pattern Matching helptopic.
Quote:
To match multiple lines include $ in the middle of the pattern to match the line boundary.

#TR {@prey has fled$@prey %w (%w)} {%1;bash @prey}

This can also be done with a multistate trigger, which Zugg says is much faster for processing.
#TR {@prey has fled} {#NOOP}
#COND {@prey %w (%w)} {%1;bash @prey} {Within|Param=1}


Thank you very much. I'm still uncertain how I missed this in the help files.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Wed Jul 28, 2004 10:39 pm   
 
The help files contain a lot of information. If you can suggest a better way of organizing it; to make it easier for new user to find stuff then I want to know.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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