Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. function(_, timeShift, currentSpell, gcd, talents)
  2.  
  3. local _SoulReaper = 130736;
  4. local _VirulentPlague = 191587;
  5. local _Outbreak = 77575;
  6. local _DarkTransformation = 63560;
  7. local _FesteringStrike = 85948;
  8. local _FesteringWound = 197147;
  9. local _Castigator = 207305;
  10. local _Apocalypse = 220143;
  11. local _ScourgeStrike = 55090;
  12. local _ClawingShadows = 207311;
  13. local _DeathCoil = 47541;
  14. local _ShadowInfusion = 198943;
  15. local _ScourgeofWorlds = 191747;
  16. local _DeathandDecay = 43265;
  17. local _Defile = 152280;
  18. local _Epidemic = 207317;
  19. local _ArmyoftheDead = 42650;
  20. local _PortaltotheUnderworld = 191637;
  21. local _ArmiesoftheDamned = 191731;
  22. local _SummonGargoyle = 49206;
  23. local _Heroism = 32182;
  24. local _Bloodlust = 2825;
  25. local _TimeWarp = 80353;
  26. local _DarkArbiter = 207349;
  27. local _AntiMagicShell = 48707;
  28. local _SpellEater = 207321;
  29. local _Necrosis = 207346;
  30. local _EbonFever = 207269;
  31. local _ArcaneTorrent = 28730;
  32. local _SuddenDoom = 49530;
  33. local _DeathStrike = 49998;
  34.  
  35. --Get runic power and runes
  36. local runic = UnitPower('player', SPELL_POWER_RUNIC_POWER);
  37. local runicMax = UnitPowerMax('player',SPELL_POWER_RUNIC_POWER);
  38.  
  39. local count = 0;
  40. local cd = 0;
  41. local time = GetTime();
  42. for i = 1, 10 do
  43. local start, duration, runeReady = GetRuneCooldown(i);
  44. if start and start > 0 then
  45. local rcd = duration + start - time;
  46. if cd == 0 or cd > rcd then
  47. cd = rcd;
  48. end
  49. end
  50. if runeReady then
  51. count = count + 1;
  52. end
  53. end
  54.  
  55. --Get wounds on target.
  56. local _, _, _, charges = UnitAura('target', 'Festering Wound', nil, 'PLAYER||HARMFUL');
  57. if charges == nil then
  58. charges = 0;
  59. end
  60. --Check if Necrosis is active
  61. if MaxDps:Aura(_Necrosis, timeShift)
  62. then
  63. -- If more then 2 wounds
  64. if charges > 2 then
  65. return _ScourgeStrike;
  66. end
  67. end
  68.  
  69. --Check if Plague is on
  70. if not MaxDps:TargetAura(_VirulentPlague, timeShift)
  71. then
  72. return _Outbreak;
  73. end
  74. --Army of the dead ready
  75. if MaxDps:SpellAvailable(_ArmyoftheDead , timeShift) then
  76. return _ArmyoftheDead;
  77. end
  78. --Gargoyle ready
  79. if MaxDps:SpellAvailable(_SummonGargoyle , timeShift) then
  80. return _SummonGargoyle;
  81. end
  82. --Dark transformation ready
  83. if MaxDps:SpellAvailable(_DarkTransformation , timeShift) then
  84. return _DarkTransformation ;
  85. end
  86.  
  87. -- If less then 3 charges use festering wound
  88. if charges < 4 then
  89. if count >=2 then
  90. return _FesteringStrike;
  91. end
  92. end
  93. --Check for use of apocalypse and soulreaper.
  94. if MaxDps:SpellAvailable(_Apocalypse , timeShift) then
  95. if MaxDps:SpellAvailable(_SoulReaper, timeShift) then
  96. if charges >= 3 then
  97. return _SoulReaper;
  98. end
  99. end
  100. if charges <=4 then
  101. if count >= 2 then
  102. return _FesteringStrike;
  103. end
  104. end
  105. if charges >= 6 then
  106. return _Apocalypse;
  107. end
  108. end
  109. if MaxDps:SpellAvailable(_SoulReaper, timeShift) then
  110. if charges >= 3 then
  111. return _SoulReaper;
  112. end
  113. end
  114. --Check to run other and stuff
  115. if count <= 2 then
  116. if MaxDps:SpellAvailable(_DeathandDecay , timeShift) then
  117. return _DeathandDecay;
  118. end
  119. if MaxDps:SpellAvailable(_DeathStrike , timeShift) then
  120. if runic > 85 then
  121. return _DeathStrike;
  122. end
  123. end
  124. end
  125. --Check power and run DeathCoil
  126. if runic > 50 then
  127. return _DeathCoil;
  128. end
  129. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement