That's not really my problem, I didn't explain it properly when a rune is energized RUNE_POWER_UPDATE fires twice as I said but it's only the first time isEnergized is true, the second time it's nil and it's that second that I thought put the alpha back. But I modified what you said to:
Code:
elseif event == "RUNE_POWER_UPDATE" and InCombatLockdown() and not UnitInVehicleControlSeat("player") then
local runeIndex, isEnergize = ...
if isEnergize == true then
G["RuneButtonIndividual"..runeIndex]:SetAlpha(RHaic)
lastAlpha = GetTime()
elseif lastAlpha+1 < GetTime() then
if GetRuneCooldown(1) > 0 then
RuneButtonIndividual1:SetAlpha(RHaoc) else
RuneButtonIndividual1:SetAlpha(RHaic)
end
if GetRuneCooldown(2) > 0 then
RuneButtonIndividual2:SetAlpha(RHaoc) else
RuneButtonIndividual2:SetAlpha(RHaic)
end
if GetRuneCooldown(3) > 0 then
RuneButtonIndividual3:SetAlpha(RHaoc) else
RuneButtonIndividual3:SetAlpha(RHaic)
end --Cooldown fading
if GetRuneCooldown(4) > 0 then
RuneButtonIndividual4:SetAlpha(RHaoc) else
RuneButtonIndividual4:SetAlpha(RHaic)
end
if GetRuneCooldown(5) > 0 then
RuneButtonIndividual5:SetAlpha(RHaoc) else
RuneButtonIndividual5:SetAlpha(RHaic)
end
if GetRuneCooldown(6) > 0 then
RuneButtonIndividual6:SetAlpha(RHaoc) else
RuneButtonIndividual6:SetAlpha(RHaic)
end
end
And it still won't change the alpha so I might have been completely wrong, this is the whole lua file:
http://www.pastey.net/141593
And I need some help in figuring out what the hell is wrong 'cause I'm out of ideas.