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
Malaphus
Novice


Joined: 11 Aug 2003
Posts: 34
Location: USA

PostPosted: Wed Aug 13, 2003 8:29 pm   

Some IF statements not working
 
This trigger fires whenever my score is displayed. I want it to show my current mana in green if it is greater than half of my max. I want it to show in yellow if it is less than half but greater than 10%. I want it to show in red if it is less than 10%. For some reason it is always showing in green, the first IF is always hitting, even when my mana is less than half. Can anybody help with this?



#VAR curMana %2
#VAR maxMana %3
#VAR theColor ""
#IF (@curMana >= (@maxMana * .5)) {
#VAR theColor "cg"
}
#IF (@curMana < (@maxMana * .5)) {
#VAR theColor "cy"
}
#IF (@curMana < (@maxMana * .1)) {
#VAR theColor "cr"
}
#VAR newMessage %concat( "cbMANA IScn: ", @theColor, @curMana, "~/cG", @maxMana)
say @newMessage
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Aug 13, 2003 11:38 pm   
 
#VAR curMana %2
#VAR maxMana %3
#VAR theColor ""
#IF (@curMana >= (@maxMana * 0.5)) {
#VAR theColor "cg"
}
#IF (@curMana < (@maxMana * 0.5)) {
#VAR theColor "cy"
}
#IF (@curMana < (@maxMana * 0.1)) {
#VAR theColor "cr"
}
#VAR newMessage %concat( "cbMANA IScn: ", @theColor, @curMana, "~/cG", @maxMana)
say @newMessage
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