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


Joined: 28 May 2004
Posts: 9
Location: Canada

PostPosted: Fri May 28, 2004 5:35 pm   

Wanting a trigger, possible IF involved...
 
Hello, I'm new to zMUD and I'm slowly learning from scripts I'm already using, but I don't know how to do this:
For starters, I'm playing Achaea, if that makes any difference...
When I enter a certian room it give the title of the room as: "Forested lakeshore." (without quotes) and I wish that whenever I see that (therefore a trigger use) it performes the following action "perceive".
Achaea then shows: "You discern that this location is the Grove of ..." (usually more than 1 line).
IF that output from Achaea is a specific one (ie those ... are "Mr. T") I want it to display HOME!! In bright red letters.
To make things a bit more fun, I wish that Achaean output (you discern...) to be gagged.
Is this easy/hard and if anyone can help me, that would be wonderful!
Thanks!Smile
Reply with quote
xenapan
Wanderer


Joined: 26 May 2004
Posts: 68

PostPosted: Fri May 28, 2004 8:24 pm   
 
that doesnt seem very hard. i think that the first part is easy. a pattern matching trigger #tr {Forested lakeshore}{perceive} then the second trigger #tr {You discern that this location is the Grove of Mr. T} {#co red} try that and see how it works.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri May 28, 2004 8:33 pm   
 
#TR {^Forested Lakeshore} {perceive}
#TR {You discern that this location is the Grove of} {#GAG}
#TR {You discern that this location is the Grove of Mr. T} {#SUB %ansi( hi,red) HOME!!;#UNGAG}
Reply with quote
Zerboxx
Newbie


Joined: 28 May 2004
Posts: 9
Location: Canada

PostPosted: Fri May 28, 2004 10:52 pm   
 
I like how I make things more difficult for myself...
I put LightBulb's code in, and the first trigger is perfect, goes off without a hitch.
The 2nd and 3rd trigger there are some problems:
Anytime I type perceive it now gags that portion in the trigger, so I only want it to gag it when it runs the 1st trigger (so if I'm in another room, I can 'perceive', and it wont gag it).
Also the 3rd trigger I didn't understand much to be honest, the {#SUB...} portion had an error in it at the "( hi," bit. So I changed that section to to {#ECHO HOME!!;#UNGAG} thinking that it may work, but it didn't. Any ideas?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri May 28, 2004 11:50 pm   
 
Yes, I thought it was pretty stupid to gag all your perceives but it's the kind of mistake that doesn't take long to notice.
#TR {^Forested Lakeshore} {perceive}
#COND {You discern that this location is the Grove of} {#GAG} {Within|Param=1}
#TR {You discern that this location is the Grove of Mr. T} {#SUB {%ansi( hi,red) HOME!!};#UNGAG}
Reply with quote
Zerboxx
Newbie


Joined: 28 May 2004
Posts: 9
Location: Canada

PostPosted: Sat May 29, 2004 8:23 am   
 
Thanks LightBulb!
Works like a charm!
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