Hey Everyone I have this code that will change the color on a bar in weakauras for a cooldown depending where you set the warning time at. I was able to get this code working for Mind Blast, SW: D, & Shadowfiend
so far but for some reason it will not work for Cascade. There are also a few other spells I can't get it to work with yet like Vampiric Embrace, or Desperate Prayer. Anyone know how to get it to work for Cascade for now? If you can get it to work for the other spells I posted here that would be awesome and save me a lot of time of trying to figure out how it works.
Lua Code:
function(progress, r1, g1, b1, a1, r2, g2, b2, a2)
local start, duration, enable = GetSpellCooldown ("Mind Blast")
local warning_time = 3
local progress = start + duration - GetTime()
if start>0 then
if progress < warning_time then
return r2, g2, b2, a2
end
end
return r1,g1,b1, a1
end
So here's the code that's works for Mind Blast as is but won't work for Cascade after changing the spell name.