Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.40 KB | None | 0 0
  1. --Destro Warlock Script by demisehi
  2. --
  3. --Table of Contents:
  4. --
  5. --Common - line                                                          
  6. --Lock lists - line
  7. --Buffs - line
  8. --Offensive CDs - line
  9. --Defensive CDs - line
  10. --MultiDot - line
  11. --Rotation start - line
  12. --AoEMode - line
  13. --Single Target - line
  14. --
  15.  
  16.  
  17. -- COMMON
  18. local lastimmo = 0;
  19. local immoDelay = 0;
  20. local lastdsm = 0;
  21. local lastfbimmo = 0;
  22. local destrohasFocus = false;
  23. local havocExists = 0;
  24. local lastcote = 0;
  25. maxEnemies = 0;
  26.  
  27. function _destrolockLists()
  28.     local highDuration,highDPS,lowUnits = {},{},{};
  29.  
  30.     for index=1, #enemiesList do
  31.     ISetAsUnitID(enemiesList[index],"_bgTar");
  32.  
  33.         --HighDuration--   and _LoS("_bgTar")  
  34.         if not _immuneMagic("_bgTar") and not _immuneCheck("_bgTar") and _LoS("_bgTar") and not _isPlayer("_bgTar") then
  35.             table.insert(highDuration,{guid=UnitGUID("_bgTar"),duration=_destrototalDotDuration("_bgTar"),dps=_pDestroDotDPS("_bgTar")});
  36.             --Highest DPS List--
  37.             --Lowest Units List--
  38.             table.insert(highDPS,{guid=UnitGUID("_bgTar"),duration=_destrototalDotDuration("_bgTar"),dps=_pDestroDotDPS("_bgTar")});
  39.             table.insert(lowUnits,{guid=UnitGUID("_bgTar"),duration=_destrototalDotDuration("_bgTar"),dps=_pDestroDotDPS("_bgTar")});
  40.         end
  41.     end
  42.  
  43.     table.sort(highDuration, function(x,y) return x.duration > y.duration end)
  44.     table.sort(highDPS, function(x,y) return x.dps > y.dps end)
  45.     table.sort(lowUnits, function(x,y) return x.duration < y.duration end)
  46.  
  47.     return highDuration,highDPS,lowUnits;
  48. end
  49.  
  50. function warlockDestructionBuffs(buffInCombat)
  51.     if buffInCombat == nil then buffInCombat = false; end
  52.  
  53.   if IsMounted() ~= 1 or not fawHasBuff("Zen Flight") then
  54.     -- Check Alchemy Flask
  55.     if GetItemCount(75525, false, true) > 0 then
  56.       if not fawHasBuff("Enhanced Intellect") and not fawHasBuff("Flask of the Warm Sun") then
  57.         UseItemByName("Alchemist's Flask");
  58.       end
  59.     end
  60.    
  61.         if not fawHasBuffAny("Dark Intent") and not fawHasBuffAny("Arcane Brilliance") and not fawHasBuffAny("Burning Wrath") then
  62.             if fawCastSelf("Dark Intent") then return; end
  63.     end
  64.   end
  65.   return false;
  66. end
  67.  
  68. function warlockDestroOffensiveCooldowns()
  69.   if UseCooldowns and not fawAmIChanneling() and fawIsBoss() then
  70.    
  71.     if not fawHasBuff("Dark Soul: Instability") and (GetTime() - lastdsm > 3)  then
  72.       if fawHasTalent("Archimonde's Darkness") then
  73.         if GetSpellCharges("Dark Soul: Instability") >= 2 then
  74.           if fawCastSelf("Dark Soul: Instability") then
  75.             lastdsm = GetTime();
  76.             return;
  77.           end
  78.         elseif GetSpellCharges("Dark Soul: Instability") > 0 and mySpellPower > 47000 then 
  79.                     if fawCastSelf("Dark Soul: Instability") then
  80.             lastdsm = GetTime();
  81.             return;
  82.           end
  83.         end
  84.             else
  85.                 if fawCastSelf("Dark Soul: Instability") and (mySpellPower > 47000 or _getHp("target") <= 10) then
  86.                     lastdsm = GetTime();
  87.           return;
  88.         end
  89.             end
  90.     end
  91.    
  92.     if fawIsBoss() and (fawHasPewPew() or fawHealth("target") <= 20) and GetItemCooldown(76093) == 0 then
  93.       UseItemByName("Potion of the Jade Serpent");
  94.     end
  95.    
  96.     if (fawHealth("target") < 20 or fawCalculateTimeToDie("target") < 61) and fawIsBoss() then
  97.       if fawCast("Summon Doomguard") then return; end
  98.     end
  99.    
  100.     fawUseCooldowns();
  101.   end
  102. end
  103.  
  104. function warlockDestroDefensiveCooldowns()
  105.   if UseDefensiveCooldowns then
  106.    
  107.         --Dark Bargain--
  108.         if fawHasTalent("Dark Bargain") then
  109.             if _getHp("player") <= 25 then
  110.                 _Cast(110913);
  111.             end
  112.         end
  113.  
  114.         --Dark Regen
  115.         if fawHasTalent("Dark Regeneration") then
  116.             if _getHp("player") <= 35 then
  117.                 _Cast(108359);
  118.             end
  119.         end
  120.        
  121.         --SacrificialPact--
  122.         if fawHasTalent("Sacrificial Pact") then
  123.             if _getHp("player") <= 40 then
  124.                 _Cast(108416);
  125.             end
  126.         end
  127.        
  128.         --Unending resolve--
  129.         if not fawHasGlyph("Glyph of Eternal Resolve") then
  130.             if _getHp("player") <= 50 then
  131.                 _Cast(104773);
  132.             end
  133.         end
  134.        
  135.         --Healthstone
  136.         if GetItemCount(5512, false, true) > 0 and fawHealth("player") < math.random(20,30) and GetItemCooldown(5512) == 0 then
  137.       UseItemByName("Healthstone");
  138.     end
  139.  
  140.         --Ember Tap
  141.         if myEmbers >= 12 and _getHp("player") <= 20 then
  142.             _Cast(114635);
  143.         end
  144.   end
  145. end
  146.  
  147. function warlockDestroShadowburn()
  148.     for index=1, #enemiesList do
  149.         ISetAsUnitID(enemiesList[index],"_bgTar");
  150.                
  151.         --Shadowburn and Cbolt logic
  152.         if _getHp("_bgTar") <= 20 and _amIfacing("_bgTar") and _enemyincombat("_bgTar") and not UnitIsDeadOrGhost("_bgTar") and not UnitIsUnit("target","_bgTar") then
  153.             if _getHp("_bgTar") <= 10 and myEmbers >= 11 then
  154.                 TargetUnit("_bgTar");
  155.                 _Cast(17877,"target");
  156.                 TargetLastTarget();
  157.             elseif _getHp("_bgTar") > 10 and myEmbers >= 11 and mySpellPower > 47000 then
  158.                 TargetUnit("_bgTar");
  159.                 _Cast(17877,"target");
  160.                 TargetLastTarget();
  161.             elseif myEmbers >= 35 then
  162.                 TargetUnit("_bgTar");
  163.                 _Cast(17877,"target");
  164.                 TargetLastTarget();
  165.             end
  166.         end
  167.     end
  168.  
  169.     for index=1, #enemiesList do
  170.         ISetAsUnitID(enemiesList[index],"_bgTar");
  171.         --Shadowburn and Cbolt logic
  172.         if _getHp("target") <= 20 and _amIfacing("target") and _enemyincombat("target") then
  173.             if _getHp("target") <= 10 and myEmbers >= 11 then
  174.                 _Cast(17877,"target");
  175.             elseif _getHp("target") > 10 and myEmbers >= 11 and mySpellPower > 47000 then
  176.                 _Cast(17877,"target");
  177.             elseif myEmbers >= 35 then
  178.                 _Cast(17877,"target");
  179.             end
  180.         end
  181.     end
  182. end
  183.  
  184. function warlockDestroAOE()
  185.        
  186.     warlockDestroShadowburn();
  187.            
  188.     if UnitExists("target") and not UnitBuffID("player",108683,"player") and myEmbers >= 25 then
  189.         _Cast(108683);
  190.     end
  191.    
  192.     if UnitBuffID("player",108683,"player") then
  193.                    
  194.         --FnB Immolate
  195.         if myEmbers >= 25 and _debuffRemains("target",348,"player") <= 3 and not UnitDebuffID("target",172,"player") and not _immuneCheck("target") and not _immuneMagic("target") and _getHp("_bgTar") >= 5 and UnitHealthMax("target") > 2000000 then
  196.             if not fnbimmoDelay or GetTime() - fnbimmoDelay > 0.8 then
  197.                 _Cast(172,"target",true);
  198.             end
  199.         end
  200.  
  201.         if _enemyincombat("target") and not UnitDebuffID("target",104225) and not UnitDebuffID("target",58410) and not UnitDebuffID("target",1490) and (GetTime() - lastcote > 1) then
  202.             _Cast(1490,"target");
  203.             lastcote = GetTime();
  204.         end
  205.  
  206.         --Conflagrate
  207.         if myEmbers >= 21 and _spellCooldown(17962) == 0 and GetSpellCharges(17962) > 0 and not UnitDebuffID("target",80240,"player") then
  208.             _Cast(17962,"target",true);
  209.         end
  210.  
  211.         if myEmbers > 11 then
  212.             _Cast(686,"target",true);
  213.         end
  214.     end
  215.    
  216.     for index=1,maxEnemies do
  217.         ISetAsUnitID(enemiesList[index],"_bgTar");
  218.         --Rain of Fire Target
  219.         if not UnitDebuffID("target",104232,"player") and _getMana("player") > 30 then
  220.             _AeCast(104232,"target",true)
  221.         end
  222.     end
  223.  
  224.     for index=1,maxEnemies do
  225.         ISetAsUnitID(enemiesList[index],"_bgTar");
  226.         if _spellCooldown(80240) == 0  and not UnitIsUnit("target","_bgTar") and myEmbers >= 15 and _amIfacing("_bgTar") and _enemyincombat("_bgTar") then
  227.             _Cast(80240,"_bgTar",true);
  228.         end
  229.     end
  230.  
  231.     if UnitBuffID("player",80240,"player") then
  232.         for index=1,maxEnemies do
  233.             ISetAsUnitID(enemiesList[index],"_bgTar");
  234.             if _getHp("_bgTar") <= 20 and not UnitDebuffID("_bgTar",80240,"player") and _amIfacing("_bgTar") and _LoS("_bgTar") and myEmbers >= 11 and _enemyincombat("_bgTar") then
  235.                 TargetUnit("_bgTar");
  236.                 _Cast(17877,"target");
  237.                 TargetLastTarget();
  238.             end
  239.         end
  240.    
  241.         for index=1,maxEnemies do
  242.             ISetAsUnitID(enemiesList[index],"_bgTar");
  243.             if not UnitDebuffID("target",80240,"player") and myEmbers >= 11 and _getHp("_bgTar") > 20 and (not cboltDelay or GetTime() - cboltDelay > 0.5) and _enemyincombat("_bgTar") then
  244.                 _Cast(116858,"target");
  245.             end
  246.         end
  247.     end
  248.  
  249.     for index=1,maxEnemies do
  250.         ISetAsUnitID(enemiesList[index],"_bgTar");
  251.         --Immolate on Target (3 sec refresh regardless)
  252.         if _debuffRemains("target",348,"player") <= 3 and  _enemyincombat("target") and not _immuneCheck("target") and not _immuneMagic("target") and _getHp("target") >= 5 and UnitHealthMax("target") > 2000000 then
  253.             if not immoDelay or GetTime() - immoDelay > 0.5 then
  254.                 _Cast(348,"target",true);
  255.             end
  256.         end
  257.     end
  258.  
  259.     for index=1,maxEnemies do
  260.         ISetAsUnitID(enemiesList[index],"_bgTar");
  261.         --Immolate on Target (3 sec refresh regardless)
  262.         if _debuffRemains("_bgTar",348,"player") <= 3 and  _enemyincombat("_bgTar") and _amIfacing("_bgTar") and not _immuneCheck("_bgTar") and not _immuneMagic("_bgTar") and _getHp("_bgTar") >= 5 and UnitHealthMax("target") > 2000000 then
  263.             if not immoDelay or GetTime() - immoDelay > 0.5 then
  264.                 _Cast(348,"_bgTar",true);
  265.             end
  266.         end
  267.     end
  268.  
  269.     for index=1,maxEnemies do
  270.         ISetAsUnitID(enemiesList[index],"_bgTar");
  271.  
  272.         --Conflagrate
  273.         if _spellCooldown(17962) == 0 and GetSpellCharges(17962) > 0 and not UnitBuffID("player",117828,"player") then
  274.             _Cast(17962,"target",true);
  275.         end
  276.        
  277.         --Incinerate
  278.         _Cast(29722);
  279.        
  280.         --Fel Flame
  281.         if not UnitDebuffID("target",104232,"player") and _getMana("player") > 25 then
  282.             _AeCast(104232,"target",true)
  283.         end
  284.        
  285.         if _isMoving("player") then
  286.             _Cast(77799)
  287.         end
  288.     end
  289. end
  290.  
  291. function warlockDestroMDOT()
  292.    
  293.     --Havoc _bgTar
  294.     for index=1, #enemiesList do
  295.         ISetAsUnitID(enemiesList[index],"_bgTar");
  296.         if _spellCooldown(80240) == 0  and not UnitIsUnit("target","_bgTar") and myEmbers >= 15 and _amIfacing("_bgTar") and _enemyincombat("_bgTar") then
  297.             _Cast(80240,"_bgTar",true);
  298.         end
  299.     end
  300.  
  301.     --Shadowburn or Chaos Bolt a target while Havoc is on another
  302.     if UnitBuffID("player",80240,"player") then
  303.         for index=1, #enemiesList do
  304.             ISetAsUnitID(enemiesList[index],"_bgTar");
  305.             if _getHp("_bgTar") <= 20 and not UnitDebuffID("_bgTar",80240,"player") and _amIfacing("_bgTar") and _LoS("_bgTar") and myEmbers >= 11 and _enemyincombat("_bgTar") then
  306.                 TargetUnit("_bgTar");
  307.                 _Cast(17877,"target");
  308.                 TargetLastTarget();
  309.             end
  310.         end
  311.    
  312.         for index=1, #enemiesList do
  313.             ISetAsUnitID(enemiesList[index],"_bgTar");
  314.             if not UnitDebuffID("target",80240,"player") and myEmbers >= 11 and _getHp("_bgTar") > 20 and (not cboltDelay or GetTime() - cboltDelay > 0.5) and _enemyincombat("_bgTar") then
  315.                 _Cast(116858,"target");
  316.             end
  317.         end
  318.     end
  319.  
  320.     --Shadowburn low health
  321.     warlockDestroShadowburn();
  322.    
  323.     --MultiDot code
  324.     for index=1, #enemiesList do
  325.         ISetAsUnitID(enemiesList[index],"_bgTar");
  326.  
  327.         --Immolate  and _getHp("target") >= 1
  328.         if _destroDotDPS(348) > _immolatePower("target")*1.20 and _enemyincombat("target") and _amIfacing("target") and not _immuneCheck("target") and not _immuneMagic("target") and not UnitDebuffID("target",80240,"player") and not UnitBuffID("player",80240,"player") and UnitHealthMax("target") > 2000000 then
  329.             if not immoDelay or GetTime() - immoDelay > 0.5 then
  330.                 _Cast(348,"target",true);
  331.             end
  332.         end
  333.         --Immolate on Target (3 sec refresh regardless)  and _getHp("target") >= 1
  334.         if _debuffRemains("target",348,"player") <= 3 and _enemyincombat("target") and _amIfacing("target") and not _immuneCheck("target") and not _immuneMagic("target") and not UnitDebuffID("target",80240,"player") and not UnitBuffID("player",80240,"player") and UnitHealthMax("target") > 2000000 then
  335.             if not immoDelay or GetTime() - immoDelay > 0.5 then
  336.                 _Cast(348,"target",true);
  337.             end
  338.         end
  339.     end
  340.  
  341.     for index=1, #enemiesList do
  342.         ISetAsUnitID(enemiesList[index],"_bgTar");
  343.         --and UnitAffectingCombat("_bgTar") and _getHp("_bgTar") >= 1
  344.         if _destroDotDPS(348) > _immolatePower("_bgTar")*1.20 and _enemyincombat("_bgTar") and _amIfacing("_bgTar") and not _immuneCheck("_bgTar") and not _immuneMagic("_bgTar") and UnitHealthMax("_bgTar") > 2000000 then
  345.             if not immoDelay or GetTime() - immoDelay > 0.5 then
  346.                 _Cast(348,"_bgTar",true);
  347.             end
  348.         end
  349.             --Immolate on Target (3 sec refresh regardless)  and UnitAffectingCombat("_bgTar") and _getHp("_bgTar") >= 1
  350.         if _debuffRemains("_bgTar",348,"player") <= 3 and _enemyincombat("_bgTar") and _amIfacing("_bgTar") and not _immuneCheck("_bgTar") and not _immuneMagic("_bgTar") and UnitHealthMax("_bgTar") > 2000000 then
  351.             if not immoDelay or GetTime() - immoDelay > 0.5 then
  352.                 _Cast(348,"_bgTar",true);
  353.             end
  354.         end
  355.    
  356.         --Curse of the Elements  and UnitAffectingCombat("_bgTar")
  357.         if destrohasAllDots("_bgTar") and _amIfacing("_bgTar") and not UnitDebuffID("_bgTar",104225) and _enemyincombat("_bgTar") and not UnitDebuffID("_bgTar",58410) and not UnitDebuffID("_bgTar",1490) and UnitHealthMax("_bgTar") > 2000000 then
  358.             _Cast(1490,"_bgTar");
  359.         end
  360.     end
  361.  
  362.     for index=1, #enemiesList do
  363.         ISetAsUnitID(enemiesList[index],"_bgTar");
  364.        
  365.         if not UnitDebuffID("_bgTar",104232,"player") and _enemyincombat("_bgTar") and _getMana("player") > 40 and _amIfacing("_bgTar") then
  366.             _AeCast(104232,"_bgTar",true)
  367.         end
  368.     end
  369.  
  370.     for index=1, #enemiesList do
  371.         ISetAsUnitID(enemiesList[index],"_bgTar");
  372.        
  373.         --Conflag
  374.         if destrohasAllDots("target") and _spellCooldown(17962) == 0 and GetSpellCharges(17962) > 0 and fawBuffStacks("Backdraft","player") < 3 and not UnitDebuffID("target",80240,"player") then
  375.             _Cast(17962,"target");
  376.         end
  377.  
  378.         --Chaos Bolt  and not UnitBuffID("player",117828,"player")
  379.         if myEmbers >= 11 and  mySpellPower > 47000 and not _isMoving("player") and not UnitDebuffID("target",80240,"player") and _getHp("target") > 20 then
  380.             if not cboltDelay or GetTime() - cboltDelay > 0.5 then
  381.                 _Cast(116858,"target");
  382.             end
  383.         end
  384.  
  385.         if myEmbers >= 35 and not _isMoving("player") and not UnitDebuffID("target",80240,"player") and _getHp("target") > 20 then
  386.             if not cboltDelay or (GetTime() - cboltDelay > 0.5) then
  387.                 _Cast(116858,"target");
  388.             end
  389.         end
  390.        
  391.        
  392.     end
  393.  
  394.     for index=1, #enemiesList do
  395.         ISetAsUnitID(enemiesList[index],"_bgTar");
  396.         --Incinerate
  397.         if destrohasAllDots("target") and not UnitDebuffID("target",80240,"player") and _enemyincombat("target") then
  398.             _Cast(29722);
  399.         end
  400.  
  401.         if _isMoving("player") and not UnitDebuffID("target",80240,"player") then
  402.             if not UnitDebuffID("_bgTar",104232,"player") and _enemyincombat("_bgTar") and _getMana("player") > 40 and _amIfacing("_bgTar") then
  403.                 _AeCast(104232,"_bgTar",true)
  404.             end
  405.             _Cast(77799);
  406.         end
  407.     end
  408. end
  409.  
  410. function warlockDestructionRotation()
  411.    
  412.     enemiesList = GetEnemies("player",40);
  413.     if #enemiesList > 6 then
  414.         maxEnemies = 6;
  415.     else
  416.         maxEnemies = #enemiesList;
  417.     end
  418.  
  419.     --highDuration,highDPS,lowUnits = _destrolockLists();
  420.  
  421.     if UnitCastingInfo("player") == GetSpellInfo(116858) then cboltDelay = GetTime(); end
  422.     if UnitCastingInfo("player") == GetSpellInfo(348) then immoDelay = GetTime(); end
  423.     if UnitCastingInfo("player") == GetSpellInfo(172) then fnbimmoDelay = GetTime(); end
  424.  
  425.     if not fawGCDDone() then return; end
  426.     if fawAmICasting() then return; end
  427.  
  428.     if warlockDestructionBuffs(true) then return; end
  429.  
  430.     myEmbers = UnitPower("player", 14, true)
  431.     local immolateCastTime = fawSpellCastTime("Immolate");
  432.     local chaosBoltCastTime = fawSpellCastTime("Chaos Bolt");
  433.     mySpellPower = GetSpellBonusDamage(6);
  434.     myCrit = GetSpellCritChance(6);
  435.    
  436.     fawInterrupt("Command Demon");
  437.     fawInterrupt("Spell Lock");
  438.     fawInterruptPet("Spell Lock");
  439.  
  440.     if fawValidEnemy("target", "Chaos Bolt") then
  441.  
  442.         warlockDestroOffensiveCooldowns();
  443.         warlockDestroDefensiveCooldowns();
  444.  
  445.         if not fawValidFriend("pet") and not fawHasTalent("Grimoire of Sacrifice") and fawHasTalent("Grimoire of Supremacy") then
  446.             if UnitAffectingCombat("player") ~= 1 then
  447.                 if fawCastSelf("Summon Fel Imp", fawSpellCastTime("Summon Fel Imp")*1000) then return; end
  448.             else
  449.                 _Cast(120451);
  450.             end
  451.         end
  452.  
  453.         if not UnitExists("pet") and myEmbers >= 11 and UnitAffectingCombat("player") and not fawHasTalent("Grimoire of Sacrifice") then
  454.             _Cast(120451);
  455.         end
  456.        
  457.         if sweep then
  458.       if fawHasTalent("Shadowfury") and fawSpellCooldown("Shadowfury") == 0 then
  459.         fawCastSelf("Shadowfury")
  460.         if AreaSpellIsPending() then
  461.           CastAtLocation(Target:GetLocation())
  462.         end
  463.       elseif fawHasTalent("Demonic Breath") and fawSpellCooldown("Demonic Breath") == 0 then
  464.         if fawCastSelf("Demonic Breath", 2500) then return; end
  465.       end
  466.     end
  467.        
  468.         if fawAmICasting() or fawAmIChanneling() then return; end
  469.  
  470.         if aoem then
  471.             warlockDestroAOE();
  472.         else
  473.             if not aoem and UnitBuffID("player",108683,"player") then
  474.                 CancelUnitBuff("player","Fire and Brimstone");
  475.             end
  476.             if mdot then
  477.                 warlockDestroMDOT();
  478.             else
  479.            
  480.                 warlockDestroShadowburn();
  481.  
  482.                 for index=1, #enemiesList do
  483.                     ISetAsUnitID(enemiesList[index],"_bgTar");
  484.  
  485.                     if destrohasAllDots("target") and _amIfacing("target") and not UnitDebuffID("target",104225) and _enemyincombat("target") and not UnitDebuffID("target",58410) and not UnitDebuffID("target",1490) then
  486.                         _Cast(1490,"target");
  487.                     end
  488.        
  489.                     --Immolate with power
  490.                     if _destroDotDPS(348) > _immolatePower("target")*1.20 and _enemyincombat("target") and not _immuneCheck("target") and not _immuneMagic("target") and _getHp("target") >= 1 and (GetTime() - lastimmo > 1.7) then
  491.                         if not immoDelay or GetTime() - immoDelay > 0.5 then
  492.                             _Cast(348,"target",true);
  493.                         end
  494.                     end
  495.                     --Immolate on Target (3 sec refresh regardless)
  496.                     if _debuffRemains("target",348,"player") <= 3 and _enemyincombat("target") and not _immuneCheck("target") and not _immuneMagic("target") and _getHp("target") >= 1 and (GetTime() - lastimmo > 1.7) then
  497.                         if not immoDelay or GetTime() - immoDelay > 0.5 then
  498.                             _Cast(348,"target",true);
  499.                         end
  500.                     end
  501.  
  502.                     --Curse of the Elements
  503.                     if destrohasAllDots("target") and _enemyincombat("target") and not UnitDebuffID("target",104225) and not UnitDebuffID("target",58410) and not UnitDebuffID("target",1490) then
  504.                         _Cast(1490,"target");
  505.                     end
  506.  
  507.                     --Conflagrate
  508.                     if destrohasAllDots("target") and _spellCooldown(17962) == 0 and GetSpellCharges(17962) >= 2 and not UnitDebuffID("target",80240,"player") then
  509.                         _Cast(17962,"target",true);
  510.                     end
  511.        
  512.                     --Rain of fire
  513.                     --if not UnitDebuffID("target",104232,"player") and destrohasAllDots("target") and _getMana("player") > 25 then
  514.                     --  _AeCast(104232,"target",true)
  515.                     --end
  516.  
  517.                     --Chaos Bolt  and not UnitBuffID("player",117828,"player")
  518.                     if _getHp("target") > 20 and _amIfacing("target") and _enemyincombat("target") and myEmbers >= 11 and not _isMoving("player") and not UnitDebuffID("target",80240,"player") and (mySpellPower > 47000 or UnitBuffID("player",114207) or UnitBuffID("player",113858)) then
  519.                         if not cboltDelay or GetTime() - cboltDelay > 0.5 then
  520.                             _Cast(116858,"target");
  521.                         end
  522.                     end
  523.                    
  524.                     if _getHp("target") > 20 and _amIfacing("target") and _enemyincombat("target") and myEmbers >= 33 and not _isMoving("player") and not UnitBuffID("player",117828,"player") and not UnitDebuffID("target",80240,"player") then
  525.                         if not cboltDelay or GetTime() - cboltDelay > 0.5 then
  526.                             _Cast(116858,"target");
  527.                         end
  528.                     end
  529.  
  530.                     --Conflagrate
  531.                     if destrohasAllDots("target") and _spellCooldown(17962) == 0 and GetSpellCharges(17962) > 0 and not UnitDebuffID("target",80240,"player") then
  532.                         _Cast(17962,"target",true);
  533.                     end
  534.    
  535.                     --Incinerate
  536.                     if destrohasAllDots("target") then
  537.                         _Cast(29722);
  538.                     end
  539.  
  540.                     --Fel Flame
  541.                     if _isMoving("player") then
  542.                         if not UnitDebuffID("target",104232,"player") and destrohasAllDots("target") and _getMana("player") > 25 then
  543.                             _AeCast(104232,"target",true)
  544.                         end
  545.                        
  546.                         _Cast("77799")
  547.                    
  548.                     end
  549.                 end
  550.             end
  551.         end
  552.     end
  553. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement