Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. local y = CreateFrame("Frame")
  2. y:RegisterEvent("PLAYER_ENTERING_WORLD") -- look below
  3. -- y:RegisterEvent("ZONE_CHANGED") -- not sure if this is needed or if it works best with PLAYER_ENTERING_WORLD :shrug:
  4. y:SetScript("OnEvent", function(self, event, ...)
  5. local _,p=IsInInstance()
  6. if p=="arena" then
  7. EditMacro("Horror1", "Horror1", nil, "#show Psychic Horror\n/stopcasting\n/use [@arena1] Psychic Horror;", 1, 1);
  8. EditMacro("Horror2", "Horror2", nil, "#show Psychic Horror\n/stopcasting\n/use [@arena2] Psychic Horror;", 1, 1);
  9. EditMacro("Horror3", "Horror3", nil, "#show Psychic Horror\n/stopcasting\n/use [@arena3] Psychic Horror;", 1, 1);
  10. else
  11. EditMacro("Horror1", "Horror1", nil, "#show Psychic Horror\n/stopcasting\n/use [@target] Psychic Horror;", 1, 1);
  12. EditMacro("Horror2", "Horror2", nil, "#show Psychic Horror\n/stopcasting\n/use [@focus] Psychic Horror;", 1, 1);
  13. EditMacro("Horror3", "Horror3", nil, "#show Psychic Horror\n/stopcasting\n/use [@targettarget] Psychic Horror;", 1, 1);
  14. end;
  15. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement