Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. function(event, _, message, _, sourceGUID, sourceName, _, _, destGUID, destName, _, _, spellId)
  2. if message == "SPELL_AURA_APPLIED" and spellId == 230139 then
  3. local t = GetTime()
  4. if t-aura_env.prev > 5 then
  5. wipe(aura_env.shots)
  6. wipe(aura_env.soaker)
  7. aura_env.myPos = nil
  8. aura_env.prev = t
  9. end
  10.  
  11.  
  12. aura_env.shots[#aura_env.shots+1] = destName
  13.  
  14. if #aura_env.shots == aura_env.getNumberOfShotsForDifficulty() then
  15. WeakAuras.ScanEvents('WA_SdP_HydraShot')
  16. end
  17. end
  18. if event == "WA_SdP_HydraShot" then
  19. local _, _, _, instanceId = _G["Unit".."Position"]("player")
  20.  
  21. aura_env.myPos = nil
  22. for i=1,30 do
  23. local unit = ("raid%d"):format(i)
  24. local _, _, _, tarInstanceId = _G["Unit".."Position"](unit)
  25.  
  26. if tarInstanceId == instanceId
  27. and UnitIsConnected(unit)
  28. and not GetPartyAssignment("MAINTANK", unit)
  29. and UnitGroupRolesAssigned(unit) ~= "TANK"
  30. and not UnitDebuff(unit, aura_env.buff)
  31. and not UnitDebuff(unit, aura_env.debuff)
  32. and not UnitIsDead(unit) then
  33. local pos = (#aura_env.soaker+1)%aura_env.getNumberOfShotsForDifficulty() + 1
  34. aura_env.soaker[#aura_env.soaker+1] = {name = UnitName(unit), pos = pos}
  35.  
  36. if UnitIsUnit(unit, "player") then
  37. aura_env.myPos = pos
  38. SendChatMessage("im soaking {rt" .. aura_env.myPos .. "}", "WHISPER", nil, "raid leader name here")
  39. end
  40. end
  41. end
  42.  
  43. WeakAuras.ScanEvents('WA_SdP_HydraList', aura_env.shots, aura_env.soaker)
  44.  
  45. if aura_env.myPos then
  46. PlaySoundFile(("interface/sounds/soak_rt%d.ogg"):format(aura_env.myPos), "MASTER")
  47. return true
  48. end
  49. end
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement