Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not cTar
- then
- cTar = {"target", "focus", "mouseover", "arena1", "arena2", "arena3"}
- end
- AutoOverpower = CreateFrame("Frame", "AutoOverpower", UIParent);
- AutoOverpower:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
- AutoOverpower:SetScript("OnEvent", function(self, event, arg1, arg2, ...)
- if(event=="COMBAT_LOG_EVENT_UNFILTERED") then
- local spell, _, _, _, _, endTime, _, _, interrupt = UnitCastingInfo("target") or UnitChannelInfo("target")
- if spell then
- if interrupt == false then
- local enabled = GetSpellCooldown("Overpower")
- if enabled == 0 then
- for i=1, #cTar do
- inRange = IsSpellInRange("Overpower", "target")
- if inRange==1 then
- if not UnitBuff("target", "Divine Shield") then
- CastSpellByName("Overpower", cTar[i])
- end
- end
- end
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement