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


Joined: 07 Oct 2003
Posts: 2

PostPosted: Fri Jun 17, 2005 12:52 am   

Color script seems off
 
#CLASS {coloring}
#TRIGGER {Level:*~((*)~%~)} {}
#COND {(%d)~%} {
#if {%1<75 and %1>=50} {#CW high,green}
#if {%1<90 and %1>74} {#CW high,yellow}
#if {%1>89} {#CW high,red}
} {reparse}
#CLASS 0

Is the code BUT it only seems to check for the last if statement and turns all the others in the pattern yellow even if it doesn't match any of the statement someone help please?

spec list craft
Skills in crafter group:
Level: 2 baking ( 15%)
Level: 2 butchering ( 10%)
Level: 2 distilling ( 10%)
Level: 2 farming ( 17%)
Level: 2 fishing ( 0%)
Level: 2 glassblowing ( 10%)
Level: 2 lumberjack ( 10%)
Level: 2 pottery ( 10%)
Level: 2 tanning ( 10%)
Level: 2 waxcraft ( 10%)
Level: 2 weaving ( 10%)
Level: 5 fletching ( 0%)
Level: 5 leatherworking ( 10%)
Level: 5 metalworking ( 0%)
Level: 5 stoneworking ( 0%)
Level: 5 tailoring ( 9%)
Level: 5 woodworking ( 11%)
Level: 7 keycraft ( 0%)
Level: 10 armorsmith ( 0%)
Level: 10 blacksmith ( 0%)
Level: 10 mining ( 10%)
Level: 10 weaponsmith ( 0%)
Level: 15 herbalism ( 0%)
Level: 45 luthier ( 0%)
Level: 45 magecraft ( 0%)
Level: 53 gemcraft ( 0%)
Is what I'm trying to get color sorted(only on my other char) using what's in the ()'s
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Jun 17, 2005 1:13 am   
 
Here is a simple trigger to do it without all the extra weight of a reparse and fixes your <> errors, remember fixedwidth matching is your friend for fixed width output :P (fo future refrence MUD OUTPUT should be between code tags to preserve spacing). "Semi-tested Nexela seal of approval :p". This will color just the skill name, if you want to color the whole line then use #CW like you were instead of #PCOL in the value

Code:
#TR "skillColor" {Level: (&2)  (&19)~((&3)~%~)} {
#IF (%number("%3")>=50 AND %number("%3")<75) {#PCOL high,green %x2}
#IF (%number("%3")>=75 AND %number("%3")<90) {#PCOL high,yellow %x2}
#IF (%number("%3")>=90) {#PCOL high,red %x2}
}


EDIT: Fixed a cpl of mistakes
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
LadyWizard
Newbie


Joined: 07 Oct 2003
Posts: 2

PostPosted: Fri Jun 17, 2005 1:25 am   
 
Actually was just after percentage in ()'s colored still getting nada... I'm running the new 13a on XP service pack 2 and the MUD has it fixedwidth already just didn't show when posted. Original code I got from a friend who had done an addition trigger as well for spec points. Add to that suddenly seem to have perma stuck window from the winamp thing on the other board that I can't close and delete now
Reply with quote
demoneyoungblood
Apprentice


Joined: 16 Dec 2002
Posts: 114
Location: USA

PostPosted: Fri Jun 17, 2005 8:27 am   Here, a debugged and gauranteed working version.
 
Code:

#TR {Level: (&2)  (&18) ~((&3)~%~)}{
#IF (%3==100) {#pcol high,green %x3}
#IF (%3>=76 AND %3<=99) {#pcol green %x3}
#IF (%3>=51 AND %3<=75) {#pcol high,yellow %x3}
#IF (%3==50) {#pcol yellow %x3}
#IF (%3>=26 AND %3<=49) {#pcol high,red %x3}
#IF (%3>=0 AND %3<=25) {#pcol red %x3} }

There ya go. :)
_________________
-Demone YoungBlood
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