|
qdly Beginner
Joined: 26 Jun 2009 Posts: 13
|
Posted: 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 |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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.
|
|
|
|
|
|
|
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
|
|