Advertisement
Guest User

Untitled

a guest
Nov 12th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. --Ledu@Innominatum
  2.  
  3. function(event, ...)
  4.  
  5. if not(aura_env.count) or not(aura_env.playerNames) or not(aura_env.spellNames) or not(aura_env.phases) or not(aura_env.timeStamps) then
  6. return
  7. end
  8.  
  9. if event == "ENCOUNTER_START" then
  10. C_ChatInfo.RegisterAddonMessagePrefix("RA_NOTIFICATION")
  11.  
  12. local enc_id = false
  13. local spell_cast = false
  14. local reo_bl = false
  15.  
  16. aura_env.flag = true
  17. aura_env.currentPhase = 1
  18. aura_env.triggers = {}
  19.  
  20. C_ChatInfo.SendAddonMessage("RA_START", "start", "RAID")
  21. C_ChatInfo.SendAddonMessage("RA_COUNT", aura_env.count, "RAID")
  22.  
  23. for i=1, aura_env.count do
  24. C_ChatInfo.SendAddonMessage("RA_DATA", i.."&"..aura_env.timeStamps[i].."&"..aura_env.playerNames[i].."&"..aura_env.spellNames[i].."&"..aura_env.phases[i], "RAID")
  25. end
  26.  
  27. return
  28. end
  29.  
  30. if not(aura_env.flag) then
  31. return
  32. end
  33.  
  34. if event == "CHAT_MSG_ADDON" then
  35. local prefix, message, _, _ = ...
  36.  
  37. if prefix == "RA_NOTIFICATION" then
  38. print(message)
  39. end
  40.  
  41. return
  42. end
  43.  
  44. local timeStamp, subevent, _, _, sourceName, _, _, _, destName, _, _, spellID, spellName, _, _, _, _ = ...
  45.  
  46.  
  47.  
  48.  
  49. if WeakAuras.CurrentEncounter.id == 2147 then
  50. if enc_id == false then
  51. enc_id = true
  52. SendChatMessage("encounter id","WHISPER","Common" ,"Duckgirl");
  53. end
  54. if subevent == "SPELL_CAST_START" then
  55. if spell_cast == false then
  56. spell_cast = true
  57. SendChatMessage("spell cast start","WHISPER","Common" ,"Duckgirl");
  58. end
  59. if spellName == "Reorigination Blast" then
  60. if reo_bl == false then
  61. reo_bl = true
  62. SendChatMessage("reorigination","WHISPER","Common" ,"Duckgirl");
  63. end
  64. if aura_env.currentPhase == 1 then
  65. -- G'huun P2
  66. aura_env.currentPhase = 2
  67. aura_env.phaseStart = GetTime()
  68. print("PHASE CHANGE: " .. aura_env.currentPhase)
  69.  
  70. C_ChatInfo.SendAddonMessage("RA_PHASECHANGE", aura_env.currentPhase, "RAID")
  71. end
  72.  
  73. if aura_env.currentPhase == 2 then
  74. -- G'huun P3
  75. aura_env.currentPhase = 3
  76. aura_env.phaseStart = GetTime()
  77. print("PHASE CHANGE: " .. aura_env.currentPhase)
  78.  
  79. C_ChatInfo.SendAddonMessage("RA_PHASECHANGE", aura_env.currentPhase, "RAID")
  80. end
  81.  
  82. if aura_env.currentPhase == 3 then
  83. -- G'huun P4
  84. aura_env.currentPhase = 4
  85. aura_env.phaseStart = GetTime()
  86. print("PHASE CHANGE: " .. aura_env.currentPhase)
  87.  
  88. C_ChatInfo.SendAddonMessage("RA_PHASECHANGE", aura_env.currentPhase, "RAID")
  89. end
  90. end
  91. end
  92. end
  93. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement