Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local msg = "%s: %s (%s)"
- Interrupt = CreateFrame("Frame", nil, UIParent);
- Interrupt:RegisterEvent("PLAYER_LOGIN");
- Interrupt:RegisterEvent("PARTY_MEMBERS_CHANGED");
- Interrupt:SetScript("OnEvent", function(self, event, subEvent, sourceGUID, _, _, _, destName, _, _, spellName, _, _, extraSkillName)
- self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
- if event == "PLAYER_LOGIN" then
- playerGuid = UnitGUID("player");
- else
- if subEvent == "SPELL_INTERRUPT" then
- local text = msg:format(spellName, extraSkillName, destName);
- if event == "PARTY_MEMBERS_CHANGED" then
- local n = GetNumPartyMembers();
- if n > 5 then
- SendChatMessage(text, "RAID");
- elseif n <= 5 then
- SendChatMessage(text, "GROUP");
- elseif n == 0 then
- SendChatMessage(text, "SAY");
- SendChatMessage(text, "YELL");
- end;
- end;
- end;
- end;
- end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement