Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. Spammable_channel = "ChaosCasters"
  2. Spammable_cast = "sheep"
  3.  
  4. function findPolymorph()
  5. i, s, S = 1, "spell", GetSpellName;
  6. f="Polymorph";
  7. n, r=S(i,"spell")
  8. findPoly_spells = { }
  9. repeat
  10. if strfind(n,f)~=nil then
  11. findPoly_spell = { }
  12. findPoly_spell["index"] = i
  13. findPoly_spell["name"] = n
  14. findPoly_spell["rank"] = r
  15. tinsert(findPoly_spells, findPoly_spell)
  16. end
  17. i=i+1;
  18. n, r = S(i,"spell")
  19. until n==nil
  20. for _, spell in ipairs(findPoly_spells) do
  21. if spell["rank"] == "Rank 2" then
  22. return spell["index"]
  23. end
  24. end
  25. end
  26.  
  27.  
  28. function SpamAnnounce()
  29. local cd, t= 5, GetTime()
  30. if (t-cd) >= (LAST_SAY or 0) then
  31. LAST_SAY = t;
  32. whisperNextGroup2()
  33. end
  34. end
  35.  
  36. function whisperNextGroup2()
  37. local channelID=GetChannelName(Spammable_channel);
  38. local targetName = UnitName("target");
  39. if targetName == nil then targetName = "<no target>" end
  40. SendChatMessage("I "..Spammable_cast.." "..string.upper(targetName), "CHANNEL", nil, channelID);
  41. SendChatMessage("I "..Spammable_cast.." "..string.upper(targetName), "SAY", nil);
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement