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


Joined: 15 Jan 2014
Posts: 12
Location: Texas

PostPosted: Tue Apr 29, 2014 12:11 am   

Color help
 
So here's the deal. Basically, I want to match this pattern in my text, sub it in and have it say something else with a few colors mixed in. I have everything except the color figured out. I've only been able to figure out ansi colors. But I want more than 10 different colors.

<trigger priority="780" id="78">
<pattern>(*) is in good shape.</pattern>
<value>#SUB {%ansi(green)GOOD%ansi(white) - %ansi(green)GOOD%ansi(white) --=%ansi(yellow)%1%ansi(white)=-- %ansi(green)GOOD%ansi(white) --=%ansi(yellow)%1%ansi(white)=-- %ansi(green)GOOD%ansi(white) - %ansi(green)GOOD%ansi(white) - %ansi(cyan)%mud.hp}
</value>
</trigger>

Basically, I want to make the GOOD's some color, the %1's a different color and then my hp at the end something else. I just can't for the life of me figure out how to use #CW or #PCOL.
Reply with quote
ryblake
Beginner


Joined: 15 Jan 2014
Posts: 12
Location: Texas

PostPosted: Tue Apr 29, 2014 12:57 am   
 
If it matters at all, my mud does support mxp.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Wed Apr 30, 2014 7:46 pm   Re: Color help
 
ryblake wrote:
So here's the deal. Basically, I want to match this pattern in my text, sub it in and have it say something else with a few colors mixed in. I have everything except the color figured out. I've only been able to figure out ansi colors. But I want more than 10 different colors.

<trigger priority="780" id="78">
<pattern>(*) is in good shape.</pattern>
<value>#SUB {%ansi(green)GOOD%ansi(white) - %ansi(green)GOOD%ansi(white) --=%ansi(yellow)%1%ansi(white)=-- %ansi(green)GOOD%ansi(white) --=%ansi(yellow)%1%ansi(white)=-- %ansi(green)GOOD%ansi(white) - %ansi(green)GOOD%ansi(white) - %ansi(cyan)%mud.hp}
</value>
</trigger>

Basically, I want to make the GOOD's some color, the %1's a different color and then my hp at the end something else. I just can't for the life of me figure out how to use #CW or #PCOL.


Try using #MXP it supports all the colors in %colorname
Below is a set up I used to randimize colors for my status bar

Copy text into a text document and save as: color.xml
then use Cmud to import XML
type zz into your command lind and hit enter.
You should now see all the different colors and there names.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <alias name="zz">
    <value>#forall @StatsColor {#mxp %i ~#~#~#~#}
</value>
  </alias>
  <var name="StatsColor" type="StringList">
    <value>aqua|aquamarine|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkcyan|darkgoldenrod|darkgray|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gold|goldenrod|gray|green|greenyellow|hotpink|indianred|ivory|khaki|lavender|lawngreen|lemonchiffon|lightblue|lightcoral|lightgoldenrodyellow|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|mediumaquamarine|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|mintcream|mistyrose|moccasin|navajowhite|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|yellow|yellowgreen</value>
    <json>["aqua","aquamarine","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gold","goldenrod","gray","green","greenyellow","hotpink","indianred","ivory","khaki","lavender","lawngreen","lemonchiffon","lightblue","lightcoral","lightgoldenrodyellow","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","mediumaquamarine","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","mintcream","mistyrose","moccasin","navajowhite","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","yellow","yellowgreen"]</json>
  </var>
</cmud>
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere

Last edited by megamog75 on Thu May 01, 2014 4:32 am; edited 1 time in total
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Wed Apr 30, 2014 7:47 pm   
 
oh by the way, MXP works in Cmud and not with your Mud. So this should work no matter what
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Thu May 01, 2014 4:33 am   
 
OOOps! sorry bout that, I just caught a small error the first time I posted that code, I fixed it and it should be fine now.

Again sorry bout that.
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
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