Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. if not cTar
  2. then
  3. cTar = {"target", "focus", "mouseover", "arena1", "arena2", "arena3"}
  4. end
  5.  
  6. AutoOverpower = CreateFrame("Frame", "AutoOverpower", UIParent);
  7. AutoOverpower:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
  8. AutoOverpower:SetScript("OnEvent", function(self, event, arg1, arg2, ...)
  9. if(event=="COMBAT_LOG_EVENT_UNFILTERED") then
  10. local spell, _, _, _, _, endTime, _, _, interrupt = UnitCastingInfo("target") or UnitChannelInfo("target")
  11. if spell then
  12. if interrupt == false then
  13. local enabled = GetSpellCooldown("Overpower")
  14. if enabled == 0 then
  15. for i=1, #cTar do
  16. inRange = IsSpellInRange("Overpower", "target")
  17. if inRange==1 then
  18. if not UnitBuff("target", "Divine Shield") then
  19. CastSpellByName("Overpower", cTar[i])
  20. end
  21. end
  22. end
  23. end
  24. end
  25. end
  26. end
  27. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement