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


Joined: 16 Sep 2001
Posts: 10

PostPosted: Tue Mar 19, 2002 4:49 am   

Gag Command
 
I've got a gag command: #GAG The Torch of Eternal Scintillation crackles with the light of justice.

I was wondering if theres any way to gag that line but not receive a blank line.

Thanks.
Reply with quote
dracx
Beginner


Joined: 14 Oct 2000
Posts: 26
Location: USA

PostPosted: Tue Mar 19, 2002 7:21 am   
 
If you want to gag all blank lines, use this.

#TR {$} {#GAG}

If you want to gag the blank lines surrounding a pattern, try something like this.

#TR {pattern} {#gag -1;#gag}

I think that might work... but the fist is probably more effective and more graceful.

Dracx
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Mar 19, 2002 1:23 pm   
 
I believe that this also works:
#TRIGGER {pattern$} {#GAG}

Kjata
Reply with quote
dracx
Beginner


Joined: 14 Oct 2000
Posts: 26
Location: USA

PostPosted: Tue Mar 19, 2002 4:46 pm   
 
Yep, that works too, if he matches all the way to the end of the line.
(which is probably a good idea).

Dracx
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Mar 23, 2002 7:10 am   
 
quote:

I believe that this also works:
#TRIGGER {pattern$} {#GAG}

Kjata



Would this happen to be a mud/machine-specific issue? I haven't much of a clue, since a blank-line trigger gets gagged correctly but all other triggers seem to ignore the return character no matter what I try (short of multiple gag commands).

li'l shmoe of Dragon's Gate MUD
Reply with quote
malathion
Beginner


Joined: 23 Jul 2004
Posts: 20

PostPosted: Sat Mar 18, 2006 2:17 am   
 
[quote="Kjata"]I believe that this also works:
<b>#TRIGGER</b> {pattern$} {<b>#GAG</b>}

Kjata[/quote]
Doesn't seem to work for me. On Aardwolf I get spammed constantly with blank lines if I do this. :( Right now I am gagging all blank lines, but I don't want to do that if I don't have to. Any ideas?
Reply with quote
Cbisazza
Wanderer


Joined: 27 Feb 2003
Posts: 69
Location: Australia

PostPosted: Sat Mar 18, 2006 8:25 pm   
 
I use gag a lot, and don't have any problems with it. It does not insert a blank line, it just removes the last line that you have in the window (as opposed to the last line received).

One thing I found useful was experimenting with it offline (using #SAY and #GAG).

What I suspect is that you are getting an extra blank line from the MUD, just to format this text properly. That is:

^$ <--- extra 'blank' line to separate the line you want gagged from the rest of the text
^Line You want gagged.$

When you gag the text, you're just left with the extra line. If this is the case, just add another #gag and see how it works.
_________________
Chris.
Reply with quote
nabob
Beginner


Joined: 01 Aug 2004
Posts: 10

PostPosted: Sat Jun 02, 2007 1:51 pm   
 
Hi. I'm scratching my head.

I have a trigger to gag out the timer now at message. It does not gag the line.

I tried deleting and remaking the trigger in a different folder etc.

Turning off 'informational messages' is not an option.

Any ideas? Please?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4682
Location: Pensacola, FL, USA

PostPosted: Sat Jun 02, 2007 5:51 pm   
 
you could turn the information messages text color to match your background.... but then it would appear like a blank line even though its not
_________________
Discord: Shalimarwildcat
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Jun 02, 2007 7:51 pm   
 
Hmmm, sounds like the trigger isn't firing (did you try putting in an echo statement to confirm) or that you that the text you capturing also has several lines in it.

Also the GAG command takes an optional number as argument.

The default is 0 which gags the current line.
#GAG -2, will gage the previous 2 lines.
#GAG 3 will gag the next 3 lines.

Try that and see if it helps.
_________________
Asati di tempari!
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