i have this weak aura that show a colored text for my tbc hunter rotation based on my…
- User
i have this weak aura that show a colored text for my tbc hunter rotation based on my attackspeed, i want to make a new aura, a square shape that change color based on the suggested rotation of the first aura. here is the code of my first aura: function()
local attackSpeed = UnitRangedDamage("player") if attackSpeed > 2.33 then return "|cff".."ff0000"..("5:4:1:1\n%.2f"):format(attackSpeed) -- Above 2.33, use French 5:4:1:1 elseif attackSpeed > 1.95 then return "|cff".."9900cc"..("5:5:1:1\n%.2f"):format(attackSpeed) -- Between 2.33 and 1.95, use French 5:5:1:1 elseif attackSpeed > 1.74 then return "|cff".."993300"..("5:6:1:1\n%.2f"):format(attackSpeed) -- Between 1.95 and 1.74, use French 5:6:1:1 elseif attackSpeed > 1.27 then return "|cff".."0066ff"..("1:1\n%.2f"):format(attackSpeed) -- Between 1.74 and 1.27, use 1:1 elseif attackSpeed > 1.09 then return "|cff".."ff00ff"..("5:9:1:1\n%.2f"):format(attackSpeed) -- Between 1.27 and 1.09, use 5:9:1:1 elseif attackSpeed > 0.90 then return "|cff".."808080"..("2:3\n%.2f"):format(attackSpeed) -- Between 1.09 and 0.90, use 2:3 elseif attackSpeed > 0.70 then return "|cff".."ff9900"..("1:2\n%.2f"):format(attackSpeed) -- Between 0.90 and 0.70, use 1:2 elseif attackSpeed > 0.57 then return "|cff".."cccc00"..("2:5\n%.2f"):format(attackSpeed) -- Between 0.70 and 0.57, Use 2:5 elseif attackSpeed < 0.57 then return "|cff".."00ff00"..("1:3\n%.2f"):format(attackSpeed) -- Below 0.57, Use 1:3 endend
- Assistant
To create a new WeakAura that displays a square shape that changes colors based on the suggested rotation from your first aura, you can utilize the same logic you used for determining the attack speed but modify it to return color information for the background of the square.