/// <summary>
 ///     Cast a spell by name. Will check range, cooldown, and visibility. After the spell is cast, the thread will sleep
 ///     for GCD.
 /// </summary>
 /// <param name="spellName">The name of the spell in the spell databse.</param>
 /// <param name="ignoreMovement">Can we cast while moving.</param>
 /// <param name="ignoreChanneling"></param>
 /// <returns>True if the spell was cast, false if it was not.</returns>
 private bool castWithRangeCheck(string spellName, bool ignoreMovement = false, bool ignoreChanneling = true)
 {
     //Can't do range check.
     if (!isPlayerBusy(ignoreMovement, ignoreChanneling) && WoW.CanCast(spellName))
     {
         WoW.CastSpell(spellName);
         if (WoW.IsSpellOnGCD(spellName))
         {
             Thread.Sleep(WoW.SpellCooldownTimeRemaining(spellName));
         }
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
 private void SpellCast(string spellName)
 {
     if (WoW.PlayerIsCasting || (WoW.LastSpell == VOID_TORRENT && WoW.PlayerIsChanneling))
     {
         return;
     }
     if (spellName == MIND_FLAY && WoW.LastSpell == MIND_FLAY && WoW.PlayerIsChanneling)
     {
         return;
     }
     if (WoW.CanCast(spellName) && WoW.IsSpellInRange(SHADOW_WORD_PAIN))
     {
         WoW.CastSpell(spellName);
         if (WoW.IsSpellOnGCD(spellName))
         {
             Thread.Sleep(WoW.SpellCooldownTimeRemaining(spellName));
         }
     }
 }
 public override void Pulse()
 {
     if (WoW.IsInCombat)
     {
         interruptwatch.Start();
     }
     // if (WoW.HasBuff("Mount")) return;
     // COOLDOWNS
     if (WoW.IsInCombat && WoW.TargetIsEnemy && WoW.IsSpellInRange("Rebuke"))
     {
         if (SeraphimBoss && !WoW.IsSpellOnCooldown("Seraphim") && WoW.PlayerSpellCharges("Shield of the Righteous") >= 2 && WoW.HealthPercent >= 80)
         {
             Log.Write("Seraphim", Color.Red);
             WoW.CastSpell("Seraphim");
             return;
         }
         if (WoW.PlayerSpellCharges("Shield of the Righteous") == 3)
         {
             Log.Write("SoTR 3 Stacks, casting SoTR.", Color.Red);
             WoW.CastSpell("Shield of the Righteous");
             return;
         }
         if (WoW.PlayerHasBuff("Shield of the Righteous") && WoW.PlayerBuffTimeRemaining("Shield of the Righteous") <= 1.5)
         {
             Log.Write("SoTR remaining under 1.5seconds on target, cast SoTR.", Color.Red);
             WoW.CastSpell("Shield of the Righteous");
             return;
         }
         if (WoW.PlayerSpellCharges("Shield of the Righteous") >= 1 && WoW.HealthPercent <= 80 &&
             (!WoW.PlayerHasBuff("Shield of the Righteous") || WoW.PlayerBuffTimeRemaining("Shield of the Righteous") <= 1.5))
         {
             Log.Write("SoTR 1+ Stack and Health under 80%.", Color.Red);
             WoW.CastSpell("Shield of the Righteous");
             return;
         }
         if (WoW.CanCast("Eye of Tyr") && !WoW.IsSpellOnCooldown("Eye of Tyr") && WoW.HealthPercent <= 60)
         {
             Log.Write("Health under 60%, casting Eye of Tyr.", Color.Red);
             WoW.CastSpell("Eye of Tyr");
             return;
         }
         if (WoW.CanCast("Ardent Defender") && !WoW.IsSpellOnCooldown("Ardent Defender") && WoW.HealthPercent <= 10)
         {
             Log.Write("Health Critical casting Ardent Defender.", Color.Red);
             WoW.CastSpell("Ardent Defender");
             return;
         }
         if (WoW.CanCast("Guardian of the Ancient Kings") && !WoW.IsSpellOnCooldown("Guardian of the Ancient Kings") && WoW.HealthPercent <= 30)
         {
             Log.Write("Health low casting GoAK.", Color.Red);
             WoW.CastSpell("Guardian of the Ancient Kings");
             return;
         }
         if (WoW.CanCast("Lay on Hands") && !WoW.IsSpellOnCooldown("Lay on Hands") && WoW.HealthPercent <= 20)
         {
             Log.Write("Health low casting LoH.", Color.Red);
             WoW.CastSpell("Lay on Hands");
             return;
         }
         if (WoW.TargetIsCasting && interruptwatch.ElapsedMilliseconds > 1500)
         {
             //    if (!WoW.IsSpellOnCooldown("Rebuke"))
             //    {
             //        WoW.CastSpellByName("Rebuke");
             //        interruptwatch.Reset();
             //        interruptwatch.Start();
             //        return;
             //    }
             if (!WoW.IsSpellOnCooldown("Avenger's Shield") && !WoW.IsSpellOnGCD("Avenger's Shield"))
             {
                 WoW.CastSpell("Avenger's Shield");
                 interruptwatch.Reset();
                 interruptwatch.Start();
                 return;
             }
         }
     }
     // SINGLE
     if (combatRoutine.Type == RotationType.SingleTarget)
     {
         if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Rebuke")) //GCD and Melee range Check
         {
             // Hand of the Protector under 60% health
             if (HotPBoss && WoW.CanCast("Hand of the Protector") && !WoW.IsSpellOnCooldown("Hand of the Protector") && WoW.HealthPercent <= 60)
             {
                 Log.Write("Health under 60%, Hand of Protector.", Color.Red);
                 WoW.CastSpell("Hand of the Protector");
                 return;
             }
             // Light of the Protector under 60% health
             if (!HotPBoss && WoW.CanCast("Light of the Protector") && !WoW.IsSpellOnCooldown("Light of the Protector") && WoW.HealthPercent <= 60)
             {
                 Log.Write("Health under 60%, Light of Protector.", Color.Red);
                 WoW.CastSpell("Light of the Protector");
                 return;
             }
             // Cast Hammer if max stacks
             if (BlessedHammerBoss && WoW.CanCast("Blessed Hammer") && WoW.PlayerSpellCharges("Blessed Hammer") >= 3 && !WoW.IsSpellOnGCD("Blessed Hammer"))
             {
                 Log.Write("Blessed Hammer max stacks, casting Blessed Hammer.", Color.Red);
                 WoW.CastSpell("Blessed Hammer");
                 return;
             }
             // Cast Hammer
             if (!BlessedHammerBoss && WoW.CanCast("Hammer of the Righteous") && WoW.PlayerSpellCharges("Hammer of the Righteous") >= 1 && !WoW.IsSpellOnGCD("Hammer of the Righteous"))
             {
                 Log.Write("Hammer of the Righteous.", Color.Red);
                 WoW.CastSpell("Hammer of the Righteous");
                 return;
             }
             // Judgement on Cooldown
             if (WoW.CanCast("Judgement") && !WoW.IsSpellOnGCD("Judgement"))
             {
                 WoW.CastSpell("Judgement");
                 return;
             }
             // Consecration on cooldown
             if (WoW.CanCast("Consecration") && !WoW.IsSpellOnGCD("Consecration") && !WoW.TargetHasDebuff("Consecration"))
             {
                 Log.Write("Consecration debuff not active, casting Consecration.", Color.Red);
                 WoW.CastSpell("Consecration");
                 return;
             }
             // Avenger's Shield on cooldown
             if (WoW.CanCast("Avenger's Shield") && !WoW.IsSpellOnGCD("Avenger's Shield"))
             {
                 WoW.CastSpell("Avenger's Shield");
                 return;
             }
             // Cast Blessed Hammer at 1 + stacks
             if (BlessedHammerBoss && WoW.CanCast("Blessed Hammer") && WoW.PlayerSpellCharges("Blessed Hammer") >= 1 && !WoW.IsSpellOnGCD("Blessed Hammer") &&
                 !WoW.TargetHasDebuff("Blessed Hammer"))
             {
                 Log.Write("Nothing to do, casting Blessed Hammer.", Color.Red);
                 WoW.CastSpell("Blessed Hammer");
                 return;
             }
         }
     }
     // AOE/CLEAVE
     if (combatRoutine.Type == RotationType.AOE) // AoE/Cleave
     {
         if (WoW.HasTarget && WoW.TargetIsEnemy) //
         {
             // Hand of the Protector under 60% health
             if (HotPBoss && WoW.CanCast("Hand of the Protector") && !WoW.IsSpellOnCooldown("Hand of the Protector") && WoW.HealthPercent <= 60)
             {
                 Log.Write("Health under 60%, Hand of Protector.", Color.Red);
                 WoW.CastSpell("Hand of the Protector");
                 return;
             }
             // Light of the Protector under 60% health
             if (!HotPBoss && WoW.CanCast("Light of the Protector") && !WoW.IsSpellOnCooldown("Light of the Protector") && WoW.HealthPercent <= 60)
             {
                 Log.Write("Health under 60%, Light of Protector.", Color.Red);
                 WoW.CastSpell("Light of the Protector");
                 return;
             }
             if (WoW.PlayerSpellCharges("Blessed Hammer") >= 3 && !WoW.IsSpellOnGCD("Blessed Hammer")) // Cast Hammer if max stacks
             {
                 WoW.CastSpell("Blessed Hammer");
                 return;
             }
             if (WoW.CanCast("Avenger's Shield") && !WoW.IsSpellOnGCD("Avenger's Shield")) // Avenger's Shield on cooldown
             {
                 WoW.CastSpell("Avenger's Shield");
                 return;
             }
             if (WoW.CanCast("Consecration") && !WoW.IsSpellOnGCD("Consecration") && !WoW.TargetHasDebuff("Consecration")) // Consecration on cooldown
             {
                 Log.Write("Consecration debuff not active, casting Consecration.", Color.Red);
                 WoW.CastSpell("Consecration");
                 return;
             }
             if (WoW.CanCast("Blessed Hammer") && // Cast Hammer at 1 + stacks
                 WoW.PlayerSpellCharges("Blessed Hammer") >= 1 && !WoW.IsSpellOnGCD("Blessed Hammer"))
             {
                 Log.Write("AoE, casting Blessed Hammer.", Color.Red);
                 WoW.CastSpell("Blessed Hammer");
                 return;
             }
             if (WoW.CanCast("Judgement") && !WoW.IsSpellOnGCD("Judgement")) // Judgement on Cooldown
             {
                 WoW.CastSpell("Judgement");
             }
         }
     }
 }
Ejemplo n.º 4
0
        public override void Pulse()
        {
            /* Log.Write("Starting.....", Color.Red); */
            /* Place to check target's (boss) buffs/debuffs in order to stop casting */

            /* if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.TargetPlayerHasBuff("Focusing")) return; */
            if (togglewatch.ElapsedMilliseconds == 0)
            {
                togglewatch.Start();
                return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_RCONTROL) < 0)
            {
                if (togglewatch.ElapsedMilliseconds > 1000)
                {
                    combatRoutine.UseCooldowns = !combatRoutine.UseCooldowns;
                    WoW.Speak("Cooldowns " + (combatRoutine.UseCooldowns ? "On" : "Off"));
                    togglewatch.Restart();
                    if (!UseCooldowns && Opener)
                    {
                        Opener = !Opener;
                        WoW.Speak("Opener " + (Opener ? "Enabled" : "Disabled"));
                        Log.WritePixelMagic("Disabling Opener because you disabled Cooldowns.", Color.Red);
                    }
                    if (!UseCooldowns && autoCD)
                    {
                        autoCD = !autoCD;
                        WoW.Speak("Auto Burst " + (Opener ? "Enabled" : "Disabled"));
                        Log.WritePixelMagic("Disabling Automatic burst because you disabled Cooldowns.", Color.Red);
                    }
                }
            }
            if (openerwatch.ElapsedMilliseconds == 0)
            {
                openerwatch.Start();
                Log.Write("To activate/deactivate cooldowns press RIGHT CONTROL button", Color.Black);
                Log.Write("To activate/deactivate auto Combustion/Mirror Image press LEFT ALT button (cooldowns must be ENABLED)", Color.Black);
                Log.Write("it will use it when conditions are met and disable after that so you have to enable manually again", Color.Black);
                Log.Write("To activate/deactivate Opener press F1 (make sure it's not binded in WoW keybinds first!)", Color.Black);
                Log.Write("To activate/deactivate using of Living Bomb press F2 (make sure it's not binded in WoW keybinds first!)", Color.Black);
                Log.Write("To activate/deactivate automatic interrupting F3 (it will interrupt above 80 percent of cast,)", Color.Black);
                Log.Write("To switch between PYROBLAST and FLAMESTRIKE on HotStreak press F4, default is always PYROBLAST)", Color.Black);
                Log.Write("To cast Meteor use MOUSE button 3, keep it pressed and cursor where you want to cast Meteor untill it's done.", Color.Black);
                Log.Write("To cast instant Flamestrike use Tilde button (left from number 1), keep mouse cursor where you want to cast Flamestrike.", Color.Black);
                Log.Write("OPENER is used on bosses, it requires Fire Blast(3 charges),Phoenix(3 charges),Mirror Image & Combustion off CD", Color.Black);
                Log.Write("When you enable OPENER, your task is to prepot and precast first spell, routine will do the rest including Mi/Combustion", Color.Black);
                Log.Write("You must first ENABLE COOLDOWNS to be able to use OPENER. When OPENER finishes it's work it will automatically DISABLE", Color.Black);
                Log.Write("itself so you must enable OPENER on next pull. This is to prevent nabness and unwanted routine behaviour.", Color.Black);
                Log.Write("For Flamestrike and Meteor you have to create macros /cast [@cursor] spell_name (Flamestrike or Meteor).", Color.Black);

                return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_F1) < 0)
            {
                if (openerwatch.ElapsedMilliseconds > 1000)
                {
                    if (!Opener)
                    {
                        if (UseCooldowns && WoW.PlayerSpellCharges("Phoenix") == 3 && WoW.PlayerSpellCharges("Fire Blast") == 3 && !WoW.IsSpellOnCooldown("Combustion") &&
                            !WoW.IsSpellOnCooldown("Mirror Image"))
                        {
                            Opener = !Opener;
                            WoW.Speak("Opener " + (Opener ? "Enabled" : "Disabled"));
                            Log.Write("Opener " + (Opener ? "Enabled" : "Disabled"), Color.Red);
                            openerwatch.Restart();
                        }
                        else
                        {
                            WoW.Speak("Error");
                            Log.Write("ERROR: You don't have all necessary CD's/CHARGES to enable OPENER or you didn't ENABLE COOLDOWNS first!", Color.Red);
                            openerwatch.Restart();
                        }
                    }
                    else
                    {
                        Opener = !Opener;
                        WoW.Speak("Opener " + (Opener ? "Enabled" : "Disabled"));
                        Log.Write("Opener " + (Opener ? "Enabled" : "Disabled"), Color.Red);
                        openerwatch.Restart();
                    }
                }
            }

            if (LBwatch.ElapsedMilliseconds == 0)
            {
                LBwatch.Start();
                return;
            }


            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_F2) < 0)
            {
                if (LBwatch.ElapsedMilliseconds > 1000)
                {
                    UseLB = !UseLB;
                    WoW.Speak("Bomb " + (UseLB ? "On" : "Off"));
                    Log.Write("Living Bomb " + (UseLB ? "ON" : "OFF"), Color.Red);
                    LBwatch.Restart();
                }
            }

            if (interruptwatch.ElapsedMilliseconds == 0)
            {
                interruptwatch.Start();
                return;
            }


            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_F3) < 0)
            {
                if (interruptwatch.ElapsedMilliseconds > 1000)
                {
                    autointerrupt = !autointerrupt;
                    WoW.Speak("Interrupt " + (autointerrupt ? "On" : "Off"));
                    Log.Write("Auto interrupt " + (autointerrupt ? "ON" : "OFF"), Color.Red);
                    interruptwatch.Restart();
                }
            }

            if (pyrowatch.ElapsedMilliseconds == 0)
            {
                pyrowatch.Start();
                return;
            }


            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_F4) < 0)
            {
                if (pyrowatch.ElapsedMilliseconds > 1000)
                {
                    pyrocast = !pyrocast;
                    WoW.Speak("Using " + (pyrocast ? "Pyro" : "Flamestrike"));
                    Log.Write("Using " + (pyrocast ? "PYROBLAST" : "FLAMESTRIKE"), Color.Red);
                    pyrowatch.Restart();
                }
            }


            if (autoCDwatch.ElapsedMilliseconds == 0)
            {
                autoCDwatch.Start();
                return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0 && UseCooldowns)
            {
                if (autoCDwatch.ElapsedMilliseconds > 1000)
                {
                    autoCD = !autoCD;
                    WoW.Speak("Auto Burst " + (autoCD ? "On" : "Off"));
                    Log.Write("Automatic burst " + (autoCD ? "ON" : "OFF"), Color.Red);
                    autoCDwatch.Restart();
                }
            }


            if (WoW.PlayerHasBuff("Mount") || WoW.PlayerHasBuff("Invisibility") || WoW.PlayerHasBuff("InvisiStart"))
            {
                return;
            }

            /* Log.Write ("Combustion: " + WoW.SpellCooldownTimeRemaining("Combustion")); */

            if (flamewatch.ElapsedMilliseconds == 0)
            {
                flamewatch.Start();
                return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_OEM_3) < 0 && WoW.PlayerHasBuff("HotStreak") && WoW.IsInCombat && !WoW.IsSpellOnCooldown("Flamestrike") &&
                flamewatch.ElapsedMilliseconds > 1200)
            {
                WoW.CastSpell("Flamestrike");
                ForcePyro = false;
                flamewatch.Reset();
                Log.Write("Flamestrike CASTED", Color.Black);
                return;
            }

            if (meteorwatch.ElapsedMilliseconds == 0)
            {
                meteorwatch.Start();
                return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_XBUTTON1) < 0 && WoW.IsInCombat && !WoW.IsSpellOnCooldown("Meteor") && WoW.CanCast("Meteor") &&
                meteorwatch.ElapsedMilliseconds > 1000)
            {
                WoW.CastSpell("Meteor");
                meteorwatch.Reset();
                Log.Write("Meteor CASTED", Color.Black);
                return;
            }

            if (combatRoutine.Type == RotationType.SingleTarget)
            {
                if (CombatWatch.IsRunning && !WoW.IsInCombat)
                {
                    CombatWatch.Reset();
                }
                if (!CombatWatch.IsRunning && WoW.IsInCombat && UseCooldowns && Opener && WoW.HasTarget && WoW.TargetIsEnemy)
                {
                    CombatWatch.Start();
                    Log.Write("Entering Combat, Starting Opener.", Color.Red);
                    Log.Write("Aaalllriiiight! Who ordered up an extra large can of whoop-ass?", Color.Red);
                }

                if (CombatWatch.IsRunning && CombatWatch.ElapsedMilliseconds < 4500)
                {
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.PlayerSpellCharges("Phoenix") == 3 && WoW.CanCast("Phoenix") &&
                        !WoW.IsSpellOnCooldown("Phoenix") && !WoW.LastSpell.Equals("Phoenix") && !WoW.LastSpell.Equals("Fire Blast") &&
                        WoW.IsSpellInRange("Fireball"))
                    {
                        WoW.CastSpell("Phoenix");
                        return;
                    }
                    if (WoW.IsInCombat && !WoW.IsSpellOnCooldown("Combustion") && WoW.HasTarget && WoW.TargetIsEnemy && WoW.PlayerSpellCharges("Phoenix") == 2 &&
                        WoW.CanCast("Combustion") && WoW.CanCast("Mirror Image"))
                    {
                        Thread.Sleep(100);
                        WoW.CastSpell("Mirror Image");
                        Thread.Sleep(700);
                        WoW.CastSpell("Combustion");
                        Opener = !Opener;
                        WoW.Speak("Opener Finished" + (Opener ? "Enabled" : "Disabled"));
                        Log.Write("Opener Finished and disabled", Color.Red);
                        CombatWatch.Reset();
                        return;
                    }

                    Log.Write("Executing opener sequence");
                }

                if (CombatWatch.IsRunning && CombatWatch.ElapsedMilliseconds > 6500 && Opener)
                {
                    Opener = !Opener;
                    WoW.Speak("Opener Finished" + (Opener ? "Enabled" : "Disabled"));
                    Log.Write("Opener Finished and disabled", Color.Red);
                    CombatWatch.Reset();
                }

                if (CombatWatch.IsRunning && CombatWatch.ElapsedMilliseconds < 4300 && Opener)
                {
                    return;
                }

                if (autointerrupt && WoW.IsInCombat && !WoW.IsSpellOnCooldown("Counterspell") && WoW.HasTarget && WoW.TargetIsEnemy && !WoW.PlayerHasBuff("Combustion Aura") &&
                    WoW.TargetIsCasting && WoW.TargetIsCastingAndSpellIsInterruptible && WoW.TargetPercentCast >= 80)
                {
                    WoW.CastSpell("Counterspell");
                    return;
                }

                if (WoW.IsInCombat && WoW.CanCast("Blazing Barrier") && !WoW.PlayerHasBuff("Blazing Barrier Aura") && !WoW.LastSpell.Equals("Blazing Barrier") && WoW.HealthPercent < 70 &&
                    !WoW.PlayerHasBuff("Combustion Aura"))
                {
                    WoW.CastSpell("Blazing Barrier");
                    return;
                }

                if (WoW.IsInCombat && WoW.CanCast("Ice Block") && !WoW.PlayerHasBuff("Ice Block") && WoW.HealthPercent < 20 && !WoW.IsSpellOnCooldown("Ice Block"))
                {
                    WoW.CastSpell("Ice Block");
                    return;
                }

                if (autoCD && WoW.IsInCombat && !WoW.IsSpellOnCooldown("Combustion") && !WoW.IsSpellOnCooldown("Mirror Image") && WoW.HasTarget && WoW.TargetIsEnemy &&
                    WoW.CanCast("Combustion") && WoW.CanCast("Mirror Image") && (WoW.PlayerHasBuff("HotStreak") || WoW.PlayerHasBuff("HeatingUp")))
                {
                    Thread.Sleep(100);
                    WoW.CastSpell("Mirror Image");
                    Thread.Sleep(700);
                    WoW.CastSpell("Combustion");
                    autoCD = !autoCD;
                    WoW.Speak("Burst Finished");
                    Log.Write("Burst done, disabling burst", Color.Red);
                    return;
                }

                // Log.WritePixelMagic("Force Pyro "+ (ForcePyro ? "TRUE" : "FALSE"), Color.Red);

                // COMBUSTION PHASE //

                if (WoW.PlayerHasBuff("Combustion Aura"))                 /* What to do if we are in COMBUSTION BURST PHASE  */
                {
                    if (ForcePyro)
                    {
                        ForcePyro = !ForcePyro;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerHasBuff("HotStreak") && WoW.CanCast("Pyroblast"))
                    {
                        WoW.CastSpell("Pyroblast");

                        /* Thread.Sleep(100);
                         * if (WoW.PlayerSpellCharges("Fire Blast") >= 1) WoW.CastSpell("Fire Blast"); */
                        return;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerSpellCharges("Fire Blast") >= 1 && WoW.PlayerHasBuff("HeatingUp") &&
                        !WoW.LastSpell.Equals("Fire Blast") && !WoW.PlayerHasBuff("HotStreak"))
                    {
                        WoW.CastSpell("Fire Blast");
                        return;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.PlayerSpellCharges("Fire Blast") == 0 && WoW.CanCast("Phoenix") &&
                        WoW.PlayerSpellCharges("Phoenix") >= 1 && !WoW.IsSpellOnCooldown("Phoenix") && !WoW.PlayerHasBuff("HotStreak") &&
                        !WoW.LastSpell.Equals("Phoenix") && WoW.IsSpellInRange("Fireball"))
                    {
                        WoW.CastSpell("Phoenix");
                        return;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.PlayerSpellCharges("Phoenix") >= 1 && !WoW.IsSpellOnCooldown("Phoenix") &&
                        !WoW.PlayerHasBuff("HotStreak") && !WoW.PlayerHasBuff("HeatingUp") && WoW.CanCast("Phoenix") && !WoW.LastSpell.Equals("Phoenix") &&
                        !WoW.LastSpell.Equals("Fire Blast") && WoW.LastSpell.Equals("Combustion") && WoW.IsSpellInRange("Fireball"))
                    {
                        WoW.CastSpell("Phoenix");
                        return;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.CanCast("Scorch") && !WoW.PlayerHasBuff("HotStreak") &&
                        WoW.PlayerSpellCharges("Phoenix") == 0 && !WoW.LastSpell.Equals("Phoenix") && WoW.PlayerSpellCharges("Fire Blast") == 0)
                    {
                        WoW.CastSpell("Scorch");
                        return;
                    }
                    return;
                }

                // END COMBUSTION PHASE //

                // SUB 30% for BELT ROTATION //

                if (!WoW.PlayerHasBuff("Combustion Aura") && !WoW.LastSpell.Equals("Combustion") && !Opener &&
                    WoW.TargetHealthPercent <= 30 && !WoW.WasLastCasted("Combustion"))                        /* What to do if we are NOT MOVING - NON BURST PHASE */
                {
                    if (WoW.WasLastCasted("Pyroblast") && ForcePyro)
                    {
                        ForcePyro = !ForcePyro;
                    }
                    if (WoW.PlayerHasBuff("HeatingUp") && WoW.PlayerIsCasting && WoW.LastSpell.Equals("Scorch") && !ForcePyro)
                    {
                        ForcePyro = !ForcePyro;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.CanCast("Pyroblast") && ForcePyro)
                    {
                        if (pyrocast)
                        {
                            WoW.CastSpell("Pyroblast");
                        }
                        else
                        {
                            WoW.CastSpell("Flamestrike");
                        }
                        //WoW.CastSpell("Pyroblast");
                        Log.WritePixelMagic("FORCING PYRO/FLAMESTRIKE....", Color.Red);
                        ForcePyro = !ForcePyro;
                        if (WoW.PlayerSpellCharges("Fire Blast") >= 1 && UseCooldowns &&
                            ((WoW.SpellCooldownTimeRemaining("Combustion") > 22 && WoW.PlayerSpellCharges("Fire Blast") >= 1) ||
                             (WoW.SpellCooldownTimeRemaining("Combustion") > 13 && WoW.PlayerSpellCharges("Fire Blast") >= 2) ||
                             (WoW.SpellCooldownTimeRemaining("Combustion") > 7 && WoW.PlayerSpellCharges("Fire Blast") > 2)))
                        {
                            Thread.Sleep(500);
                            WoW.CastSpell("Fire Blast");
                            return;
                        }
                        else if (WoW.PlayerSpellCharges("Fire Blast") >= 1 && !UseCooldowns)
                        {
                            Thread.Sleep(500);
                            WoW.CastSpell("Fire Blast");
                            return;
                        }

                        return;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerHasBuff("HotStreak") && WoW.CanCast("Pyroblast") &&
                        !ForcePyro)
                    {
                        if (pyrocast)
                        {
                            WoW.CastSpell("Pyroblast");
                        }
                        else
                        {
                            WoW.CastSpell("Flamestrike");
                        }
                        //WoW.CastSpell("Pyroblast");
                        return;
                    }

                    /* if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.CanCast("Mirror Image")
                     *       && !WoW.IsSpellOnCooldown("Mirror Image"))
                     * {
                     *      WoW.CastSpell("Mirror Image");
                     *      return;
                     * }  */
                    /* if (!UseCooldowns && WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerSpellCharges("Fire Blast") >= 1
                     *      && !WoW.LastSpell.Equals("Fire Blast") && !WoW.PlayerHasBuff("HotStreak") && !WoW.PlayerHasBuff("HeatingUp"))
                     * {
                     *      Thread.Sleep(350);
                     *      WoW.CastSpell("Fire Blast");
                     *      return;
                     * }  */
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerSpellCharges("Fire Blast") >= 1 &&
                        !WoW.PlayerHasBuff("HeatingUp") && !WoW.LastSpell.Equals("Fire Blast") && !WoW.PlayerHasBuff("HotStreak") && WoW.IsSpellOnCooldown("Combustion") &&
                        ((WoW.SpellCooldownTimeRemaining("Combustion") > 22 && WoW.PlayerSpellCharges("Fire Blast") >= 1) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 13 && WoW.PlayerSpellCharges("Fire Blast") >= 2) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 7 && WoW.PlayerSpellCharges("Fire Blast") > 2)))
                    {
                        Thread.Sleep(500);
                        WoW.CastSpell("Fire Blast");
                        return;
                    }
                    if (!UseCooldowns && WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.PlayerSpellCharges("Fire Blast") == 0 && WoW.CanCast("Phoenix") &&
                        !WoW.PlayerHasBuff("HotStreak") && !WoW.PlayerHasBuff("HeatingUp") && WoW.IsSpellOnCooldown("Fire Blast") &&
                        WoW.IsSpellInRange("Fireball") && !WoW.LastSpell.Equals("Fire Blast") && (WoW.PlayerSpellCharges("Phoenix") > 1))
                    {
                        WoW.CastSpell("Phoenix");
                        return;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.PlayerSpellCharges("Fire Blast") == 0 && WoW.CanCast("Phoenix") &&
                        !WoW.PlayerHasBuff("HotStreak") && !WoW.PlayerHasBuff("HeatingUp") && WoW.IsSpellOnCooldown("Fire Blast") &&
                        WoW.IsSpellInRange("Fireball") && !WoW.LastSpell.Equals("Fire Blast") &&
                        ((WoW.PlayerSpellCharges("Phoenix") > 2) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 20 && WoW.PlayerSpellCharges("Phoenix") > 1) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 45 && WoW.PlayerSpellCharges("Phoenix") == 1)))
                    {
                        WoW.CastSpell("Phoenix");
                        return;
                    }
                    if (UseLB && WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.CanCast("Living Bomb") && !WoW.IsSpellOnCooldown("Living Bomb") &&
                        !WoW.PlayerHasBuff("HotStreak") && WoW.IsSpellInRange("Fireball"))
                    {
                        WoW.CastSpell("Living Bomb");
                        return;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Scorch") && WoW.CanCast("Scorch") && WoW.TargetHealthPercent <= 30 &&
                        !WoW.PlayerHasBuff("HotStreak") && !WoW.IsSpellOnGCD("Scorch") && !WoW.PlayerIsCasting && !ForcePyro)
                    {
                        WoW.CastSpell("Scorch");
                        return;
                    }

                    return;
                }

                // END SUB 30% for BELT ROTATION //


                // MOVING PHASE //

                if (WoW.IsMoving && !WoW.PlayerHasBuff("Combustion Aura") && !WoW.LastSpell.Equals("Combustion") && !WoW.WasLastCasted("Combustion") && !Opener &&
                    WoW.TargetHealthPercent > 30)                         /* What to do if we are MOVING */
                {
                    if (ForcePyro)
                    {
                        ForcePyro = !ForcePyro;
                    }

                    // Legendary Bracers support
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.CanCast("Pyroblast") && !WoW.WasLastCasted("Pyroblast") &&
                        !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion Aura") && WoW.PlayerHasBuff("Legendary Bracers") && WoW.PlayerBuffTimeRemaining("Legendary Bracers") > 4 &&
                        !WoW.PlayerHasBuff("Hot Streak!"))
                    {
                        WoW.CastSpell("Pyroblast");
                        return;
                    }
                    // END Legendary Bracers support

                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerHasBuff("HotStreak") && WoW.CanCast("Pyroblast"))
                    {
                        WoW.CastSpell("Pyroblast");
                        return;
                    }

                    /* if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.CanCast("Mirror Image")
                     *       && !WoW.IsSpellOnCooldown("Mirror Image"))
                     * {
                     *      WoW.CastSpell("Mirror Image");
                     *      return;
                     * }   */
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerSpellCharges("Fire Blast") >= 1 && WoW.PlayerHasBuff("HeatingUp") &&
                        !WoW.LastSpell.Equals("Fire Blast") && !WoW.PlayerHasBuff("HotStreak") && WoW.IsSpellOnCooldown("Combustion") &&
                        ((WoW.SpellCooldownTimeRemaining("Combustion") > 24 && WoW.PlayerSpellCharges("Fire Blast") >= 1) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 15 && WoW.PlayerSpellCharges("Fire Blast") >= 2) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 8 && WoW.PlayerSpellCharges("Fire Blast") > 2)))
                    {
                        WoW.CastSpell("Fire Blast");
                        return;
                    }
                    if (!UseCooldowns && WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerSpellCharges("Fire Blast") >= 1 &&
                        WoW.PlayerHasBuff("HeatingUp") && !WoW.LastSpell.Equals("Fire Blast") && !WoW.PlayerHasBuff("HotStreak"))
                    {
                        WoW.CastSpell("Fire Blast");
                        return;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.PlayerSpellCharges("Fire Blast") == 0 && WoW.CanCast("Phoenix") &&
                        !WoW.PlayerHasBuff("HotStreak") && WoW.IsSpellOnCooldown("Fire Blast") &&
                        !WoW.LastSpell.Equals("Phoenix") && WoW.IsSpellInRange("Fireball") && !WoW.LastSpell.Equals("Fire Blast") &&
                        ((WoW.SpellCooldownTimeRemaining("Combustion") > 20 && WoW.PlayerSpellCharges("Phoenix") > 2) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 30 && WoW.PlayerSpellCharges("Phoenix") > 1) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 65 && WoW.PlayerSpellCharges("Phoenix") == 1)))
                    {
                        WoW.CastSpell("Phoenix");
                        return;
                    }
                    if (!UseCooldowns && WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.PlayerSpellCharges("Fire Blast") == 0 && WoW.CanCast("Phoenix") &&
                        !WoW.PlayerHasBuff("HotStreak") && WoW.IsSpellOnCooldown("Fire Blast") && !WoW.LastSpell.Equals("Fire Blast") &&
                        !WoW.LastSpell.Equals("Phoenix") && WoW.IsSpellInRange("Fireball") && WoW.PlayerSpellCharges("Phoenix") > 1)
                    {
                        WoW.CastSpell("Phoenix");
                        return;
                    }
                    if (UseLB && WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.CanCast("Living Bomb") && !WoW.IsSpellOnCooldown("Living Bomb") &&
                        !WoW.PlayerHasBuff("HotStreak") && WoW.IsSpellInRange("Fireball"))
                    {
                        WoW.CastSpell("Living Bomb");
                        return;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Scorch") && WoW.CanCast("Scorch") && !WoW.PlayerHasBuff("HotStreak"))
                    {
                        WoW.CastSpell("Scorch");
                        return;
                    }
                    return;
                }

                // END MOVING PHASE //

                // SINGLE TARGET STAND STILL PHASE //

                if (!WoW.IsMoving && !WoW.PlayerHasBuff("Combustion Aura") && !WoW.LastSpell.Equals("Combustion") && !WoW.WasLastCasted("Combustion") && !Opener &&
                    WoW.TargetHealthPercent > 30)                        /* What to do if we are NOT MOVING - NON BURST PHASE */
                {
                    /* double dur = WoW.GetDebuffTimeRemaining("Shadowflame");
                     * Log.Write(System.Convert.ToString(dur), Color.Red); */
                    if (ForcePyro)
                    {
                        ForcePyro = !ForcePyro;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerHasBuff("HotStreak") && WoW.CanCast("Pyroblast") &&
                        !WoW.WasLastCasted("Pyroblast"))
                    {
                        if (pyrocast)
                        {
                            WoW.CastSpell("Pyroblast");
                        }
                        else
                        {
                            WoW.CastSpell("Flamestrike");
                        }
                        //WoW.CastSpell("Pyroblast");
                        return;
                    }

                    // Legendary Bracers support
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.CanCast("Pyroblast") && !WoW.WasLastCasted("Pyroblast") &&
                        !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion Aura") && WoW.PlayerHasBuff("Legendary Bracers") && WoW.PlayerBuffTimeRemaining("Legendary Bracers") > 4 &&
                        !WoW.PlayerHasBuff("Hot Streak!"))
                    {
                        WoW.CastSpell("Pyroblast");
                        return;
                    }
                    // END Legendary Bracers support

                    /* if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.CanCast("Mirror Image")
                     *       && !WoW.IsSpellOnCooldown("Mirror Image"))
                     * {
                     *      WoW.CastSpell("Mirror Image");
                     *      return;
                     * }   */
                    /* if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.CanCast("Cinderstorm")
                     *      && WoW.TargetHasDebuff("Ignite") && !WoW.IsSpellOnCooldown("Cinderstorm"))
                     * {
                     *      WoW.CastSpell("Cinderstorm");
                     *      return;
                     * }   */
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerSpellCharges("Fire Blast") >= 1 && WoW.PlayerHasBuff("HeatingUp") &&
                        !WoW.LastSpell.Equals("Fire Blast") && !WoW.PlayerHasBuff("HotStreak") && WoW.IsSpellOnCooldown("Combustion") &&
                        ((WoW.SpellCooldownTimeRemaining("Combustion") > 24 && WoW.PlayerSpellCharges("Fire Blast") >= 1) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 15 && WoW.PlayerSpellCharges("Fire Blast") >= 2) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 8 && WoW.PlayerSpellCharges("Fire Blast") > 2)))
                    {
                        WoW.CastSpell("Fire Blast");
                        return;
                    }
                    if (!UseCooldowns && WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.PlayerSpellCharges("Fire Blast") >= 1 &&
                        WoW.PlayerHasBuff("HeatingUp") && !WoW.LastSpell.Equals("Fire Blast") && !WoW.PlayerHasBuff("HotStreak"))
                    {
                        WoW.CastSpell("Fire Blast");
                        return;
                    }
                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.PlayerSpellCharges("Fire Blast") == 0 && WoW.CanCast("Phoenix") &&
                        !WoW.PlayerHasBuff("HotStreak") && WoW.IsSpellOnCooldown("Fire Blast") &&
                        !WoW.LastSpell.Equals("Phoenix") && WoW.IsSpellInRange("Fireball") && !WoW.LastSpell.Equals("Fire Blast") &&
                        ((WoW.SpellCooldownTimeRemaining("Combustion") > 20 && WoW.PlayerSpellCharges("Phoenix") > 2) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 30 && WoW.PlayerSpellCharges("Phoenix") > 1) ||
                         (WoW.SpellCooldownTimeRemaining("Combustion") > 65 && WoW.PlayerSpellCharges("Phoenix") == 1)))
                    {
                        WoW.CastSpell("Phoenix");
                        return;
                    }
                    if (!UseCooldowns && WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.PlayerSpellCharges("Fire Blast") == 0 && WoW.CanCast("Phoenix") &&
                        !WoW.PlayerHasBuff("HotStreak") && WoW.IsSpellOnCooldown("Fire Blast") && !WoW.LastSpell.Equals("Fire Blast") &&
                        !WoW.LastSpell.Equals("Phoenix") && WoW.IsSpellInRange("Fireball") && WoW.PlayerSpellCharges("Phoenix") > 1)
                    {
                        WoW.CastSpell("Phoenix");
                        return;
                    }
                    if (UseLB && WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.CanCast("Living Bomb") && !WoW.IsSpellOnCooldown("Living Bomb") &&
                        !WoW.PlayerHasBuff("HotStreak") && WoW.IsSpellInRange("Fireball"))
                    {
                        WoW.CastSpell("Living Bomb");
                        return;
                    }

                    if (WoW.IsInCombat && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Fireball") && WoW.CanCast("Fireball") && WoW.TargetHealthPercent > 30)
                    {
                        WoW.CastSpell("Fireball");
                        return;
                    }
                }

                return;
            }
            if ((combatRoutine.Type == RotationType.AOE) || (combatRoutine.Type == RotationType.SingleTargetCleave))
            {
                if (WoW.IsMoving)                 /* AOE WHEN MOVING */
                {
                }

                if (!WoW.IsMoving)                      /* AOE WHEN NOT MOVING */
                {
                }
            }
        }
 public override void Pulse()
 {
     if (DetectKeyPress.GetKeyState(cooldownKey) < 0 && (cooldownModifier == -1 || cooldownModifier != -1 && DetectKeyPress.GetKeyState(cooldownModifier) < 0))
     {
         UseCooldowns = !UseCooldowns;
         Thread.Sleep(150);
     }
     if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat && WoW.TargetIsVisible && (!WoW.IsMounted || WoW.PlayerHasBuff("Divine Steed")))
     {
         //Offensive Cooldowns
         if (WoW.CanCast("Avenging Wrath") && ischeckHotkeysProtAW && UseCooldowns && WoW.PlayerHasBuff("Seraphim") && WoW.Talent(7) == 2 && WoW.IsSpellInRange("Rebuke"))
         {
             WoW.CastSpell("Avenging Wrath");
             return;
         }
         if (WoW.CanCast("Avenging Wrath") && ischeckHotkeysProtAW && UseCooldowns && WoW.Talent(7) != 2 && WoW.IsSpellInRange("Rebuke"))
         {
             WoW.CastSpell("Avenging Wrath");
             return;
         }
         if (WoW.CanCast("Rebuke") && ischeckHotkeysProtKick && WoW.TargetIsCastingAndSpellIsInterruptible && WoW.TargetPercentCast >= ProtKickPercent && !WoW.IsSpellOnCooldown("Rebuke") && !WoW.PlayerIsChanneling && WoW.IsSpellInRange("Rebuke"))
         {
             WoW.CastSpell("Rebuke");
             return;
         }
         if (WoW.CanCast("Bastion of Light") && ischeckHotkeysProtBOL && UseCooldowns && WoW.Talent(2) == 2 && WoW.PlayerSpellCharges("Shield of the Righteous") == 0 && WoW.IsSpellInRange("Rebuke"))
         {
             WoW.CastSpell("Bastion of Light");
             return;
         }
         // Defensive Cooldowns
         if (WoW.CanCast("Eye of Tyr") && ischeckHotkeysProtEoT && !WoW.IsSpellOnCooldown("Eye of Tyr") && WoW.HealthPercent <= ProtEoTPercent && WoW.IsSpellInRange("Rebuke"))
         {
             WoW.CastSpell("Eye of Tyr");
             return;
         }
         if (WoW.CanCast("Ardent Defender") && ischeckHotkeysProtAD && !WoW.IsSpellOnCooldown("Ardent Defender") && WoW.HealthPercent <= ProtADPercent)
         {
             WoW.CastSpell("Ardent Defender");
             return;
         }
         if (WoW.CanCast("Guardian of the Ancient Kings") && ischeckHotkeysProtGotAK && !WoW.IsSpellOnCooldown("Guardian of the Ancient Kings") && WoW.HealthPercent <= ProtGotAKPercent)
         {
             WoW.CastSpell("Guardian of the Ancient Kings");
             return;
         }
         if (WoW.CanCast("Lay on Hands") && ischeckHotkeysProtLoH && !WoW.IsSpellOnCooldown("Lay on Hands") && WoW.HealthPercent <= ProtLoHPercent)
         {
             WoW.CastSpell("Lay on Hands");
             return;
         }
         if (WoW.CanCast("Hand of the Protector") && ischeckHotkeysProtLotP && !WoW.IsSpellOnCooldown("Hand of the Protector") && WoW.HealthPercent <= ProtLotPPercent && WoW.Talent(5) == 1)
         {
             WoW.CastSpell("Hand of the Protector");
             return;
         }
         if (WoW.CanCast("Light of the Protector") && ischeckHotkeysProtLotP && !WoW.IsSpellOnCooldown("Light of the Protector") && WoW.HealthPercent <= ProtLotPPercent && WoW.Talent(5) != 1)
         {
             WoW.CastSpell("Light of the Protector");
             return;
         }
         //Rotation
         if (combatRoutine.Type == RotationType.SingleTarget || combatRoutine.Type == RotationType.SingleTargetCleave || combatRoutine.Type == RotationType.AOE)
         {
             if (!WoW.IsSpellOnCooldown("Seraphim") && WoW.PlayerSpellCharges("Shield of the Righteous") >= 2 && WoW.HealthPercent >= 80 && WoW.IsSpellInRange("Rebuke") && WoW.Talent(7) == 2)
             {
                 WoW.CastSpell("Seraphim");
                 return;
             }
             if (WoW.PlayerSpellCharges("Shield of the Righteous") == 3 && WoW.IsSpellInRange("Rebuke"))
             {
                 WoW.CastSpell("Shield of the Righteous");
                 return;
             }
             if (WoW.PlayerHasBuff("Shield of the Righteous") && WoW.PlayerBuffTimeRemaining("Shield of the Righteous") <= 1.5 && WoW.IsSpellInRange("Rebuke"))
             {
                 WoW.CastSpell("Shield of the Righteous");
                 return;
             }
             if (WoW.PlayerSpellCharges("Shield of the Righteous") >= 1 && WoW.HealthPercent <= 80 && (!WoW.PlayerHasBuff("Shield of the Righteous") || WoW.PlayerBuffTimeRemaining("Shield of the Righteous") <= 1.5) && WoW.IsSpellInRange("Rebuke"))
             {
                 WoW.CastSpell("Shield of the Righteous");
                 return;
             }
             if (WoW.Talent(1) == 2 && WoW.CanCast("Blessed Hammer") && WoW.PlayerSpellCharges("Blessed Hammer") >= 3 && !WoW.IsSpellOnGCD("Blessed Hammer") && WoW.IsSpellInRange("Rebuke"))
             {
                 WoW.CastSpell("Blessed Hammer");
                 return;
             }
             if (WoW.Talent(1) != 2 && WoW.CanCast("Hammer of the Righteous") && WoW.PlayerSpellCharges("Hammer of the Righteous") >= 1 && !WoW.IsSpellOnGCD("Hammer of the Righteous") && WoW.IsSpellInRange("Rebuke"))
             {
                 WoW.CastSpell("Hammer of the Righteous");
                 return;
             }
             if (WoW.CanCast("Judgement") && !WoW.IsSpellOnGCD("Judgement"))
             {
                 WoW.CastSpell("Judgement");
                 return;
             }
             if (WoW.CanCast("Consecration") && !WoW.IsSpellOnGCD("Consecration") && !WoW.TargetHasDebuff("Consecration") && WoW.IsSpellInRange("Rebuke"))
             {
                 WoW.CastSpell("Consecration");
                 return;
             }
             if (WoW.CanCast("Avenger's Shield") && !WoW.IsSpellOnGCD("Avenger's Shield"))
             {
                 WoW.CastSpell("Avenger's Shield");
                 return;
             }
             if (WoW.Talent(1) == 2 && WoW.CanCast("Blessed Hammer") && WoW.PlayerSpellCharges("Blessed Hammer") >= 1 && !WoW.IsSpellOnGCD("Blessed Hammer") && !WoW.TargetHasDebuff("Blessed Hammer") && WoW.IsSpellInRange("Rebuke"))
             {
                 WoW.CastSpell("Blessed Hammer");
                 return;
             }
         }
     }
 }
Ejemplo n.º 6
0
        public override void Pulse()



        {
            if (WoW.CanCast("Battle cry") && UseCooldowns)
            {
                WoW.CastSpell("Battle cry");
                return;
            }

            if (WoW.CanCast("Avatar") && UseCooldowns && WoW.Talent(3) == 3 && WoW.PlayerHasBuff("Battle cry"))
            {
                WoW.CastSpell("Avatar");
                return;
            }

            if (WoW.CanCast("Odyns fury") && WoW.Level >= 101 && WoW.IsSpellOnCooldown("Raging Blow") && WoW.PlayerHasBuff("Battle cry") && !WoW.IsSpellOnGCD("Raging Blow") &&
                WoW.PlayerHasBuff("Frothing") && WoW.Rage < 100)
            {
                WoW.CastSpell("Odyns fury");
                return;
            }

            if (WoW.PlayerHealthPercent <= EnragedRegenerationHealth && WoW.CanCast("Enraged Regeneration"))
            {
                WoW.CastSpell("Enraged Regeneration");
                WoW.CastSpell("Raging Blow");
                return;
            }

            if (WoW.PlayerHealthPercent <= CommandingShout && WoW.CanCast("Commanding shout"))
            {
                WoW.CastSpell("Commanding shout");
                return;
            }

            if (Pummel && WoW.CanCast("Pummel") && WoW.Level >= 24 && WoW.TargetIsCastingAndSpellIsInterruptible && WoW.IsSpellInRange("Pummel") && WoW.TargetPercentCast > Random.Next(50, 85))

            {
                WoW.CastSpell("Pummel");
                return;
            }

            if (WoW.PlayerHasDebuff("Fear"))
            {
                if (WoW.CanCast("Berserker Rage"))
                {
                    WoW.CastSpell("Berserker Rage");
                }
                else if (WoW.CanCast("Will of the Forsaken"))
                {
                    WoW.CastSpell("Will of the Forsaken");
                }
                else if (WoW.CanCast("Every Man For Himself"))
                {
                    WoW.CastSpell("Every Man For Himself");
                }
                return;
            }

            if (WoW.TargetHealthPercent == 0 && WoW.IsInCombat && WoW.RangeToTarget <= 5 && WoW.CountEnemyNPCsInRange >= 1 && !WoW.IsMounted || !WoW.HasTarget && WoW.IsInCombat && WoW.CountEnemyNPCsInRange >= 1 && WoW.RangeToTarget <= 6 && !WoW.IsMounted)
            {
                WoW.TargetNextEnemy();
                return;
            }

            if (combatRoutine.Type == RotationType.SingleTarget && WoW.TargetHealthPercent <= 20 && WoW.Level >= 60)
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.RangeToTarget <= 6 && WoW.IsInCombat)


                {
                    if (WoW.CanCast("Execute") && !WoW.PlayerHasBuff("Juggernaut") || WoW.CanCast("Execute") && WoW.PlayerBuffTimeRemaining("Juggernaut") < 2 || WoW.CanCast("Execute") &&
                        WoW.SpellCooldownTimeRemaining("Battle cry") < 10000 || WoW.CanCast("Execute") && WoW.Rage >= 100 || WoW.CanCast("Execute") && WoW.PlayerHasBuff("SenseDeath") &&
                        WoW.Rage >= 100 || WoW.CanCast("Execute") && WoW.PlayerHasBuff("Battle cry") && WoW.PlayerHasBuff("Frothing"))
                    {
                        WoW.CastSpell("Execute");
                        return;

                        if (WoW.CanCast("Execute") && WoW.Level >= 8 && WoW.Rage >= 50)
                        {
                            WoW.CastSpell("Execute");
                            return;
                        }
                        if (WoW.CanCast("Bloodthirst") && WoW.Rage < 100 && WoW.SpellCooldownTimeRemaining("Battle cry") >= 11000 || WoW.CanCast("Bloodthirst") && WoW.Rage < 25 && WoW.Level >= 10 && WoW.SpellCooldownTimeRemaining("Battle cry") <= 9000 || WoW.CanCast("Bloodthirst") && WoW.IsSpellOnCooldown("Raging Blow") || WoW.CanCast("Rampage") && WoW.Level >= 12 && HasSouloftheBattlelord && WoW.PlayerHasBuff("Massacre"))
                        {
                            WoW.CastSpell("Bloodthirst");
                            return;
                        }
                        if (WoW.CanCast("Raging Blow") && WoW.Rage < 100 && WoW.IsSpellOnCooldown("Bloodthirst") && WoW.SpellCooldownTimeRemaining("Battle cry") >= 11000 || WoW.CanCast("Raging Blow") && WoW.Rage < 25 && WoW.IsSpellOnCooldown("Bloodthirst") && WoW.Level >= 13 && WoW.SpellCooldownTimeRemaining("BattleCry") <= 9000)
                        {
                            WoW.CastSpell("Raging Blow");
                            return;
                        }

                        if (WoW.CanCast("Furious Slash") && WoW.IsSpellOnCooldown("Raging Blow") && !WoW.IsSpellOnGCD("Bloodthirst") && WoW.Level >= 10 && !WoW.IsSpellOnGCD("Raging Blow") &&
                            WoW.PlayerBuffTimeRemaining("TasteForBlood") <= 4000)
                        {
                            WoW.CastSpell("Furious Slash");
                            return;
                        }
                    }
                }
            }



            if (combatRoutine.Type == RotationType.SingleTarget && WoW.TargetHealthPercent >= 21 && !WoW.PlayerHasBuff("Battle cry"))
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.RangeToTarget <= 6 && WoW.IsInCombat)


                {
                    if (WoW.CanCast("Execute") && WoW.Level >= 8 && HasAyalasStoneHeart)
                    {
                        WoW.CastSpell("Execute");
                        return;
                    }

                    if (WoW.CanCast("Rampage") && WoW.Rage == 100 && WoW.Level >= 18)
                    {
                        WoW.CastSpell("Rampage");
                        return;
                    }

                    if ((WoW.CanCast("Bloodthirst") && !WoW.PlayerHasBuff("Enrage") && WoW.Rage < 100 && WoW.Level >= 10) || WoW.CanCast("Bloodthirst") && WoW.IsSpellOnCooldown("Raging Blow") &&
                        WoW.Rage < 100 && WoW.Level >= 10)
                    {
                        WoW.CastSpell("Bloodthirst");
                        return;
                    }

                    if (WoW.CanCast("Raging Blow") && WoW.Level >= 13)
                    {
                        WoW.CastSpell("Raging Blow");
                        return;
                    }

                    if (WoW.CanCast("Whirlwind") && WoW.PlayerHasBuff("Wrecking Ball") && WoW.IsSpellOnCooldown("Raging Blow") && WoW.Talent(3) == 1 && WoW.PlayerHasBuff("Enrage"))
                    {
                        WoW.CastSpell("Whirlwind");
                        return;
                    }

                    if (WoW.CanCast("Furious Slash") && WoW.IsSpellOnCooldown("Raging Blow") && !WoW.IsSpellOnGCD("Bloodthirst") && WoW.Level >= 10 && !WoW.IsSpellOnGCD("Raging Blow") && WoW.PlayerBuffTimeRemaining("TasteForBlood") <= 4000 && WoW.Rage <= 90 && WoW.SpellCooldownTimeRemaining("Bloodthirst") <= 1000)
                    {
                        WoW.CastSpell("Furious Slash");
                        return;
                    }
                }
            }


            if (combatRoutine.Type == RotationType.SingleTarget && WoW.TargetHealthPercent >= 21 && WoW.PlayerHasBuff("Battle cry"))
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.RangeToTarget <= 6 && WoW.IsInCombat)

                {
                    if (WoW.CanCast("Execute") && WoW.Level >= 8 && HasAyalasStoneHeart)
                    {
                        WoW.CastSpell("Execute");
                        return;
                    }

                    if (WoW.CanCast("Rampage") && WoW.Level >= 12 && WoW.Rage >= 100)
                    {
                        WoW.CastSpell("Rampage");
                        return;
                    }
                    if (WoW.CanCast("Raging Blow") && WoW.Level >= 20 && WoW.PlayerHasBuff("Enrage"))
                    {
                        WoW.CastSpell("Raging Blow");
                        return;
                    }

                    if (WoW.CanCast("Bloodthirst") && WoW.Level >= 10)
                    {
                        WoW.CastSpell("Bloodthirst");
                        return;
                    }

                    if (WoW.CanCast("Furious Slash") && WoW.Level >= 10)
                    {
                        WoW.CastSpell("Furious Slash");
                        return;
                    }
                }
            }


            if (combatRoutine.Type == RotationType.Cleave)
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.RangeToTarget <= 6 && WoW.IsInCombat)

                {
                    if (WoW.CanCast("Execute") && WoW.Level >= 8 && HasAyalasStoneHeart)
                    {
                        WoW.CastSpell("Execute");
                        return;
                    }
                    if (WoW.CanCast("Whirlwind") && !WoW.PlayerHasBuff("Meat-Cleaver") && WoW.Level >= 28 || WoW.CanCast("Whirlwind") && WoW.PlayerHasBuff("Wrecking Ball") && WoW.Talent(3) == 1 &&
                        WoW.Level >= 45)
                    {
                        WoW.CastSpell("Whirlwind");
                        return;
                    }
                    if (WoW.CanCast("Rampage") && WoW.Rage == 100 && WoW.Level >= 12 && !WoW.PlayerHasBuff("Enrage") && WoW.PlayerHasBuff("Meat cleaver"))
                    {
                        WoW.CastSpell("Rampage");
                        return;
                    }

                    if (WoW.CanCast("Furious Slash") && WoW.IsSpellOnCooldown("Raging Blow") && !WoW.IsSpellOnGCD("Bloodthirst") && WoW.Level >= 10 && !WoW.IsSpellOnGCD("Raging Blow") &&
                        WoW.PlayerBuffTimeRemaining("TasteForBlood") <= 4000)
                    {
                        WoW.CastSpell("Furious Slash");
                        return;
                    }


                    if (WoW.CanCast("Bloodthirst") && WoW.Rage < 100 && WoW.CountEnemyNPCsInRange < 8 && WoW.PlayerHasBuff("Meat-Cleaver") && !WoW.PlayerHasBuff("Enrage") && WoW.Level >= 10)
                    {
                        WoW.CastSpell("Bloodthirst");
                        return;
                    }
                    if (WoW.CanCast("Raging Blow") && WoW.PlayerHasBuff("Enrage") && WoW.CountEnemyNPCsInRange < 4 && WoW.Level >= 13)
                    {
                        WoW.CastSpell("Raging Blow");
                        return;
                    }
                }
            }
        }