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


Joined: 26 Jun 2003
Posts: 2

PostPosted: Thu Jun 26, 2003 7:55 pm   

Noob question on #gag
 
OK well when trying to gag out multiple lines of text, I'm still getting blank line feeds; about half the lines of the text I'm gagging. I was wondering if there was a way to get rid of them. I'm using zmud 6.16. I've tried reading other posts on the subject, but can't fix it.

example:
#TRIGGER {Silver threads of light surround} {#gag}

Silver threads is a group spell that appears multiple times depending on the size of the party. So if I have it gag out ten lines, five blank lines are still feeding in. Now I don't want to get rid of every blank line, just those.

TNX!
'Tina, nother player of Dragon's gate.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jun 26, 2003 10:57 pm   
 
Do those lines all come at one time, or are they double-spaced like normal mud output (between commands and the like)? If the original output is double-spaced, what's really happening is the matching line (and it's return character) is getting gagged out but nothing is handling that extra blank line.

Since it's a variable amount of lines, you're best bet is to use a blank-line trigger like so:

#trigger "tBlankLine" {^$} {#gag;#T- tBlankLine}

and anywhere you want to remove a blank line just follow your #gag with #T+ eBlankLine:

#TRIGGER {Silver threads of light surround} {#gag;#T- tBlankLine}

In other cases where you know the specific set/order of lines (ie, room output, arrival messages, etc), this becomes doubly easier in versions after 6.40 because you can specify the exact sequence with multi-state triggers.
Reply with quote
Mahtina
Newbie


Joined: 26 Jun 2003
Posts: 2

PostPosted: Fri Jun 27, 2003 3:08 am   
 
Thanks Matt! That's exactly what I was looking for. :P

Me
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