Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | None | 0 0
  1. local msg = "%s: %s (%s)"
  2. Interrupt = CreateFrame("Frame", nil, UIParent);
  3. Interrupt:RegisterEvent("PLAYER_LOGIN");
  4. Interrupt:RegisterEvent("PARTY_MEMBERS_CHANGED");
  5. Interrupt:SetScript("OnEvent", function(self, event, subEvent, sourceGUID, _, _, _, destName, _, _, spellName, _, _, extraSkillName)
  6. self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
  7.     if event == "PLAYER_LOGIN" then
  8.         playerGuid = UnitGUID("player");
  9.     else
  10.         if subEvent == "SPELL_INTERRUPT" then
  11.             local text = msg:format(spellName, extraSkillName, destName);
  12.             if event == "PARTY_MEMBERS_CHANGED" then
  13.                 local n = GetNumPartyMembers();
  14.                 if n > 5 then
  15.                     SendChatMessage(text, "RAID");
  16.                 elseif  n <= 5 then
  17.                     SendChatMessage(text, "GROUP");
  18.                 elseif n == 0 then
  19.                     SendChatMessage(text, "SAY");
  20.                     SendChatMessage(text, "YELL");
  21.                 end;
  22.             end;
  23.         end;
  24.     end;
  25. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement