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


Joined: 28 Jan 2012
Posts: 3

PostPosted: Sat Feb 18, 2012 2:50 pm   

Retaining original colors with #PSUB
 
How do you retain colors when using #PSUB?

#TRIGGER {(%w) tells you} {#PSUB {[%1]} %x1}

This will strip the original MUD colors.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Feb 18, 2012 4:26 pm   
 
You need to use an ANSI trigger, which means you need to also include the ansi colorcode pattern to match.

#trigger {(%e[36m%w) tells you}...

If tell color is configurable, you can use wildcards instead of literal colorcodes:

#trigger {(%e[[%d;]m%w) tells you}...
_________________
EDIT: I didn't like my old signature
Reply with quote
ililili
Newbie


Joined: 28 Jan 2012
Posts: 3

PostPosted: Sun Feb 19, 2012 3:36 am   
 
How do you prevent PSUB/SUB from removing the carriage return for an entire line? It's wrapping the next line for me.
Reply with quote
shalimar
GURU


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

PostPosted: Sun Feb 19, 2012 2:03 pm   
 
you use a trigger state for any additional lines
_________________
Discord: Shalimarwildcat
Reply with quote
ililili
Newbie


Joined: 28 Jan 2012
Posts: 3

PostPosted: Mon Feb 20, 2012 12:15 am   
 
Can you explain a bit more? I want to treat each line individually, regardless of what other lines come after it.
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