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
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Thu Aug 11, 2005 2:18 am   

#PSUB and color
 
Is there any way to add color within a #PSUB? I've tried using %ansi and <color=red>, but neither gets expanded.
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Aug 11, 2005 2:21 am   
 
%ansi works for me

#PSUB {%ansi(red)This is red!} %x1
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Thu Aug 11, 2005 2:28 am   
 
Hrmm... maybe it was my having it within an %if statement then? Here's the actual trigger:



#TRIGGER {IronWood - (&03)$} {
#IF (@woodnums.ironwood = %eval( %1)) {#CW green} {#CW Red}
#IF (@CurrentCraft="Woodcutter") {#HIGHLIGHT}
#VARIABLE woodnums.ironwood %eval( %1)
#PSUB {%1 : %if(@woodnums.total=%eval( @woodnums.pine+@woodnums.cedar+@woodnums.redwood+@woodnums.oak+@woodnums.ironwood),"%ansi(green)","%ansi(red)")Total: %eval( @woodnums.pine+@woodnums.cedar+@woodnums.redwood+@woodnums.oak+@woodnums.ironwood)} %x1
#VARIABLE woodnums.total {%eval( @woodnums.pine+@woodnums.cedar+@woodnums.redwood+@woodnums.oak+@woodnums.ironwood)}
} "" {case}


This gives, when triggered:

Code:

%ansi(green)Total: 67


Rather than changing the color, it just puts the ansi in there verbally
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Thu Aug 11, 2005 4:09 am   
 
nvm, figured it out. Can't have the "" around the %ansi
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
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