in your browser.
Weakaura all purpose power bar
Return to board index
I have been trying to make a all purpose power bar with weakauras that will change colour based on the resource type that the class Im playing has.
Below is what I am currently using however it has the problem what the r,g,b codes seems to be binary as in they are either on or off and there is no colour range which means that as it is now "Rage" with its code of 142,16,2 shows as grey and not a shade of red.
If anyone has a solution to fix this and add full colour range that would be fantastic.
local rage = UnitPower("Player", 1)
local _,PowerType = UnitPowerType("player")
local red, green, blue = 0,0,0
if PowerType == "RAGE" then
red, green, blue = 142,16,2
elseif PowerType == "MANA" then
red, green, blue = 0,0,1
elseif PowerType == "ENERGY" then
red, green, blue = 1,1,0
return red, green, blue, 1
solved, wa uses point float so 0-1 not 0-255.
also using conditions can achieve the same outcome and is much more simple.
You are not logged in. Please
to post a reply or
if you don't already have an account.
Connect with Wowhead
Other Fanbyte Sites
Hearthstone Top Decks
Final Fantasy XI
© 2021 Fanbyte