Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Spammable_channel = "ChaosCasters"
- Spammable_cast = "sheep"
- function findPolymorph()
- i, s, S = 1, "spell", GetSpellName;
- f="Polymorph";
- n, r=S(i,"spell")
- findPoly_spells = { }
- repeat
- if strfind(n,f)~=nil then
- findPoly_spell = { }
- findPoly_spell["index"] = i
- findPoly_spell["name"] = n
- findPoly_spell["rank"] = r
- tinsert(findPoly_spells, findPoly_spell)
- end
- i=i+1;
- n, r = S(i,"spell")
- until n==nil
- for _, spell in ipairs(findPoly_spells) do
- if spell["rank"] == "Rank 2" then
- return spell["index"]
- end
- end
- end
- function SpamAnnounce()
- local cd, t= 5, GetTime()
- if (t-cd) >= (LAST_SAY or 0) then
- LAST_SAY = t;
- whisperNextGroup2()
- end
- end
- function whisperNextGroup2()
- local channelID=GetChannelName(Spammable_channel);
- local targetName = UnitName("target");
- if targetName == nil then targetName = "<no target>" end
- SendChatMessage("I "..Spammable_cast.." "..string.upper(targetName), "CHANNEL", nil, channelID);
- SendChatMessage("I "..Spammable_cast.." "..string.upper(targetName), "SAY", nil);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement