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


Joined: 22 Sep 2004
Posts: 1

PostPosted: Wed Sep 22, 2004 4:28 am   

Color problem!
 
I made a trigger for

"You receive %d experience."
#CW %d #0033FF

and now EVERY number that pops up on my mud is blue. :(
I understand where I went wrond, but I don't know how to rectify it, I can easily change it to a new color, but I need it to be the default color of the mud, ie. different colors for different numbers...

I know it's a newb question, but please give me a hand. :)

-Omaw
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Sep 22, 2004 12:30 pm   
 
Type this at the command line and hit enter

#UNTRIGGER %d

#CW is not the command you want to use to color JUST the number
Also it would be to your advantage to read the pattern matching help file, AND The help file for #CW
There are two ways to handle this one is with a #SUB
The other is a Conditonal reparse trigger

#TR {You recieve (%d) experience.} {#SUB {You recieve %ansi(hi,blue)%1%ansi(default) experience.}}

OR

#TR {You recieve %d experience.} {}
#COND {%d} {#CW $0033FF} {reparse}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Sep 22, 2004 6:54 pm   
 
How about #PCOL?
#TR {You recieve (%d) experience.} {#PCOL $0033FF %x1}

If you want different colors for different numbers, you'll have to use #IF or %if to get different commands or values. We have no idea what the default colors for your MUD are, or why, if they are the default colors of your MUD, you couldn't just use them without any trigger at all! If the MUD already makes these numbers the colors you want them to be, this seems like a complete waste of time!!
#TR {You recieve (%d) experience.} {#IF (%1 < 5) {#PCOL $FF3300 %x1} {#PCOL $0033FF %x1}}
#TR {You recieve (%d) experience.} {#PCOL %if( %1 < 5, $FF3300, $0033FF) %x1}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Sep 23, 2004 1:41 am   
 
One of these days I will remember #PCOL Exists :P
_________________
Zmud Support Library
Zmud Knowledge Base
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