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


Joined: 10 Nov 2002
Posts: 5

PostPosted: Sat Nov 23, 2002 9:54 pm   

Tiggering off two lines.. one action
 
You are in area : The Dwarven Kingdom
Area created by : Valkur
Level range is : 10 to 80
Players near you:
Kalos Passport Master's Office

The above text comes up whenever you type where, I want to get a trigger to capture two different lines of that responce but in one trigger.
the two lines I want are "You are in area : The Dwarven Kingdom " ("the dwarven kingdom" or whatever text comes up would be in a wildcard so I can bring it up in the value of the trigger)
and "Kalos Passport Master's Office" (the "passport masters office" or whatever comes up would also be a wildcard to bring up in the same value)
The value I want from the result would bring up both wildcards in something like
you are in %1 in the %2
Reply with quote
trotterz
Newbie


Joined: 23 Nov 2002
Posts: 2
Location: United Kingdom

PostPosted: Sat Nov 23, 2002 10:47 pm   
 
Only way i can see to do this would be to assign the fisrt line to a variable ans use that in a trigger running off the last line you want to trigger off.

so a trigger somthing like : -

You are in area :%s(%*)

asnd assign that to a variable : -
#VAR AREA %1

then a second trigger for your next line with the output being -

you are in @LOCATION in the @AREA

not sure exactly how to implement it without knowing your particular mud output.

Hope that helps
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Nov 24, 2002 2:01 am   
 
#TR {You are in area : (*)$* : *$ * : *$*:$Kalos (*)} {#say You are in area %1 in the %2}

Of course, it will only work if yours is the first name after "Players near you:", but you insisted it be a single trigger. A better approach uses two triggers, a class, and an alias.

#AL {whereami} {#T+ Where;where}
#CLASS Where disable
#TR {You are in area : (*)} {#VAR area {%1}}
#TR {Kalos (*)$} {#SAY {You are in area @area in the %1};#T- Where}
#CLASS 0
#T- Where

LightBulb
Senior Member
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