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


Joined: 26 Jun 2009
Posts: 13

PostPosted: Wed Oct 13, 2010 11:57 am   

coloring mud subbed output problem
 
ello,

recentry i'm trying to make my mud output more readable, and subbing some string, while doing some math on it, tho, i can change my sub string color as i would like to, i assume i just can't find right function, here is example trigger, simmilar i want to use:


Code:

<&* &*>
#var a %1
#var b %2
#var a %ansi(red)@a
#var b %ansi(blue)@b
#sub @a @b


tho, with %ansi i can use only ansi collors, #co and #cw allow me to change whole line, but not single word or number, is there any other function (%) that will allow me to color text/string/variable, whatever i want, using rgb/complex color names?

Thanks
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Oct 13, 2010 12:27 pm   
 
You could use MXP. It would be something like:
Code:
#SUB {%concat("<color red>",@a,"</color> <color blue>",@b,"</color>")}

With that, you can use any color name listed in the %colorname documentation. The basic syntax is just <color colorname>...</color>. You can shorten it to <c>...</c>. The curly braces {} and the %concat() parts are simply to ensure the string pieces are all put together explicitly, rather than the implicit concatenation you used.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Oct 14, 2010 6:56 pm   
 
#CW doesn't change the whole line...it just changes whatever text the trigger matches. You might also look at #PCOL. All CMUD color commands will accept complex/rgb colors.
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