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


Joined: 28 Jun 2004
Posts: 9

PostPosted: Mon Jun 28, 2004 9:23 pm   

Multiline Trigger
 
I am trying to set up a basic trigger for the following...when I type DIAG on of the following two cases can happen:

1) I am not afflicted with anything, in which case I get the following on a new line:
You are:

2) I am afflicted with one or more afflictions and get the following, this is just one example if I was freezing and blind.
You are:
Freezing
Blind

I want to set up a trigger to test the line FOLLOWING the "You are:" line...the test is simple, if the next line is my prompt then do nothing, if it's anything else, execute HEAL.

My prompt looks like this: 2113h, 1780m ex-

I can't figure out to execute a trigger based on more than 1 line, and conditional on the first line? Make sense???

Many thanks!!!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Jun 28, 2004 11:14 pm   
 
#TR "Diagnose" {^You are:$} {}
#COND {*} {#IF (%isnumber(%left(%line,1))) {#NOOP Got prompt} {heal}}
Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Mon Jun 28, 2004 11:54 pm   
 
You can't trigger on "You are:" or it'll also go off during GODFEELINGS.

Here's a clever trick, though. Instead of just doing DIAG ME, do DIAG ME and then CREDITS. Then trigger on the result of CREDITS, since it'll always come right at the end of the diagnosis.
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