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
Risca
Beginner


Joined: 19 Nov 2003
Posts: 16
Location: USA

PostPosted: Mon Feb 28, 2005 8:49 pm   

Condense similar text
 
I would like to condense the 'Your pipe has gone cold and dark.' message into one, instead of 12 messages.


H:306 M:397 E:1431 W:1885 <eb db>
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
Your pipe has gone cold and dark.
H:306 M:397 E:1432 W:1885 <eb db>



-------------------------------------------------------------------------------

Is it also possible to do the same for an output such as this, between prompts. This is part of an alias that attempts to find the first empty pipe.

The pipe is full.
H:306 M:397 E:1431 W:1885 <eb d>
The pipe is full.
H:306 M:397 E:1431 W:1885 <eb d>
The pipe is full.
H:306 M:397 E:1431 W:1885 <eb d>
The pipe is full.
H:306 M:397 E:1431 W:1885 <eb d>
The pipe is full.
H:306 M:397 E:1431 W:1885 <eb d>
The pipe is full.
H:306 M:397 E:1431 W:1885 <eb d>
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Mon Feb 28, 2005 9:21 pm   
 
#trigger {^The pipe is full.$} {#gag}
will remove ALL lines that read "The pipe is full."

#trigger PipeOut {^Your pipe has gone cold and dark.$} {#sub Your pipe has gone dark and cold~!;PipeCt=2;#T+ PipeOn;#T- PipeOut}
#trigger PipeOn {^Your pipe has gone cold and dark.$} {#if @PipeCt=11 {#gag;#T+ PipeOut;#T- PipeOn} {#add PipeCt 1;#gag}}

This should do the trick, I have nottested this but it seams to work in my head. If you have problems let me know
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
Maelstrom
Apprentice


Joined: 10 Feb 2005
Posts: 158

PostPosted: Mon Feb 28, 2005 10:27 pm   
 
Or, as an alternative, this one will also do the trick. Works on any number of lines but they have to come through one after the other as shown listed... any breaks in the incoming text will allow another one to show so the one from megamog75 might be prefered...

#TRIGGER {^(Your pipe has gone cold and dark.)$} {#if (%line2 =~ "%1") {#gag}} {case|notrig}
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