Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Rycal
Newbie


Joined: 04 Jul 2008
Posts: 8

PostPosted: Fri Dec 26, 2008 1:30 am   

How to remove new line from gag?
 
I have this set for a trigger

Code:
^(%w) {@comm} '*'$


Which will capture something along the lines of:

Name narrates 'Awesome!'

Gag it, and send it to a communication window. It works rather well, the problem is, I keep getting new prompts everytime something is captured. Is there anyway to clean this up?

Better example below:

* HP:Healthy SP:Bursting MV:Fresh >
xxx narrates 'blahblasdf'

* HP:Healthy SP:Bursting MV:Fresh >
yyy chats 'anyone need draughts?'

* HP:Healthy SP:Bursting MV:Fresh >
zzz narrates 'fizzle is ne of cairhien'

Each of those narrates are gagged and sent to the comm window, however I still get the health prompt after each one in the main window, which results in a lot of:

* HP:Healthy SP:Bursting MV:Fresh >

* HP:Healthy SP:Bursting MV:Fresh >

* HP:Healthy SP:Bursting MV:Fresh >
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Dec 26, 2008 1:38 am   
 
So your packet is a blank line, a prompt, and then the line? Is there another prompt after the line you're trying to gag? If there is, then changing your #gag to #gag -2;#gag should be all you need. If the prompt BEFORE the line is the one you want to keep, though (because it's the most recent prompt and thus has the most recent stats), it's a bit more difficult.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Rycal
Newbie


Joined: 04 Jul 2008
Posts: 8

PostPosted: Fri Dec 26, 2008 2:31 am   
 
It's actually a prompt, the line, then a blank line, but what you suggested still worked out beautifully. Thanks very much!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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