Woow, this is much harder then i excpected.
Code:
local frame = CreateFrame("FRAME", "RFFrame");
frame:RegisterEvent("UNIT_AURA");
local function eventHandler(self, event, ...)
end
local active = UnitBuff('player', 'Righteous Fury')
local hasrf
local function eventHandler(self, event, ...)
if not hasrf and active then
hasrf = true
print('Rigtheous Fury has been activated')
elseif hasrf and not active then
hasrf = false
end
frame:SetScript("OnEvent", eventHandler);
Is this right? (I guess not, but tried to do what you wrote)