Beispiel #1
0
        public override void Pulse()
        {
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_LSHIFT) < 0)
            {
                return;
            }
            if (!WoW.HasTarget || !WoW.TargetIsEnemy)
            {
                WoW.TargetNearestEnemy();
            }

            if (WoW.IsSpellInRange("Soul Carver"))
            {
                if (combatRoutine.Type == RotationType.SingleTarget)
                {
                    SurvivalRotation();
                }
                else
                {
                    BombRotation();
                }
            }

            else if (WoW.IsSpellInRange("Throw Glaive"))
            {
                WoW.CastSpell("Throw Glaive", !WoW.IsSpellOnCooldown("Throw Glaive"));
            }
        }
Beispiel #2
0
        //Choose Spec Rotation
        internal static void DoDeathKnight()
        {
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_XBUTTON1) < 0)
            {
                if (Anthrax.AI.Controllers.Spell.CanCast((int)Spells.DnD) || Anthrax.AI.Controllers.Spell.CanCast((int)Spells.Defile))
                {
                    MouseController.RightClick();
                    if (Anthrax.AI.Controllers.Spell.CanCast((int)Spells.Defile))
                    {
                        ActionBar.ExecuteSpell((int)Spells.Defile);
                    }
                    else
                    {
                        ActionBar.ExecuteSpell((int)Spells.DnD);
                    }
                    MouseController.LockCursor();
                    MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                    MouseController.LeftClick();
                    MouseController.UnlockCursor();
                }
                return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_XBUTTON2) < 0)
            {
                if (Anthrax.AI.Controllers.Spell.CanCast((int)Spells.Amz))
                {
                    MouseController.RightClick();
                    ActionBar.ExecuteSpell((int)Spells.Amz);
                    MouseController.LockCursor();
                    MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                    MouseController.LeftClick();
                    MouseController.UnlockCursor();
                }
                return;
            }


            switch (ObjectManager.LocalPlayer.Specialization)
            {
            case Anthrax.WoW.Classes.ObjectManager.WowPlayer.WowSpecialization.DeathknightFrost:
                DoDeathKnightFrost();
                break;

            case Anthrax.WoW.Classes.ObjectManager.WowPlayer.WowSpecialization.DeathknightUnholy:
                DoDeathKnightUnholy();
                break;

            case Anthrax.WoW.Classes.ObjectManager.WowPlayer.WowSpecialization.DeathknightBlood:
                DoDeathKnightBlood();
                break;
            }
        }
Beispiel #3
0
        //-Pulse--------------------//
        public override void Pulse()
        {
            if (DetectKeyPress.GetKeyState(0x76) < 0)
            {
                UseCooldowns = !UseCooldowns;
                Thread.Sleep(150);
            }


            if (WoW.IsInCombat)
            {
                interruptwatch.Start();
            }
            else
            {
                return;
            }

            if (combatRoutine.Type != RotationType.SingleTarget && combatRoutine.Type != RotationType.AOE)
            {
                return;
            }
            if (!WoW.HasTarget || !WoW.TargetIsEnemy)
            {
                return;
            }

            if (WoW.HealthPercent < txtPWS && !WoW.PlayerHasBuff(POWER_WORD_SHIELD) && !WoW.IsSpellOnCooldown(POWER_WORD_SHIELD))
            {
                Log.Write("Health below " + txtPWS + "% - Using PWS now", Color.Red);
                SpellCast(POWER_WORD_SHIELD);
                return;
            }
            if (SilenceBox.Checked && WoW.TargetIsCastingAndSpellIsInterruptible && interruptwatch.ElapsedMilliseconds > 900)
            {
                if (!WoW.IsSpellOnCooldown(SILENCE))
                {
                    SpellCast(SILENCE);
                    interruptwatch.Reset();
                    interruptwatch.Start();
                    return;
                }
            }

            if (!(WoW.PlayerHasBuff(SHADOWFORM_AURA) || WoW.PlayerHasBuff(VOIDFORM_AURA)))
            {
                SpellCast(SHADOWFORM);
            }
            CooldownUsage();
            SingleTargetRotation();
        }
        public override void Pulse()
        {
            if (stopwatch.ElapsedMilliseconds == 0)
            {
                stopwatch.Start();
                Log.WriteCloudMagic("The Cooldown toggle button is now Active (Numpad9). The delay is set to 1000ms ( 1 second )", Color.Black);
                return;
            }
            {
                if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_NUMPAD9) < 0)
                {
                    if (stopwatch.ElapsedMilliseconds > 1000)
                    {
                        combatRoutine.UseCooldowns = !combatRoutine.UseCooldowns;
                        stopwatch.Restart();
                    }
                }
                if (combatRoutine.Type == RotationType.SingleTarget)
                {
                    if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat)
                    {
                        if (UseCooldowns && RuneOfPower && WoW.PlayerSpellCharges("Rune of Power") >= 1 && WoW.SpellCooldownTimeRemaining("Combustion") >= 4000 &&
                            WoW.PlayerHasBuff("Hot Streak!") && !WoW.PlayerIsCasting && !WoW.IsMoving && !WoW.PlayerHasBuff("Rune of Power") && !WoW.IsSpellOnCooldown("Rune of Power") ||
                            (UseCooldowns && RuneOfPower && !WoW.PlayerIsCasting && WoW.PlayerSpellCharges("Fire Blast") == 3 && WoW.PlayerSpellCharges("Phoenix's Flames") >= 2 &&
                             !WoW.IsMoving && !WoW.IsSpellOnCooldown("Combustion") && WoW.PlayerSpellCharges("Rune of Power") >= 1 && WoW.PlayerHasBuff("Hot Streak!") &&
                             !WoW.PlayerHasBuff("Rune of Power") && !WoW.IsSpellOnCooldown("Rune of Power")))
                        {
                            WoW.CastSpell("Rune of Power");
                            return;
                        }
                        if (UseCooldowns && Mirrors && WoW.CanCast("Mirror Image") && !WoW.IsSpellOnCooldown("Mirror Image") && WoW.PlayerHasBuff("Combustion"))
                        {
                            WoW.CastSpell("Mirror Image");
                            return;
                        }
                        if (WoW.CanCast("Scorch") && WoW.IsMoving && !WoW.PlayerHasBuff("Hot Streak!"))
                        {
                            WoW.CastSpell("Scorch");
                            return;
                        }
                        if (WoW.IsInCombat && Meteor && Control.ModifierKeys == Keys.Alt && !WoW.PlayerIsCasting)
                        {
                            WoW.CastSpell("Meteor");
                            return;
                        }
                        if (WoW.CanCast("Phoenix's Flames") && !WoW.PlayerHasBuff("Hot Streak!") && WoW.IsSpellOnCooldown("Fire Blast") && WoW.SpellCooldownTimeRemaining("Fire Blast") > 110 &&
                            WoW.PlayerHasBuff("Heating Up") && UseCooldowns && Combustion && WoW.PlayerSpellCharges("Phoenix's Flames") == 3 && !WoW.IsSpellOnCooldown("Combustion"))
                        {
                            WoW.CastSpell("Phoenix's Flames");
                            return;
                        }
                        if (WoW.PlayerIsCasting && UseCooldowns && WoW.PlayerHasBuff("Heating Up") && Combustion && WoW.PlayerSpellCharges("Phoenix's Flames") == 3 &&
                            !WoW.IsSpellOnCooldown("Combustion"))
                        {
                            WoW.CastSpell("Phoenix's Flames");
                            return;
                        }
                        if (WoW.CanCast("Phoenix's Flames") && !WoW.PlayerHasBuff("Hot Streak!") && WoW.PlayerHasBuff("Heating Up") && WoW.LastSpell != "Fire Blast" &&
                            WoW.LastSpell != "Phoenix's Flames" && WoW.IsSpellOnCooldown("Fire Blast") && WoW.SpellCooldownTimeRemaining("Fire Blast") > 110 && !UseCooldowns && Combustion &&
                            WoW.PlayerSpellCharges("Phoenix's Flames") >= 2 && !WoW.IsSpellOnCooldown("Combustion"))
                        {
                            WoW.CastSpell("Phoenix's Flames");
                            return;
                        }
                        if (!UseCooldowns && Combustion && WoW.PlayerIsCasting && WoW.LastSpell != "Phoenix's Flame" && WoW.LastSpell != "Fire Blast" && WoW.PlayerHasBuff("Heating Up") &&
                            WoW.PlayerSpellCharges("Fire Blast") >= 1 && !WoW.PlayerHasBuff("Hot Streak!"))
                        {
                            WoW.CastSpell("Fire Blast");
                            return;
                        }
                        if (WoW.CanCast("Phoenix's Flames") && WoW.IsSpellOnCooldown("Fire Blast") && WoW.SpellCooldownTimeRemaining("Fire Blast") > 110 && WoW.PlayerHasBuff("Heating Up") &&
                            Combustion && WoW.PlayerSpellCharges("Phoenix's Flames") >= 1 && WoW.SpellCooldownTimeRemaining("Combustion") > 6000 && !WoW.PlayerHasBuff("Hot Streak!"))
                        {
                            WoW.CastSpell("Phoenix's Flames");
                            return;
                        }

                        if (WoW.IsInCombat && Control.ModifierKeys == Keys.Alt && ROF && !WoW.PlayerIsCasting)
                        {
                            WoW.CastSpell("Ring of Frost");
                            return;
                        }
                        if (Barrier && WoW.CanCast("Blazing Barrier") && WoW.HealthPercent <= 80 && !WoW.IsSpellOnCooldown("Blazing Barrier") && !WoW.PlayerHasBuff("Blazing Barrier"))
                        {
                            WoW.CastSpell("Blazing Barrier");
                            return;
                        }

                        if (!UseCooldowns && WoW.CanCast("Cinderstorm") && Cinderstorm && WoW.TargetHasDebuff("Ignite") && !WoW.PlayerHasBuff("Combustion") && !WoW.PlayerHasBuff("Hot Streak!"))
                        {
                            WoW.CastSpell("Cinderstorm");
                            return;
                        }
                        if (UseCooldowns && WoW.CanCast("Cinderstorm") && Cinderstorm && WoW.TargetHasDebuff("Ignite") && !WoW.PlayerHasBuff("Combustion") &&
                            WoW.IsSpellOnCooldown("Combustion") && WoW.SpellCooldownTimeRemaining("Combustion") > 500 && !WoW.PlayerHasBuff("Hot Streak!"))
                        {
                            WoW.CastSpell("Cinderstorm");
                            return;
                        }
                        if (UseCooldowns && Combustion && !WoW.IsSpellOnCooldown("Combustion") && WoW.PlayerHasBuff("Rune of Power") && WoW.PlayerSpellCharges("Fire Blast") >= 1 &&
                            WoW.PlayerSpellCharges("Phoenix's Flames") >= 2 && !WoW.PlayerIsCasting && !WoW.PlayerIsChanneling ||
                            UseCooldowns && Combustion && Mirrors && WoW.PlayerSpellCharges("Fire Blast") >= 1 && WoW.PlayerSpellCharges("Phoenix's Flames") >= 2 &&
                            WoW.PlayerHasBuff("Hot Streak!") && !WoW.IsSpellOnCooldown("Combustion") && !WoW.IsSpellOnCooldown("Mirror Image") && !WoW.PlayerIsCasting &&
                            !WoW.PlayerIsChanneling)
                        {
                            WoW.CastSpell("Combustion");
                            return;
                        }

                        if (DragBr && WoW.CanCast("Dragon's Breath") && WoW.IsSpellInRange("Scorch") && !WoW.PlayerHasBuff("Combustion"))
                        {
                            WoW.CastSpell("Dragon's Breath");
                            return;
                        }
                        if (WoW.PlayerSpellCharges("Phoenix's Flames") > 2 && !WoW.PlayerHasBuff("Combustion") && WoW.SpellCooldownTimeRemaining("Combustion") > 2000 &&
                            WoW.CanCast("Phoenix's Flames") && WoW.PlayerHasBuff("Heating Up") && !WoW.PlayerHasBuff("Hot Streak!") && WoW.PlayerSpellCharges("Phoenix's Flames") >= 1 &&
                            WoW.IsSpellOnCooldown("Fire Blast") && WoW.SpellCooldownTimeRemaining("Fire Blast") > 110 && WoW.LastSpell != "Phoenix's Flames" && WoW.LastSpell != "Fire Blast" ||
                            WoW.SpellCooldownTimeRemaining("Combustion") < 2000 && WoW.CanCast("Phoenix's Flames") && WoW.PlayerHasBuff("Heating Up") && !WoW.PlayerHasBuff("Hot Streak!") &&
                            WoW.PlayerSpellCharges("Phoenix's Flames") == 3 && WoW.LastSpell != "Phoenix's Flames" && WoW.LastSpell != "Fire Blast")
                        {
                            WoW.CastSpell("Phoenix's Flames");
                            return;
                        }
                        if (WoW.CanCast("Phoenix's Flames") && WoW.PlayerHasBuff("Heating Up") && WoW.PlayerHasBuff("Combustion") && !WoW.PlayerHasBuff("Hot Streak!") &&
                            WoW.PlayerSpellCharges("Phoenix's Flames") >= 1 && WoW.SpellCooldownTimeRemaining("Fire Blast") > 50 && WoW.LastSpell != "Phoenix's Flames" &&
                            WoW.LastSpell != "Fire Blast")
                        {
                            WoW.CastSpell("Phoenix's Flames");
                            return;
                        }

                        if (WoW.CanCast("Living Bomb") && LivingBomb && !WoW.IsSpellOnCooldown("Living Bomb") && !WoW.PlayerHasBuff("Hot Streak!"))
                        {
                            WoW.CastSpell("Living Bomb");
                            return;
                        }
                        if (WoW.CanCast("Ice Block") && !WoW.PlayerHasBuff("Ice Block") && IceBlock && WoW.HealthPercent < 20 && !WoW.IsSpellOnCooldown("Ice Block"))
                        {
                            WoW.CastSpell("Ice Block");
                            Log.Write("--------Activating Ice Block, you were below 20%HealthPoints.--------");
                            return;
                        }
                        // Legendary Bracers Support.
                        if (Legendary && WoW.CanCast("Pyroblast") && !WoW.WasLastCasted("Pyroblast") && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion") &&
                            WoW.PlayerBuffTimeRemaining("Marquee Bindings of the Sun King") > 400 && WoW.PlayerHasBuff("Marquee Bindings of the Sun King") && !WoW.PlayerHasBuff("Hot Streak!") ||
                            (!WoW.PlayerHasBuff("Combustion") && !WoW.WasLastCasted("Pyroblast") && WoW.PlayerHasBuff("Ice Floes") && !WoW.PlayerIsCasting &&
                             WoW.PlayerHasBuff("Marquee Bindings of the Sun King") && !WoW.PlayerHasBuff("Hot Streak!")))
                        {
                            WoW.CastSpell("Pyroblast");
                            return;
                        }
                        if (WoW.CanCast("Pyroblast") && WoW.PlayerHasBuff("Hot Streak!") && WoW.IsSpellOnCooldown("Combustion"))
                        {
                            WoW.CastSpell("Pyroblast");
                            return;
                        }
                        if (WoW.CanCast("Pyroblast") && WoW.PlayerHasBuff("Hot Streak!") && !WoW.IsSpellOnCooldown("Combustion") && WoW.PlayerSpellCharges("Phoenix's Flames") < 2)
                        {
                            WoW.CastSpell("Pyroblast");
                            return;
                        }
                        if (WoW.CanCast("Pyroblast") && WoW.PlayerHasBuff("Hot Streak!") && WoW.LastSpell == "Combustion")
                        {
                            WoW.CastSpell("Pyroblast");
                            return;
                        }
                        if (WoW.CanCast("Pyroblast") && !UseCooldowns && Combustion && WoW.PlayerHasBuff("Hot Streak!"))
                        {
                            WoW.CastSpell("Pyroblast");
                            return;
                        }
                        if (WoW.CanCast("Fireball") && WoW.IsSpellOnCooldown("Fire Blast") && !WoW.PlayerIsCasting && WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.PlayerHasBuff("Heating Up") && !WoW.PlayerHasBuff("Hot Streak!"))
                        {
                            WoW.CastSpell("Fireball");
                            return;
                        }
                        if (WoW.CanCast("Fireball") && WoW.IsSpellOnCooldown("Fire Blast") && !WoW.PlayerIsCasting && WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.PlayerHasBuff("Heating Up") && !WoW.PlayerHasBuff("Hot Streak!") && WoW.SpellCooldownTimeRemaining("Combustion") < 2000)
                        {
                            WoW.CastSpell("Fireball");
                            return;
                        }
                        if (WoW.SpellCooldownTimeRemaining("Phoenix's Flames") > 130 && WoW.PlayerIsCasting && WoW.LastSpell != "Phoenix's Flame" && WoW.LastSpell != "Fire Blast" && WoW.PlayerHasBuff("Heating Up") && WoW.PlayerSpellCharges("Fire Blast") >= 1 && !WoW.PlayerHasBuff("Hot Streak!") && WoW.SpellCooldownTimeRemaining("Combustion") > 2000)
                        {
                            WoW.CastSpell("Fire Blast");
                            return;
                        }
                        if (WoW.LastSpell != "Phoenix's Flame" && WoW.LastSpell != "Fire Blast" && WoW.PlayerHasBuff("Heating Up") && WoW.PlayerSpellCharges("Fire Blast") >= 1 && !WoW.PlayerHasBuff("Hot Streak!") && WoW.SpellCooldownTimeRemaining("Combustion") > 2000)
                        {
                            WoW.CastSpell("Fire Blast");
                            return;
                        }
                        if (!WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Heating Up") && WoW.CanCast("Fireball") && WoW.IsSpellInRange("Fireball") && !WoW.IsMoving && !WoW.PlayerIsChanneling &&
                            !WoW.PlayerHasBuff("Hot Streak!"))
                        {
                            WoW.CastSpell("Fireball");
                            return;
                        }
                        if (!WoW.PlayerIsCasting && WoW.CanCast("Fireball") && WoW.IsSpellInRange("Fireball") && !WoW.IsMoving && !WoW.PlayerIsChanneling && WoW.PlayerHasBuff("Heating Up") &&
                            WoW.IsSpellOnCooldown("Fire Blast") && WoW.IsSpellOnCooldown("Phoenix's Flames") && !WoW.PlayerHasBuff("Hot Streak!"))
                        {
                            WoW.CastSpell("Fireball");
                            return;
                        }
                        if (WoW.IsMoving && WoW.PlayerHasBuff("Ice Floes") && WoW.IsSpellInRange("Fireball") && !WoW.PlayerHasBuff("Hot Streak!") && !WoW.PlayerHasBuff("Heating Up"))
                        {
                            WoW.CastSpell("Fireball");
                            return;
                        }
                        if (!WoW.PlayerHasBuff("Combustion") && !WoW.IsMoving && WoW.CanCast("Fireball") && !WoW.PlayerIsCasting && WoW.PlayerHasBuff("Heating Up") &&
                            WoW.SpellCooldownTimeRemaining("Combustion") <= 2000 && WoW.PlayerSpellCharges("Fire Blast") >= 1 && WoW.PlayerSpellCharges("Phoenix's Flames") >= 1 ||
                            WoW.CanCast("Fireball") && !WoW.IsMoving && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion") && WoW.PlayerHasBuff("Heating Up") &&
                            WoW.IsSpellOnCooldown("Fire Blast") && WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.SpellCooldownTimeRemaining("Combustion") <= 2000 ||
                            WoW.CanCast("Fireball") && !WoW.IsMoving && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion") && WoW.PlayerHasBuff("Heating Up") &&
                            !WoW.IsSpellOnCooldown("Fire Blast") && WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.SpellCooldownTimeRemaining("Combustion") <= 2000 ||
                            WoW.CanCast("Fireball") && !WoW.IsMoving && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion") && WoW.PlayerHasBuff("Heating Up") &&
                            WoW.IsSpellOnCooldown("Fire Blast") && !WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.SpellCooldownTimeRemaining("Combustion") >= 2000 ||
                            WoW.CanCast("Fireball") && !WoW.IsMoving && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion") && WoW.PlayerHasBuff("Heating Up") &&
                            WoW.IsSpellOnCooldown("Fire Blast") && !WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.SpellCooldownTimeRemaining("Combustion") <= 2000)
                        {
                            WoW.CastSpell("Fireball");
                            return;
                        }
                    }
                }
            }
            if (combatRoutine.Type == RotationType.AOE)
            {
                if (UseCooldowns && RuneOfPower && WoW.PlayerSpellCharges("Rune of Power") >= 1 && WoW.SpellCooldownTimeRemaining("Combustion") >= 4000 && WoW.PlayerHasBuff("Hot Streak!") &&
                    !WoW.PlayerIsCasting && !WoW.IsMoving && !WoW.PlayerHasBuff("Rune of Power") && !WoW.IsSpellOnCooldown("Rune of Power") ||
                    (UseCooldowns && RuneOfPower && !WoW.PlayerIsCasting && WoW.PlayerSpellCharges("Fire Blast") == 3 && WoW.PlayerSpellCharges("Phoenix's Flames") >= 2 && !WoW.IsMoving &&
                     !WoW.IsSpellOnCooldown("Combustion") && WoW.PlayerSpellCharges("Rune of Power") >= 1 && WoW.PlayerHasBuff("Hot Streak!") && !WoW.PlayerHasBuff("Rune of Power") &&
                     !WoW.IsSpellOnCooldown("Rune of Power")))
                {
                    WoW.CastSpell("Rune of Power");
                    return;
                }
                if (UseCooldowns && Mirrors && WoW.CanCast("Mirror Image") && !WoW.IsSpellOnCooldown("Mirror Image") && WoW.PlayerHasBuff("Combustion"))
                {
                    WoW.CastSpell("Mirror Image");
                    return;
                }
                if (WoW.CanCast("Scorch") && WoW.IsMoving && !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Scorch");
                    return;
                }
                if (WoW.IsInCombat && Meteor && Control.ModifierKeys == Keys.Alt && !WoW.PlayerIsCasting)
                {
                    WoW.CastSpell("Meteor");
                    return;
                }
                if (WoW.CanCast("Phoenix's Flames") && !WoW.PlayerHasBuff("Hot Streak!") && WoW.IsSpellOnCooldown("Fire Blast") && WoW.SpellCooldownTimeRemaining("Fire Blast") > 110 &&
                    WoW.PlayerHasBuff("Heating Up") && UseCooldowns && Combustion && WoW.PlayerSpellCharges("Phoenix's Flames") == 3 && !WoW.IsSpellOnCooldown("Combustion"))
                {
                    WoW.CastSpell("Phoenix's Flames");
                    return;
                }
                if (WoW.PlayerIsCasting && UseCooldowns && WoW.PlayerHasBuff("Heating Up") && Combustion && WoW.PlayerSpellCharges("Phoenix's Flames") == 3 &&
                    !WoW.IsSpellOnCooldown("Combustion"))
                {
                    WoW.CastSpell("Phoenix's Flames");
                    return;
                }
                if (WoW.CanCast("Phoenix's Flames") && !WoW.PlayerHasBuff("Hot Streak!") && WoW.PlayerHasBuff("Heating Up") && WoW.LastSpell != "Fire Blast" &&
                    WoW.LastSpell != "Phoenix's Flames" && WoW.IsSpellOnCooldown("Fire Blast") && WoW.SpellCooldownTimeRemaining("Fire Blast") > 110 && !UseCooldowns && Combustion &&
                    WoW.PlayerSpellCharges("Phoenix's Flames") >= 2 && !WoW.IsSpellOnCooldown("Combustion"))
                {
                    WoW.CastSpell("Phoenix's Flames");
                    return;
                }
                if (!UseCooldowns && Combustion && WoW.PlayerIsCasting && WoW.LastSpell != "Phoenix's Flame" && WoW.LastSpell != "Fire Blast" && WoW.PlayerHasBuff("Heating Up") &&
                    WoW.PlayerSpellCharges("Fire Blast") >= 1 && !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Fire Blast");
                    return;
                }
                if (WoW.CanCast("Phoenix's Flames") && WoW.IsSpellOnCooldown("Fire Blast") && WoW.SpellCooldownTimeRemaining("Fire Blast") > 110 && WoW.PlayerHasBuff("Heating Up") &&
                    Combustion && WoW.PlayerSpellCharges("Phoenix's Flames") >= 1 && WoW.SpellCooldownTimeRemaining("Combustion") > 6000 && !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Phoenix's Flames");
                    return;
                }

                if (WoW.IsInCombat && Control.ModifierKeys == Keys.Alt && ROF && !WoW.PlayerIsCasting)
                {
                    WoW.CastSpell("Ring of Frost");
                    return;
                }
                if (Barrier && WoW.CanCast("Blazing Barrier") && WoW.HealthPercent <= 80 && !WoW.IsSpellOnCooldown("Blazing Barrier") && !WoW.PlayerHasBuff("Blazing Barrier"))
                {
                    WoW.CastSpell("Blazing Barrier");
                    return;
                }

                if (!UseCooldowns && WoW.CanCast("Cinderstorm") && Cinderstorm && WoW.TargetHasDebuff("Ignite") && !WoW.PlayerHasBuff("Combustion") && !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Cinderstorm");
                    return;
                }
                if (UseCooldowns && WoW.CanCast("Cinderstorm") && Cinderstorm && WoW.TargetHasDebuff("Ignite") && !WoW.PlayerHasBuff("Combustion") && WoW.IsSpellOnCooldown("Combustion") &&
                    WoW.SpellCooldownTimeRemaining("Combustion") > 500 && !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Cinderstorm");
                    return;
                }
                if (UseCooldowns && Combustion && !WoW.IsSpellOnCooldown("Combustion") && WoW.PlayerHasBuff("Rune of Power") && WoW.PlayerSpellCharges("Fire Blast") >= 1 &&
                    WoW.PlayerSpellCharges("Phoenix's Flames") >= 2 && !WoW.PlayerIsCasting && !WoW.PlayerIsChanneling ||
                    UseCooldowns && Combustion && Mirrors && WoW.PlayerSpellCharges("Fire Blast") >= 1 && WoW.PlayerSpellCharges("Phoenix's Flames") >= 2 && WoW.PlayerHasBuff("Hot Streak!") &&
                    !WoW.IsSpellOnCooldown("Combustion") && !WoW.IsSpellOnCooldown("Mirror Image") && !WoW.PlayerIsCasting && !WoW.PlayerIsChanneling)
                {
                    WoW.CastSpell("Combustion");
                    return;
                }

                if (DragBr && WoW.CanCast("Dragon's Breath") && WoW.IsSpellInRange("Scorch") && !WoW.PlayerHasBuff("Combustion"))
                {
                    WoW.CastSpell("Dragon's Breath");
                    return;
                }
                if (WoW.PlayerSpellCharges("Phoenix's Flames") > 2 && !WoW.PlayerHasBuff("Combustion") && WoW.SpellCooldownTimeRemaining("Combustion") > 2000 && WoW.CanCast("Phoenix's Flames") &&
                    WoW.PlayerHasBuff("Heating Up") && !WoW.PlayerHasBuff("Hot Streak!") && WoW.PlayerSpellCharges("Phoenix's Flames") >= 1 && WoW.IsSpellOnCooldown("Fire Blast") &&
                    WoW.SpellCooldownTimeRemaining("Fire Blast") > 110 && WoW.LastSpell != "Phoenix's Flames" && WoW.LastSpell != "Fire Blast" ||
                    WoW.SpellCooldownTimeRemaining("Combustion") < 2000 && WoW.CanCast("Phoenix's Flames") && WoW.PlayerHasBuff("Heating Up") && !WoW.PlayerHasBuff("Hot Streak!") &&
                    WoW.PlayerSpellCharges("Phoenix's Flames") == 3 && WoW.LastSpell != "Phoenix's Flames" && WoW.LastSpell != "Fire Blast")
                {
                    WoW.CastSpell("Phoenix's Flames");
                    return;
                }
                if (WoW.CanCast("Phoenix's Flames") && WoW.PlayerHasBuff("Heating Up") && WoW.PlayerHasBuff("Combustion") && !WoW.PlayerHasBuff("Hot Streak!") &&
                    WoW.PlayerSpellCharges("Phoenix's Flames") >= 1 && WoW.SpellCooldownTimeRemaining("Fire Blast") > 5000 && WoW.LastSpell != "Phoenix's Flames" &&
                    WoW.LastSpell != "Fire Blast")
                {
                    WoW.CastSpell("Phoenix's Flames");
                    return;
                }

                if (WoW.CanCast("Living Bomb") && LivingBomb && !WoW.IsSpellOnCooldown("Living Bomb") && !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Living Bomb");
                    return;
                }
                if (WoW.CanCast("Ice Block") && !WoW.PlayerHasBuff("Ice Block") && IceBlock && WoW.HealthPercent < 20 && !WoW.IsSpellOnCooldown("Ice Block"))
                {
                    WoW.CastSpell("Ice Block");
                    Log.Write("--------Activating Ice Block, you were below 20%HealthPoints.--------");
                    return;
                }
                // Legendary Bracers Support.
                if (Legendary && WoW.CanCast("Pyroblast") && !WoW.WasLastCasted("Pyroblast") && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion") &&
                    WoW.PlayerBuffTimeRemaining("Marquee Bindings of the Sun King") > 400 && WoW.PlayerHasBuff("Marquee Bindings of the Sun King") && !WoW.PlayerHasBuff("Hot Streak!") ||
                    (!WoW.PlayerHasBuff("Combustion") && !WoW.WasLastCasted("Pyroblast") && WoW.PlayerHasBuff("Ice Floes") && !WoW.PlayerIsCasting &&
                     WoW.PlayerHasBuff("Marquee Bindings of the Sun King") && !WoW.PlayerHasBuff("Hot Streak!")))
                {
                    WoW.CastSpell("Pyroblast");
                    return;
                }
                if (!WoW.PlayerIsCasting && WoW.CanCast("Flamestrike") && WoW.PlayerHasBuff("Hot Streak!") && WoW.IsSpellOnCooldown("Combustion"))
                {
                    WoW.CastSpell("Flamestrike");
                    return;
                }
                if (!WoW.PlayerIsCasting && WoW.CanCast("Flamestrike") && WoW.PlayerHasBuff("Hot Streak!") && !WoW.IsSpellOnCooldown("Combustion") &&
                    WoW.PlayerSpellCharges("Phoenix's Flames") < 2)
                {
                    WoW.CastSpell("Flamestrike");
                    return;
                }
                if (!WoW.PlayerIsCasting && WoW.CanCast("Flamestrike") && WoW.PlayerHasBuff("Hot Streak!") && WoW.LastSpell == "Combustion")
                {
                    WoW.CastSpell("Flamestrike");
                    return;
                }
                if (!WoW.PlayerIsCasting && WoW.CanCast("Flamestrike") && !UseCooldowns && Combustion && WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Flamestrike");
                    return;
                }
                if (WoW.CanCast("Fireball") && WoW.IsSpellOnCooldown("Fire Blast") && !WoW.PlayerIsCasting && WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.PlayerHasBuff("Heating Up") &&
                    !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Fireball");
                    return;
                }
                if (WoW.SpellCooldownTimeRemaining("Combustion") > 200 && WoW.SpellCooldownTimeRemaining("Phoenix's Flames") > 130 && WoW.PlayerIsCasting && WoW.LastSpell != "Phoenix's Flame" &&
                    WoW.LastSpell != "Fire Blast" && WoW.PlayerHasBuff("Heating Up") && WoW.PlayerSpellCharges("Fire Blast") >= 1 && !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Fire Blast");
                    return;
                }
                if (WoW.SpellCooldownTimeRemaining("Combustion") > 200 && WoW.LastSpell != "Phoenix's Flame" && WoW.LastSpell != "Fire Blast" && WoW.PlayerHasBuff("Heating Up") &&
                    WoW.PlayerSpellCharges("Fire Blast") >= 1 && !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Fire Blast");
                    return;
                }


                if (!WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Heating Up") && WoW.CanCast("Fireball") && WoW.IsSpellInRange("Fireball") && !WoW.IsMoving && !WoW.PlayerIsChanneling &&
                    !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Fireball");
                    return;
                }
                if (!WoW.PlayerIsCasting && WoW.CanCast("Fireball") && WoW.IsSpellInRange("Fireball") && !WoW.IsMoving && !WoW.PlayerIsChanneling && WoW.PlayerHasBuff("Heating Up") &&
                    WoW.IsSpellOnCooldown("Fire Blast") && WoW.IsSpellOnCooldown("Phoenix's Flames") && !WoW.PlayerHasBuff("Hot Streak!"))
                {
                    WoW.CastSpell("Fireball");
                    return;
                }
                if (WoW.IsMoving && WoW.PlayerHasBuff("Ice Floes") && WoW.IsSpellInRange("Fireball") && !WoW.PlayerHasBuff("Hot Streak!") && !WoW.PlayerHasBuff("Heating Up"))
                {
                    WoW.CastSpell("Fireball");
                    return;
                }
                if (!WoW.PlayerHasBuff("Combustion") && !WoW.IsMoving && WoW.CanCast("Fireball") && !WoW.PlayerIsCasting && WoW.PlayerHasBuff("Heating Up") &&
                    WoW.SpellCooldownTimeRemaining("Combustion") <= 2000 && WoW.PlayerSpellCharges("Fire Blast") >= 1 && WoW.PlayerSpellCharges("Phoenix's Flames") >= 1 ||
                    WoW.CanCast("Fireball") && !WoW.IsMoving && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion") && WoW.PlayerHasBuff("Heating Up") &&
                    WoW.IsSpellOnCooldown("Fire Blast") && WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.SpellCooldownTimeRemaining("Combustion") <= 2000 ||
                    WoW.CanCast("Fireball") && !WoW.IsMoving && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion") && WoW.PlayerHasBuff("Heating Up") &&
                    !WoW.IsSpellOnCooldown("Fire Blast") && WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.SpellCooldownTimeRemaining("Combustion") <= 2000 ||
                    WoW.CanCast("Fireball") && !WoW.IsMoving && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion") && WoW.PlayerHasBuff("Heating Up") &&
                    WoW.IsSpellOnCooldown("Fire Blast") && !WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.SpellCooldownTimeRemaining("Combustion") >= 2000 ||
                    WoW.CanCast("Fireball") && !WoW.IsMoving && !WoW.PlayerIsCasting && !WoW.PlayerHasBuff("Combustion") && WoW.PlayerHasBuff("Heating Up") &&
                    WoW.IsSpellOnCooldown("Fire Blast") && !WoW.IsSpellOnCooldown("Phoenix's Flames") && WoW.SpellCooldownTimeRemaining("Combustion") <= 2000)
                {
                    WoW.CastSpell("Fireball");
                }
            }
        }
        public override void Pulse()
        {
            if (combatRoutine.Type == RotationType.SingleTarget)  // Do Single Target Stuff here
            {
                /*
                 * Endless Rage / War Machine
                 * Double Time
                 * Avatar
                 * Warpaint
                 * Frothing Zerker/Massacre
                 * Inner Rage
                 * Reckless Abandon
                 */


                //AOE on Press



                //Normal ST rotation
                if (WoW.HasTarget && WoW.IsInCombat && WoW.TargetIsEnemy && WoW.IsSpellInRange("Bloodthirst"))
                {
                    if (WoW.TargetHealthPercent >= 20)
                    {
                        //When targets are above 20%. Not in Execute phase. (need to change this to TTExecute)
                        //Single target with Reckless Abandon -  Battle Cry  Avatar  Rampage -  Raging Blow -  Odyn's Fury -  Bloodthirst - Raging Blow -  Furious Slash -  Bloodthirst

                        if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_Q) < 0)

                        {
                            if (WoW.CanCast("Whirlwind") &&
                                TFZFMint &&
                                !WoW.PlayerHasBuff("Meat Cleaver") &&
                                WoW.Rage <= 99)
                            {
                                WoW.CastSpell("Whirlwind"); return;
                            }

                            if (WoW.CanCast("Whirlwind") &&
                                !TFZFMint &&
                                !WoW.PlayerHasBuff("Meat Cleaver") &&
                                WoW.Rage <= 85)
                            {
                                WoW.CastSpell("Whirlwind"); return;
                            }

                            /*if (WoW.CanCast("Whirlwind")
                             *      && TFZFMint
                             *      && WoW.Rage <= 99
                             *      && !WoW.CanCast("Bloodthirst")
                             *      && !WoW.CanCast("Raging Blow")
                             *      && !WoW.CanCast("Rampage")
                             *      )
                             * {WoW.CastSpell("Whirlwind"); return;}
                             *
                             * if (WoW.CanCast("Whirlwind")
                             *      && !TFZFMint
                             *      && WoW.Rage <= 85
                             *      && !WoW.CanCast("Bloodthirst")
                             *      && !WoW.CanCast("Raging Blow")
                             *      && !WoW.CanCast("Rampage")
                             *      )
                             * {WoW.CastSpell("Whirlwind"); return;}
                             *
                             */
                        }



                        if (TFZFMint)
                        {
                            if (WoW.CanCast("Rampage") &&
                                WoW.Rage > 99)
                            {
                                WoW.CastSpell("Rampage"); return;
                            }

                            if (WoW.CanCast("Bloodthirst") &&
                                !WoW.PlayerHasBuff("Enrage"))
                            {
                                WoW.CastSpell("Bloodthirst"); return;
                            }

                            if (WoW.CanCast("Raging Blow") &&
                                WoW.Rage <= 85 &&
                                !WoW.CanCast("Bloodthirst"))
                            {
                                WoW.CastSpell("Raging Blow"); return;
                            }

                            if (WoW.CanCast("Bloodthirst") &&
                                WoW.PlayerHasBuff("Enrage"))
                            {
                                WoW.CastSpell("Bloodthirst"); return;
                            }

                            if (WoW.CanCast("Furious Slash") &&
                                !WoW.CanCast("Bloodthirst") &&
                                !WoW.CanCast("Raging Blow"))
                            {
                                WoW.CastSpell("Furious Slash"); return;
                            }
                        }


                        if (!TFZFMint)
                        {
                            if (WoW.CanCast("Rampage") &&
                                WoW.Rage >= 85)
                            {
                                WoW.CastSpell("Rampage"); return;
                            }

                            if (WoW.CanCast("Bloodthirst") &&
                                !WoW.PlayerHasBuff("Enrage"))
                            {
                                WoW.CastSpell("Bloodthirst"); return;
                            }

                            //if (WoW.CanCast("Execute")
                            //	&& WoW.TargetHealthPercent <= 20
                            //    && WoW.IsSpellOverlayed("Execute") || WoW.Rage >= 25)
                            //{ WoW.CastSpell("Execute"); return; }

                            if (WoW.CanCast("Raging Blow") &&
                                WoW.Rage <= 85 &&
                                !WoW.CanCast("Bloodthirst"))
                            {
                                WoW.CastSpell("Raging Blow"); return;
                            }

                            if (WoW.CanCast("Bloodthirst") &&
                                WoW.PlayerHasBuff("Enrage"))
                            {
                                WoW.CastSpell("Bloodthirst"); return;
                            }

                            if (WoW.CanCast("Furious Slash") &&
                                !WoW.CanCast("Bloodthirst") &&
                                !WoW.CanCast("Raging Blow"))
                            {
                                WoW.CastSpell("Furious Slash"); return;
                            }
                        }
                    }

                    if (WoW.TargetHealthPercent <= 20)

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

                            if (WoW.CanCast("Bloodthirst") &&
                                !WoW.PlayerHasBuff("Enrage"))
                            {
                                WoW.CastSpell("Bloodthirst"); return;
                            }

                            if (WoW.CanCast("Execute") &&
                                WoW.IsSpellOverlayed("Execute") || WoW.Rage >= 25)
                            {
                                WoW.CastSpell("Execute"); return;
                            }

                            if (WoW.CanCast("Execute") &&
                                WoW.Rage > 25)
                            {
                                WoW.CastSpell("Execute"); return;
                            }

                            if (WoW.CanCast("Raging Blow") &&
                                !WoW.CanCast("Bloodthirst"))
                            {
                                WoW.CastSpell("Raging Blow"); return;
                            }

                            if (WoW.CanCast("Bloodthirst") &&
                                WoW.PlayerHasBuff("Enrage"))
                            {
                                WoW.CastSpell("Bloodthirst"); return;
                            }

                            if (WoW.CanCast("Furious Slash") &&
                                !WoW.CanCast("Bloodthirst") &&
                                !WoW.CanCast("Raging Blow"))
                            {
                                WoW.CastSpell("Furious Slash"); return;
                            }
                        }

                        if (!TFZFMint)
                        {
                            if (WoW.CanCast("Execute") &&
                                !WoW.PlayerHasBuff("Enrage") &&
                                !WoW.PlayerHasBuff("Massacre"))
                            {
                                WoW.CastSpell("Execute"); return;
                            }

                            if (WoW.CanCast("Rampage") &&
                                WoW.PlayerHasBuff("Massacre"))
                            {
                                WoW.CastSpell("Rampage"); return;
                            }

                            if (WoW.CanCast("Execute") &&
                                WoW.PlayerHasBuff("Enrage"))
                            {
                                WoW.CastSpell("Execute"); return;
                            }

                            if (WoW.CanCast("Bloodthirst") &&
                                WoW.Rage < 25)
                            {
                                WoW.CastSpell("Bloodthirst"); return;
                            }

                            if (WoW.CanCast("Raging Blow") &&
                                WoW.Rage < 25)
                            {
                                WoW.CastSpell("Raging Blow"); return;
                            }
                        }
                    }

                    if (mythicplusinterrupts)
                    {
                        if (WoW.CanCast("Pummel") && WoW.TargetIsCasting && WoW.TargetIsCastingAndSpellIsInterruptible)
                        {
//int spell list for all important spells in M+
                            if (WoW.TargetCastingSpellID == 200248
//Court Of Stars Mythic+ Interrupt list
                                || WoW.TargetCastingSpellID == 225573 || WoW.TargetCastingSpellID == 208165 || WoW.TargetCastingSpellID == 211401 || WoW.TargetCastingSpellID == 21147 ||
                                WoW.TargetCastingSpellID == 211299 || WoW.TargetCastingSpellID == 2251 || WoW.TargetCastingSpellID == 209413 || WoW.TargetCastingSpellID == 209404 ||
                                WoW.TargetCastingSpellID == 215204 || WoW.TargetCastingSpellID == 210261
//Darkheart Thicket Mythic+ Interrupt list
                                || WoW.TargetCastingSpellID == 200658 || WoW.TargetCastingSpellID == 200631 || WoW.TargetCastingSpellID == 204246 || WoW.TargetCastingSpellID == 2014
//Eye of Azshara Mythic+ Interrupt list
                                || WoW.TargetCastingSpellID == 19687 || WoW.TargetCastingSpellID == 218532 || WoW.TargetCastingSpellID == 195129 || WoW.TargetCastingSpellID == 195046 ||
                                WoW.TargetCastingSpellID == 197502 || WoW.TargetCastingSpellID == 196027 || WoW.TargetCastingSpellID == 196175 || WoW.TargetCastingSpellID == 192003 ||
                                WoW.TargetCastingSpellID == 191848
//Halls of Valor Mythic+ Interrupt list
                                || WoW.TargetCastingSpellID == 198595 || WoW.TargetCastingSpellID == 198962 || WoW.TargetCastingSpellID == 198931 || WoW.TargetCastingSpellID == 192563 ||
                                WoW.TargetCastingSpellID == 192288 || WoW.TargetCastingSpellID == 199726
//Maw of Souls Mythic+ Interrupt list
                                || WoW.TargetCastingSpellID == 198495 || WoW.TargetCastingSpellID == 195293 || WoW.TargetCastingSpellID == 199589 || WoW.TargetCastingSpellID == 194266 ||
                                WoW.TargetCastingSpellID == 198405 || WoW.TargetCastingSpellID == 199514 || WoW.TargetCastingSpellID == 194657
//Neltharions Lair Mythic+ Interrupt list
                                || WoW.TargetCastingSpellID == 193585 || WoW.TargetCastingSpellID == 202181
//The Arcway Mythic+ Interrupt list
                                || WoW.TargetCastingSpellID == 226269 || WoW.TargetCastingSpellID == 211007 || WoW.TargetCastingSpellID == 211757 || WoW.TargetCastingSpellID == 226285 ||
                                WoW.TargetCastingSpellID == 226206 || WoW.TargetCastingSpellID == 211115 || WoW.TargetCastingSpellID == 196392
// Advisor Vandros (Interrupt manually) Spell,203176,Accelerating Blast
                                || WoW.TargetCastingSpellID == 203957
//Vault of the Wardens Mythic+ Interrupt list
                                || WoW.TargetCastingSpellID == 193069 || WoW.TargetCastingSpellID == 191823 || WoW.TargetCastingSpellID == 202661 || WoW.TargetCastingSpellID == 201488 ||
                                WoW.TargetCastingSpellID == 195332
//Raid Interrupts
                                || WoW.TargetCastingSpellID == 209485 || WoW.TargetCastingSpellID == 209410 || WoW.TargetCastingSpellID == 211470 || WoW.TargetCastingSpellID == 225100 ||
                                WoW.TargetCastingSpellID == 207980 || WoW.TargetCastingSpellID == 196870 || WoW.TargetCastingSpellID == 195284 || WoW.TargetCastingSpellID == 192005 ||
                                WoW.TargetCastingSpellID == 228255 || WoW.TargetCastingSpellID == 228239 || WoW.TargetCastingSpellID == 227917 || WoW.TargetCastingSpellID == 228625 ||
                                WoW.TargetCastingSpellID == 228606 || WoW.TargetCastingSpellID == 229714 || WoW.TargetCastingSpellID == 227592 || WoW.TargetCastingSpellID == 229083 ||
                                WoW.TargetCastingSpellID == 228025 || WoW.TargetCastingSpellID == 228019 || WoW.TargetCastingSpellID == 227987 || WoW.TargetCastingSpellID == 227420 ||
                                WoW.TargetCastingSpellID == 200905)

                            {
                                if (!WoW.IsSpellOnCooldown("Pummel") && WoW.TargetPercentCast >= 40)
                                {
                                    WoW.CastSpell("Pummel");
                                    return;
                                }
                            }
                        }
                    }
                }
            }



            if (combatRoutine.Type == RotationType.AOE)
            {
                // AOE stuff here
            }
            if (combatRoutine.Type == RotationType.SingleTargetCleave)
            {
                // Do Single Target Cleave stuff here if applicable else ignore this one
            }
        }
        }                                              //please Set between 1-99 NpC in range for ST if not desired set to 99

        public override void Pulse()
        {
            if (DetectKeyPress.GetKeyState(0x6A) < 0)
            {
                UseCooldowns = !UseCooldowns;
                Thread.Sleep(150);
            }

            if (WoW.TargetIsCasting)             // Kick
            {
                if (WoW.CanCast("Kick") && WoW.IsSpellInRange("Kick") && WoW.TargetIsCastingAndSpellIsInterruptible && WoW.TargetPercentCast >= 55 && !WoW.IsSpellOnCooldown("Kick") && !WoW.PlayerIsChanneling && !WoW.WasLastCasted("Kick"))
                {
                    WoW.CastSpell("Kick");
                    return;
                }
            }
            if (combatRoutine.Type == RotationType.SingleTarget || combatRoutine.Type == RotationType.SingleTargetCleave) // Do Single Target Stuff here
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat && !WoW.IsMounted)
                {
// Spell ShadowDance if TimerSecRemaining(DeathFromAbove) > 0 and HasTalent(DarkShadow)
                    if (WoW.CanCast("ShadowDance") && WoW.Talent(6) == 1 && WoW.LastSpell == "DeathFromAbove")
                    {
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
                    // Cooldowns Spell ShadowBlades if AlternatePowerToMax >= 2
                    if (combatRoutine.UseCooldowns)
                    {
                        if (!stealth)
                        {
//StealthCooldowns Spell ShadowDance if ChargesRemaining(ShadowDance) = SpellCharges(ShadowDance)
                            if (WoW.CanCast("ShadowDance") && WoW.PlayerSpellCharges("ShadowDance") >= 2)
                            {
                                WoW.CastSpell("ShadowDance");
                                return;
                            }
//StealthCooldowns Spell Vanish if HasTalent(Subterfuge) and not HasBuff(MasterAssassinsInitiative)
                            if (WoW.CanCast("Vanish") && WoW.IsSpellInRange("NightBlade") && WoW.Talent(2) == 2 && !WoW.PlayerHasBuff("MasterAssassinsInitiative") && (!WoW.PlayerHasBuff("Stealth") || !WoW.PlayerHasBuff("ShadowDance")))
                            {
                                WoW.CastSpell("Vanish");
                                return;
                            }
                        }
                        if (WoW.CanCast("ShadowBlades") && WoW.IsSpellInRange("NightBlade") && WoW.CurrentComboPoints <= 4)
                        {
                            WoW.CastSpell("ShadowBlades");
                            return;
                        }
//Cooldowns Spell GoremawsBite if AlternatePowerToMax >= 3 and not HasBuff(Stealth) and not HasBuff(ShadowDance) and not HasBuff(Subterfuge) and ChargesRemaining(ShadowDance) < SpellCharges(ShadowDance)
                        if (WoW.CanCast("GoremawsBite") && WoW.IsSpellInRange("NightBlade") && WoW.CurrentComboPoints <= 3 && !stealth && WoW.PlayerSpellCharges("ShadowDance") < 2)
                        {
                            WoW.CastSpell("GoremawsBite");
                            return;
                        }
                    }
                    if (WoW.CanCast("Berserking") && !WoW.IsSpellOnCooldown("Berserking") && WoW.PlayerRace == "Troll")
                    {
                        WoW.CastSpell("Berserking");
                        return;
                    }
                    if (WoW.CanCast("Arcane Torrent") && !WoW.IsSpellOnCooldown("Arcane Torrent") && WoW.PlayerRace == "BloodElf" && WoW.Energy <= 20)
                    {
                        WoW.CastSpell("Arcane Torrent");
                        return;
                    }
                    if (WoW.CanCast("Blood Fury") && !WoW.IsSpellOnCooldown("Blood Fury") && WoW.PlayerRace == "Orc")
                    {
                        WoW.CastSpell("Blood Fury");
                        return;
                    }

// Spell Backstab Once if AlternatePower < 5 and FightDurationSec - FightSecRemaining < 2
                    if (WoW.CanCast("Backstab") && WoW.CurrentComboPoints < 6 && WoW.Energy >= 45 && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("Backstab");
                        return;
                    }
//Spell Vanish if not HasTalent(Subterfuge) and not HasBuff(ShadowDance) and not HasBuff(MasterAssassinsInitiative) and Power >= 40 and ChargesRemaining(ShadowDance) < SpellCharges(ShadowDance) and not IsOnGcd and (AlternatePowerToMax >= 3 or (AlternatePowerToMax >= 2 and not HasBuff(ShadowBlades)))
                    if (WoW.CanCast("Vanish") && !stealth && WoW.IsSpellInRange("NightBlade") && WoW.Talent(2) != 2 && !WoW.PlayerHasBuff("ShadowDance") && !WoW.PlayerHasBuff("MasterAssassinsInitiative") && WoW.Energy >= 40 && WoW.PlayerSpellCharges("ShadowDance") < 2 && (WoW.CurrentComboPoints >= 3 || (WoW.CurrentComboPoints >= 2 && !WoW.PlayerHasBuff("ShadowBlades"))))
                    {
                        WoW.CastSpell("Vanish");
                        return;
                    }
//AmrRogueSubtletyDefault2 Spell SymbolsOfDeath if ((PowerToMax >= 40 and (not HasBuff(ShadowDance) or BuffRemainingSec(ShadowDance) >= BuffDurationSec(ShadowDance) - 1)) or
                    if (WoW.CanCast("Symbols of Death") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35 && WoW.Energy <= 60 && (WoW.PlayerHasBuff("ShadowDance") || WoW.PlayerBuffTimeRemaining("ShadowDance") >= 300))
                    {
                        WoW.CastSpell("Symbols of Death");
                        return;
                    }
//(HasBuff(ShadowDance) and FightDurationSec - FightSecRemaining < 10) or

//(HasItem(TheFirstOfTheDead) and AlternatePowerToMax >= 5 and Power >= 40)) and not IsOnGcd
// Finisher Spell Nightblade if CanRefreshDot(Nightblade) and TargetSecRemaining > 6 and (not HasBuff(MasterAssassinsInitiative) or DotRemainingSec(Nightblade) < BuffRemainingSec(MasterAssassinsInitiative))
                    if (WoW.CanCast("NightBlade") && WoW.CurrentComboPoints >= 5 && WoW.Energy >= 25 && (!WoW.TargetHasDebuff("NightBlade") || WoW.TargetDebuffTimeRemaining("NightBlade") <= 600) && ((!WoW.TargetHasDebuff("MasterAssassinsInitiative")) || (WoW.TargetDebuffTimeRemaining("Nightblade") < WoW.PlayerBuffTimeRemaining("MasterAssassinsInitiative"))) && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("NightBlade");
                        return;
                    }
                    //Finisher Spell DeathFromAbove if HasBuff(SymbolsOfDeath) or CooldownSecRemaining(SymbolsOfDeath) > 10
                    if (WoW.CanCast("DeathFromAbove") && WoW.CurrentComboPoints >= 5 && WoW.Energy >= 25 && (WoW.PlayerHasBuff("SymbolsOfDeath") || WoW.SpellCooldownTimeRemaining("SymbolsOfDeath") > 10000) && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("DeathFromAbove");
                        return;
                    }
//Finisher Spell Eviscerate
                    if (WoW.CanCast("Eviscerate") && WoW.CurrentComboPoints >= 5 && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35 && WoW.TargetHasDebuff("NightBlade"))
                    {
                        WoW.CastSpell("Eviscerate");
                        return;
                    }
//InsideStealth Spell Shadowstrike
                    if (WoW.CanCast("ShadowStrike") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 40 && WoW.CurrentComboPoints <= 5 && stealth)
                    {
                        WoW.CastSpell("ShadowStrike");
                        return;
                    }
// Spell ShadowDance if TimerSecRemaining(DeathFromAbove) > 0 and HasTalent(DarkShadow)
                    if (WoW.CanCast("ShadowDance") && WoW.Talent(6) == 1 && WoW.LastSpell == "DeathFromAbove")
                    {
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
//StealthCooldowns Spell ShadowDance
                    if (WoW.CanCast("ShadowDance"))
                    {
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
//Builder Spell Backstab
                    if (WoW.CanCast("Backstab") && WoW.CurrentComboPoints < 6 && WoW.Energy >= 45 && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("Backstab");
                        return;
                    }
                }
            }

            if (combatRoutine.Type == RotationType.AOE) // Do AoE Stuff here
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat && !WoW.IsMounted)
                {
// Spell ShadowDance if TimerSecRemaining(DeathFromAbove) > 0 and HasTalent(DarkShadow)
                    if (WoW.CanCast("ShadowDance") && WoW.Talent(6) == 1 && WoW.LastSpell == "DeathFromAbove")
                    {
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
                    // Cooldowns Spell ShadowBlades if AlternatePowerToMax >= 2
                    if (combatRoutine.UseCooldowns)
                    {
                        if (!stealth)
                        {
//StealthCooldowns Spell ShadowDance if ChargesRemaining(ShadowDance) = SpellCharges(ShadowDance)
                            if (WoW.CanCast("ShadowDance") && WoW.PlayerSpellCharges("ShadowDance") >= 2)
                            {
                                WoW.CastSpell("ShadowDance");
                                return;
                            }
//StealthCooldowns Spell Vanish if HasTalent(Subterfuge) and not HasBuff(MasterAssassinsInitiative)
                            if (WoW.CanCast("Vanish") && WoW.IsSpellInRange("NightBlade") && WoW.Talent(2) == 2 && !WoW.PlayerHasBuff("MasterAssassinsInitiative") && (!WoW.PlayerHasBuff("Stealth") || !WoW.PlayerHasBuff("ShadowDance")))
                            {
                                WoW.CastSpell("Vanish");
                                return;
                            }
                        }
                        if (WoW.CanCast("ShadowBlades") && WoW.IsSpellInRange("NightBlade") && WoW.CurrentComboPoints <= 4)
                        {
                            WoW.CastSpell("ShadowBlades");
                            return;
                        }
//Cooldowns Spell GoremawsBite if AlternatePowerToMax >= 3 and not HasBuff(Stealth) and not HasBuff(ShadowDance) and not HasBuff(Subterfuge) and ChargesRemaining(ShadowDance) < SpellCharges(ShadowDance)
                        if (WoW.CanCast("GoremawsBite") && WoW.IsSpellInRange("NightBlade") && WoW.CurrentComboPoints <= 3 && !stealth && WoW.PlayerSpellCharges("ShadowDance") < 2)
                        {
                            WoW.CastSpell("GoremawsBite");
                            return;
                        }
                    }
                    if (WoW.CanCast("Berserking") && !WoW.IsSpellOnCooldown("Berserking") && WoW.PlayerRace == "Troll")
                    {
                        WoW.CastSpell("Berserking");
                        return;
                    }
                    if (WoW.CanCast("Arcane Torrent") && !WoW.IsSpellOnCooldown("Arcane Torrent") && WoW.PlayerRace == "BloodElf" && WoW.Energy <= 20)
                    {
                        WoW.CastSpell("Arcane Torrent");
                        return;
                    }
                    if (WoW.CanCast("Blood Fury") && !WoW.IsSpellOnCooldown("Blood Fury") && WoW.PlayerRace == "Orc")
                    {
                        WoW.CastSpell("Blood Fury");
                        return;
                    }

// Spell Backstab Once if AlternatePower < 5 and FightDurationSec - FightSecRemaining < 2
                    if (WoW.CanCast("Backstab") && WoW.CurrentComboPoints < 6 && WoW.Energy >= 45 && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("Backstab");
                        return;
                    }
//Spell Vanish if not HasTalent(Subterfuge) and not HasBuff(ShadowDance) and not HasBuff(MasterAssassinsInitiative) and Power >= 40 and ChargesRemaining(ShadowDance) < SpellCharges(ShadowDance) and not IsOnGcd and (AlternatePowerToMax >= 3 or (AlternatePowerToMax >= 2 and not HasBuff(ShadowBlades)))
                    if (WoW.CanCast("Vanish") && !stealth && WoW.IsSpellInRange("NightBlade") && WoW.Talent(2) != 2 && !WoW.PlayerHasBuff("ShadowDance") && !WoW.PlayerHasBuff("MasterAssassinsInitiative") && WoW.Energy >= 40 && WoW.PlayerSpellCharges("ShadowDance") < 2 && (WoW.CurrentComboPoints >= 3 || (WoW.CurrentComboPoints >= 2 && !WoW.PlayerHasBuff("ShadowBlades"))))
                    {
                        WoW.CastSpell("Vanish");
                        return;
                    }
//AmrRogueSubtletyDefault2 Spell SymbolsOfDeath if ((PowerToMax >= 40 and (not HasBuff(ShadowDance) or BuffRemainingSec(ShadowDance) >= BuffDurationSec(ShadowDance) - 1)) or
                    if (WoW.CanCast("Symbols of Death") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35 && WoW.Energy <= 60 && (WoW.PlayerHasBuff("ShadowDance") || WoW.PlayerBuffTimeRemaining("ShadowDance") >= 300))
                    {
                        WoW.CastSpell("Symbols of Death");
                        return;
                    }
//(HasBuff(ShadowDance) and FightDurationSec - FightSecRemaining < 10) or

//(HasItem(TheFirstOfTheDead) and AlternatePowerToMax >= 5 and Power >= 40)) and not IsOnGcd
// Finisher Spell Nightblade if CanRefreshDot(Nightblade) and TargetSecRemaining > 6 and (not HasBuff(MasterAssassinsInitiative) or DotRemainingSec(Nightblade) < BuffRemainingSec(MasterAssassinsInitiative))
                    if (WoW.CanCast("NightBlade") && WoW.CurrentComboPoints >= 5 && WoW.Energy >= 25 && (!WoW.TargetHasDebuff("NightBlade") || WoW.TargetDebuffTimeRemaining("NightBlade") <= 600) && ((!WoW.TargetHasDebuff("MasterAssassinsInitiative")) || (WoW.TargetDebuffTimeRemaining("Nightblade") < WoW.PlayerBuffTimeRemaining("MasterAssassinsInitiative"))) && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("NightBlade");
                        return;
                    }
                    //Finisher Spell DeathFromAbove if HasBuff(SymbolsOfDeath) or CooldownSecRemaining(SymbolsOfDeath) > 10
                    if (WoW.CanCast("DeathFromAbove") && WoW.CurrentComboPoints >= 5 && WoW.Energy >= 25 && (WoW.PlayerHasBuff("SymbolsOfDeath") || WoW.SpellCooldownTimeRemaining("SymbolsOfDeath") > 10000) && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("DeathFromAbove");
                        return;
                    }
//Finisher Spell Eviscerate
                    if (WoW.CanCast("Eviscerate") && WoW.CurrentComboPoints >= 5 && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35 && WoW.TargetHasDebuff("NightBlade"))
                    {
                        WoW.CastSpell("Eviscerate");
                        return;
                    }
//InsideStealth Spell Shadowstrike
                    if (WoW.CanCast("ShurikenStorm") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 40 && WoW.CurrentComboPoints <= 5 && stealth)
                    {
                        WoW.CastSpell("ShurikenStorm");
                        return;
                    }
// Spell ShadowDance if TimerSecRemaining(DeathFromAbove) > 0 and HasTalent(DarkShadow)
                    if (WoW.CanCast("ShadowDance") && WoW.Talent(6) == 1 && WoW.LastSpell == "DeathFromAbove")
                    {
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
//StealthCooldowns Spell ShadowDance
                    if (WoW.CanCast("ShadowDance"))
                    {
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
//Builder Spell Backstab
                    if (WoW.CanCast("ShurikenStorm") && WoW.CurrentComboPoints < 6 && WoW.Energy >= 35 && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("ShurikenStorm");
                        return;
                    }
                }
            }
        }
Beispiel #7
0
        }                                              //please Set between 1-99 NpC in range for ST if not desired set to 99

        public override void Pulse()
        {
            if (combatRoutine.Type == RotationType.SingleTarget || combatRoutine.Type == RotationType.SingleTargetCleave) //Single Target

            {
                if (WoW.TargetIsCasting) //Kick
                {
                    if (WoW.CanCast("Consume Magic") &&
                        WoW.TargetIsCastingAndSpellIsInterruptible &&
                        WoW.TargetPercentCast >= 55 &&
                        !WoW.IsSpellOnCooldown("Consume Magic") &&
                        !WoW.PlayerIsChanneling &&
                        !WoW.WasLastCasted("Consume Magic"))
                    {
                        WoW.CastSpell("Consume Magic");
                        return;
                    }
                }
                if (WoW.HasTarget && !WoW.PlayerIsChanneling && WoW.TargetIsEnemy && WoW.IsInCombat)
                {
                    if (WoW.PlayerHasBuff("Metamorphosis"))
                    {
                        if (combatRoutine.UseCooldowns)
                        {
                            if (WoW.Talent(5) == 3 && WoW.CanCast("Nemesis") && WoW.IsSpellInRange("Chaos Strike"))
                            {
                                WoW.CastSpell("Nemesis");
                                return;
                            }
                            if (WoW.Talent(7) == 1 && WoW.CanCast("Chaos Blades") && WoW.IsSpellInRange("Chaos Strike"))
                            {
                                WoW.CastSpell("Chaos Blades");
                                return;
                            }

                            if (WoW.CanCast("FOTI") && WoW.IsSpellInRange("Chaos Strike"))
                            {
                                WoW.CastSpell("FOTI");
                                return;
                            }
                        }

                        /*if (WoW.CanCast("Fel Rush") && WoW.PlayerSpellCharges("Fel Rush")>=1 && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <=100)
                         * {
                         *      WoW.CastSpell("Fel Rush");
                         *      return;
                         * }	*/// Use at own Risk may end up dead
                        if (WoW.Talent(7) == 2 && WoW.CanCast("FelBarrage") && WoW.IsSpellInRange("Chaos Strike") && WoW.PlayerSpellCharges("FelBarrage") >= 5)
                        {
                            WoW.CastSpell("FelBarrage");
                            return;
                        }
                        if (WoW.Talent(7) == 3 && WoW.Talent(1) == 3 && WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("Eye Beam");
                            return;
                        }
                        if (WoW.Talent(1) == 3 && WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("Eye Beam");
                            return;
                        }
                        if (WoW.Talent(7) == 3 && WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("Eye Beam");
                            return;
                        }
                        if (WoW.Talent(5) == 2 && WoW.CanCast("FelEruption") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 10)
                        {
                            WoW.CastSpell("FelEruption");
                            return;
                        }
                        if (WoW.Talent(3) == 3 && WoW.CanCast("Throw Glaive") && WoW.IsSpellInRange("Throw Glaive"))
                        {
                            WoW.CastSpell("Throw Glaive");
                            return;
                        }
                        if (WoW.Talent(1) == 2 && WoW.CanCast("Felblade") && WoW.Fury < 100 && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("Felblade");
                            return;
                        }
                        if (WoW.Talent(3) == 2 && WoW.CanCast("Death Sweep") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 15)
                        {
                            WoW.CastSpell("Death Sweep");
                            return;
                        }
                        if (WoW.CanCast("Annihilation") && WoW.IsSpellInRange("Chaos Strike") && WoW.PlayerHasBuff("Chaos Blades") && (WoW.Fury >= 40))
                        {
                            WoW.CastSpell("Annihilation");
                            return;
                        }
                        if (WoW.CanCast("Annihilation") && WoW.IsSpellInRange("Chaos Strike") && (WoW.Fury >= 55))
                        {
                            WoW.CastSpell("Annihilation");
                            return;
                        }
                        if (WoW.Talent(2) == 3 && WoW.CanCast("Demons Bite") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <= 70)
                        {
                            WoW.CastSpell("Demons Bite");
                            return;
                        }
                        if (WoW.Talent(2) == 1 && WoW.CanCast("Demons Bite") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <= 70)
                        {
                            WoW.CastSpell("Demons Bite");
                            return;
                        }
                        if (WoW.CanCast("Throw Glaive") && WoW.IsSpellInRange("Throw Glaive"))
                        {
                            WoW.CastSpell("Throw Glaive");
                            return;
                        }
                        if (WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike") && (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_Y) < 0))
                        {
                            WoW.CastSpell("Eye Beam");
                            return;
                        }
                    }
                    if (combatRoutine.UseCooldowns)
                    {
                        if (WoW.Talent(5) == 3 && WoW.CanCast("Nemesis") && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("Nemesis");
                            return;
                        }
                        if (WoW.CanCast("Metamorphosis") && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("Metamorphosis");
                            return;
                        }
                        if (WoW.Talent(7) == 1 && WoW.CanCast("Chaos Blades") && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("Chaos Blades");
                            return;
                        }

                        if (WoW.CanCast("FOTI") && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("FOTI");
                            return;
                        }
                        if (WoW.CanCast("Arcane Torrent") && !WoW.IsSpellOnCooldown("Arcane Torrent") && WoW.PlayerRace == "BloodElf" && WoW.Fury <= 50)
                        {
                            WoW.CastSpell("Arcane Torrent");
                            return;
                        }
                    }

                    /*if (WoW.CanCast("Fel Rush") && WoW.PlayerSpellCharges("Fel Rush")>=1 && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <=100)
                     * {
                     *      WoW.CastSpell("Fel Rush");
                     *      return;
                     * }	*///Use at own Risk may end up dead
                    if (WoW.Talent(7) == 2 && WoW.CanCast("FelBarrage") && WoW.IsSpellInRange("Chaos Strike") && WoW.PlayerSpellCharges("FelBarrage") >= 5)
                    {
                        WoW.CastSpell("FelBarrage");
                        return;
                    }
                    if (WoW.Talent(7) == 3 && WoW.Talent(1) == 3 && WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike"))
                    {
                        WoW.CastSpell("Eye Beam");
                        return;
                    }
                    if (WoW.Talent(1) == 3 && WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike"))
                    {
                        WoW.CastSpell("Eye Beam");
                        return;
                    }
                    if (WoW.Talent(7) == 3 && WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike"))
                    {
                        WoW.CastSpell("Eye Beam");
                        return;
                    }
                    if (WoW.Talent(5) == 2 && WoW.CanCast("FelEruption") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 10)
                    {
                        WoW.CastSpell("FelEruption");
                        return;
                    }
                    if (WoW.Talent(3) == 3 && WoW.CanCast("Throw Glaive") && WoW.IsSpellInRange("Throw Glaive"))
                    {
                        WoW.CastSpell("Throw Glaive");
                        return;
                    }
                    if (WoW.Talent(1) == 2 && WoW.CanCast("Felblade") && WoW.Fury < 100 && WoW.IsSpellInRange("Chaos Strike"))
                    {
                        WoW.CastSpell("Felblade");
                        return;
                    }
                    if (WoW.Talent(3) == 2 && WoW.CanCast("Blade Dance") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 15)
                    {
                        WoW.CastSpell("Blade Dance");
                        return;
                    }
                    if (WoW.CanCast("Chaos Strike") && WoW.IsSpellInRange("Chaos Strike") && WoW.PlayerHasBuff("Chaos Blades") && (WoW.Fury >= 40))
                    {
                        WoW.CastSpell("Chaos Strike");
                        return;
                    }
                    if (WoW.CanCast("Chaos Strike") && WoW.IsSpellInRange("Chaos Strike") && (WoW.Fury >= 55))
                    {
                        WoW.CastSpell("Chaos Strike");
                        return;
                    }
                    if (WoW.Talent(2) == 3 && WoW.CanCast("Demons Bite") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <= 70)
                    {
                        WoW.CastSpell("Demons Bite");
                        return;
                    }
                    if (WoW.Talent(2) == 1 && WoW.CanCast("Demons Bite") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <= 70)
                    {
                        WoW.CastSpell("Demons Bite");
                        return;
                    }
                    if (WoW.CanCast("Throw Glaive") && WoW.IsSpellInRange("Throw Glaive"))
                    {
                        WoW.CastSpell("Throw Glaive");
                        return;
                    }
                    if (WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike") && (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_Y) < 0))
                    {
                        WoW.CastSpell("Eye Beam");
                        return;
                    }
                }
            }
            if (combatRoutine.Type == RotationType.AOE) // AOE
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat)
                {
                    if (WoW.CanCast("Vengeful Retreat") && WoW.Talent(5) == 1 && WoW.Talent(2) == 1 && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 55)
                    {
                        WoW.CastSpell("Vengeful Retreat");
                        return;
                    }
                    if (WoW.CanCast("Vengeful Retreat") && WoW.Talent(5) == 1 && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 85)
                    {
                        WoW.CastSpell("Vengeful Retreat");
                        return;
                    }
                    if (WoW.CanCast("Fel Rush") && WoW.IsSpellInRange("Fel Blade") && WoW.Fury <= 100)
                    {
                        WoW.CastSpell("Fel Rush");
                        return;
                    }
                    if (WoW.Talent(7) == 2 && WoW.CanCast("FelBarrage") && WoW.IsSpellInRange("Chaos Strike") && WoW.PlayerSpellCharges("FelBarrage") >= 5 && WoW.PlayerHasBuff("Momentum"))
                    {
                        WoW.CastSpell("FelBarrage");
                        return;
                    }
                    if (WoW.CanCast("FOTI") && WoW.IsSpellInRange("Chaos Strike") && WoW.PlayerHasBuff("Momentum"))
                    {
                        WoW.CastSpell("FOTI");
                        return;
                    }
                    if (WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike") && WoW.PlayerHasBuff("Momentum"))
                    {
                        WoW.CastSpell("Eye Beam");
                        return;
                    }
                    if (WoW.Talent(3) == 2 && WoW.CanCast("Blade Dance") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 15)
                    {
                        WoW.CastSpell("Blade Dance");
                        return;
                    }
                    if (WoW.Talent(3) == 2 && WoW.CanCast("Death Sweep") && WoW.PlayerHasBuff("Metamorphosis") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 15)
                    {
                        WoW.CastSpell("Death Sweep");
                        return;
                    }
                    if (WoW.CanCast("Blade Dance") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 35)
                    {
                        WoW.CastSpell("Blade Dance");
                        return;
                    }
                    if (WoW.CanCast("Death Sweep") && WoW.PlayerHasBuff("Metamorphosis") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 35)
                    {
                        WoW.CastSpell("Death Sweep");
                        return;
                    }
                    if (WoW.Talent(3) == 3 && WoW.CanCast("Throw Glaive") && WoW.IsSpellInRange("Throw Glaive"))
                    {
                        WoW.CastSpell("Throw Glaive");
                        return;
                    }
                    if ((WoW.Talent(3) == 1 && WoW.CanCast("Chaos Strike") && WoW.IsSpellInRange("Chaos Strike") && (WoW.Fury >= 65 || (WoW.Fury >= 55 && (WoW.PlayerHasBuff("Chaos Blades") || WoW.TargetHasDebuff("Nemesis"))))))
                    {
                        WoW.CastSpell("Chaos Strike");
                        return;
                    }
                    if ((WoW.Talent(3) == 1 && WoW.CanCast("Annihilation") && WoW.IsSpellInRange("Chaos Strike") && (WoW.Fury >= 65 || (WoW.Fury >= 55 && (WoW.PlayerHasBuff("Chaos Blades") || WoW.TargetHasDebuff("Nemesis"))))))
                    {
                        WoW.CastSpell("Annihilation");
                        return;
                    }
                    if (WoW.CanCast("Throw Glaive") && WoW.IsSpellInRange("Throw Glaive"))
                    {
                        WoW.CastSpell("Throw Glaive");
                        return;
                    }
                    if ((WoW.CanCast("Chaos Strike") && WoW.IsSpellInRange("Chaos Strike") && (WoW.Fury >= 65 || (WoW.Fury >= 55 && (WoW.PlayerHasBuff("Chaos Blades") || WoW.TargetHasDebuff("Nemesis"))))))
                    {
                        WoW.CastSpell("Chaos Strike");
                        return;
                    }
                    if ((WoW.CanCast("Annihilation") && WoW.IsSpellInRange("Chaos Strike") && (WoW.Fury >= 65 || (WoW.Fury >= 55 && (WoW.PlayerHasBuff("Chaos Blades") || WoW.TargetHasDebuff("Nemesis"))))))
                    {
                        WoW.CastSpell("Annihilation");
                        return;
                    }
                    if (WoW.Talent(2) == 1 && WoW.CanCast("Demons Bite") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <= 70)
                    {
                        WoW.CastSpell("Demons Bite");
                        return;
                    }
                    if (WoW.Talent(2) == 3 && WoW.CanCast("Demons Bite") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <= 70)
                    {
                        WoW.CastSpell("Demons Bite");
                        return;
                    }
                    if (WoW.Talent(6) == 2 && WoW.CanCast("Chaos Nova") && WoW.IsSpellInRange("Chaos Blade"))
                    {
                        WoW.CastSpell("Chaos Nova");
                        return;
                    }
                }
            }
        }
        public override void Pulse()        // Updated for Legion (tested and working for single target)
        {
            if (WoW.IsInCombat && Control.IsKeyLocked(Keys.Scroll) && !WoW.TargetIsPlayer && !WoW.IsMounted)
            {
                SelectRotation(4, 9999, 1);
            }

            //Healthstone - Potion
            if ((WoW.CanCast("Healthstone") || WoW.CanCast("Potion")) &&
                (WoW.ItemCount("Healthstone") >= 1 || WoW.ItemCount("Potion") >= 1) &&
                (!WoW.ItemOnCooldown("Healthstone") || !WoW.ItemOnCooldown("Potion")) &&
                WoW.HealthPercent <= 30 &&
                !WoW.IsMounted)
            {
                WoW.CastSpell("Healthstone");
                WoW.CastSpell("Potion");
                return;
            }

            //Shield of Vengeance
            if (WoW.CanCast("Shield of Vengeance") &&
                WoW.HealthPercent <= 40 &&
                !WoW.IsMounted)
            {
                WoW.CastSpell("Shield of Vengeance");
                return;
            }

            //Lay on Hands
            if (WoW.CanCast("Lay on Hands") &&
                WoW.HealthPercent <= 20 &&
                !WoW.IsMounted)
            {
                WoW.CastSpell("Lay on Hands");
                return;
            }

            //Divine Steed
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_4) < 0 &&
                WoW.CanCast("Divine Steed") &&
                !WoW.PlayerHasBuff("Divine Steed"))
            {
                WoW.CastSpell("Divine Steed");
                return;
            }

            if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat && !WoW.IsMounted && !WoW.PlayerIsChanneling && !WoW.PlayerIsCasting && WoW.HealthPercent != 0)
            {
                //Crusade
                if (WoW.CanCast("Crusade") &&
                    WoW.Talent(7) == 2 &&
                    WoW.CurrentHolyPower >= 3 &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    (WoW.PlayerHasBuff("Bloodlust") || WoW.PlayerHasBuff("Time Warp") || WoW.PlayerHasBuff("Netherwinds") || WoW.PlayerHasBuff("Drums of War")))
                {
                    WoW.CastSpell("Crusade");
                    return;
                }

                //Avenging Wrath
                if (WoW.CanCast("Avenging Wrath") &&
                    WoW.CurrentHolyPower >= 3 &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    (WoW.PlayerHasBuff("Bloodlust") || WoW.PlayerHasBuff("Time Warp") || WoW.PlayerHasBuff("Netherwinds") || WoW.PlayerHasBuff("Drums of War")))
                {
                    WoW.CastSpell("Avenging Wrath");
                    return;
                }

                //Hammer of Justice
                if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_ADD) < 0 &&
                    WoW.CanCast("Hammer of Justice")
                    )
                {
                    WoW.CastSpell("Hammer of Justice");
                    return;
                }

                //Holy Wrath
                if (WoW.CanCast("Holy Wrath") &&
                    WoW.Talent(7) == 3 &&
                    WoW.HealthPercent <= 40 &&
                    WoW.IsSpellInRange("Templar Verdict"))
                {
                    WoW.CastSpell("Holy Wrath");
                    return;
                }

                //Single Target Rotation

                //Execution Sentence
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.CanCast("Execution Sentence") &&
                    WoW.TargetHasDebuff("Judgement") &&
                    WoW.TargetDebuffTimeRemaining("Judgement") >= 650 &&
                    WoW.Talent(1) == 2)
                {
                    WoW.CastSpell("Execution Sentence");
                    return;
                }

                //Justicar's Vengeance
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.CanCast("Justicars Vengeance") &&
                    WoW.PlayerHasBuff("Divine Purpose") &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    WoW.Talent(5) == 1)
                {
                    WoW.CastSpell("Justicars Vengeance");
                    return;
                }

                //Templar's Verdict
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    (WoW.CurrentHolyPower >= 3 || WoW.PlayerHasBuff("Divine Purpose") || (WoW.CurrentHolyPower >= 2 && WoW.PlayerHasBuff("The Fires of Justice"))) &&
                    WoW.CanCast("Templar Verdict") &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    WoW.TargetHasDebuff("Judgement") &&
                    WoW.TargetDebuffTimeRemaining("Judgement") >= 50)
                {
                    WoW.CastSpell("Templar Verdict");
                    return;
                }

                //Judgement
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.CanCast("Judgement") &&
                    WoW.CurrentHolyPower >= 3)
                {
                    WoW.CastSpell("Judgement");
                    return;
                }

                //Wake of Ashes
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.CurrentHolyPower == 0 &&
                    WoW.CanCast("Wake of Ashes") &&
                    WoW.IsSpellInRange("Templar Verdict"))
                {
                    WoW.CastSpell("Wake of Ashes");
                    return;
                }

                //Blade of Justice
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.CanCast("Blade of Justice") &&
                    WoW.IsSpellInRange("Blade of Justice") &&
                    WoW.CurrentHolyPower <= 3 &&
                    WoW.Talent(4) != 3)
                {
                    WoW.CastSpell("Blade of Justice");
                    return;
                }

                //Divine Hammer
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.CanCast("Divine Hammer") &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    WoW.CurrentHolyPower <= 3 &&
                    WoW.Talent(4) == 3)
                {
                    WoW.CastSpell("Divine Hammer");
                    return;
                }

                //Crusader Strike
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    WoW.CurrentHolyPower < 5 &&
                    WoW.PlayerSpellCharges("Crusader Strike") >= 1 &&
                    WoW.CanCast("Crusader Strike") &&
                    WoW.Talent(2) != 2)
                {
                    WoW.CastSpell("Crusader Strike");
                    return;
                }

                //Zeal
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    WoW.CurrentHolyPower < 5 &&
                    WoW.PlayerSpellCharges("Zeal") >= 1 &&
                    WoW.CanCast("Zeal") &&
                    WoW.Talent(2) == 2)
                {
                    WoW.CastSpell("Zeal");
                    return;
                }

                //Consecration
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.CanCast("Consecration") &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    WoW.Talent(1) == 3)
                {
                    WoW.CastSpell("Consecration");
                    return;
                }

                //AoE Rotation = 3+ Targets

                //Divine Storm
                if (combatRoutine.Type == RotationType.AOE &&
                    (WoW.CurrentHolyPower >= 3 || WoW.PlayerHasBuff("Divine Purpose") || (WoW.CurrentHolyPower >= 2 && WoW.PlayerHasBuff("The Fires of Justice"))) &&
                    WoW.CanCast("Divine Storm") &&
                    WoW.IsSpellInRange("Templar Verdict"))
                {
                    WoW.CastSpell("Divine Storm");
                    return;
                }

                //Judgement
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CanCast("Judgement"))
                {
                    WoW.CastSpell("Judgement");
                    return;
                }

                //Wake of Ashes
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CurrentHolyPower == 0 &&
                    WoW.CanCast("Wake of Ashes") &&
                    WoW.IsSpellInRange("Templar Verdict"))
                {
                    WoW.CastSpell("Wake of Ashes");
                    return;
                }

                //Consecration
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CanCast("Consecration") &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    WoW.Talent(1) == 3)
                {
                    WoW.CastSpell("Consecration");
                    return;
                }

                //Blade of Justice
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CanCast("Blade of Justice") &&
                    WoW.IsSpellInRange("Blade of Justice") &&
                    WoW.CurrentHolyPower <= 3 &&
                    WoW.Talent(4) != 3)
                {
                    WoW.CastSpell("Blade of Justice");
                    return;
                }

                //Divine Hammer
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CanCast("Divine Hammer") &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    WoW.CurrentHolyPower <= 3 &&
                    WoW.Talent(4) == 3)
                {
                    WoW.CastSpell("Divine Hammer");
                    return;
                }

                //Crusader Strike
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    WoW.CurrentHolyPower < 5 &&
                    WoW.PlayerSpellCharges("Crusader Strike") >= 1 &&
                    WoW.CanCast("Crusader Strike") &&
                    WoW.Talent(2) != 2)
                {
                    WoW.CastSpell("Crusader Strike");
                    return;
                }

                //Zeal
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.IsSpellInRange("Templar Verdict") &&
                    WoW.CurrentHolyPower < 5 &&
                    WoW.PlayerSpellCharges("Zeal") >= 1 &&
                    WoW.CanCast("Zeal") &&
                    WoW.Talent(2) == 2)
                {
                    WoW.CastSpell("Zeal");
                    return;
                }


                if (combatRoutine.Type == RotationType.SingleTargetCleave) //Cleave rotation = 2 targets
                {
                    // Do Single Target Cleave stuff here if applicable else ignore this one
                }
            }
        }
Beispiel #9
0
        public override void Pulse()
        {
            if (stopwatch.ElapsedMilliseconds == 0)
            {
                stopwatch.Start();
                Log.Write("The Cooldown toggle button is now Active (Numpad0). The delay is set to 1000ms ( 1 second )", Color.Black);
                return;
            }
            {
                if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_NUMPAD0) < 0)
                {
                    if (stopwatch.ElapsedMilliseconds > 1000)
                    {
                        combatRoutine.UseCooldowns = !combatRoutine.UseCooldowns;
                        WoW.Speak("Cooldowns " + (combatRoutine.UseCooldowns ? "On" : "Off"));
                        stopwatch.Restart();
                    }
                }
                if (combatRoutine.Type == RotationType.SingleTarget)
                {
                    if (WoW.IsSpellInRange("Rupture") && WoW.IsInCombat)
                    {
                        if (UseCooldowns && WoW.CanCast("Kingsbane") && WoW.CurrentComboPoints <= 4 && WoW.Energy >= 35 &&
                            !WoW.IsSpellOnCooldown("Kingsbane") &&
                            (WoW.SpellCooldownTimeRemaining("Vendetta") >= 10 || WoW.TargetHasDebuff("Vendetta")))
                        {
                            WoW.CastSpell("Kingsbane");
                            return;
                        }
                        if (!WoW.PlayerHasBuff("Vanish") && WoW.CanCast("Garrote") && WoW.Energy >= 45 && !WoW.TargetHasDebuff("Garrote") &&
                            !WoW.IsSpellOnCooldown("Garrote") &&
                            WoW.CurrentComboPoints <= 4 && WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Garrote");
                            return;
                        }
                        if (WoW.TargetHasDebuff("Vendetta") && WoW.CanCast("Fan Of Knives") && WoW.Energy >= 35 && WoW.PlayerHasBuff("FoK") &&
                            WoW.PlayerBuffStacks("FoK") == 30 &&
                            WoW.CurrentComboPoints <= 4)
                        {
                            WoW.CastSpell("Fan Of Knives");
                            return;
                        }
                        if (!WoW.PlayerHasBuff("Vanish") && WoW.CanCast("Garrote") && WoW.Energy >= 45 && WoW.TargetHasDebuff("Garrote") &&
                            WoW.TargetDebuffTimeRemaining("Garrote") <= 3 &&
                            WoW.CurrentComboPoints <= 4 && WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Garrote");
                            return;
                        }
                        if (WoW.CurrentComboPoints == 4 && WoW.Energy >= 25 && WoW.CanCast("Rupture") && !WoW.TargetHasDebuff("Rupture") &&
                            WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Rupture");
                            return;
                        }
                        if (WoW.CurrentComboPoints == 4 && WoW.Energy >= 25 && WoW.TargetHasDebuff("Rupture") &&
                            WoW.TargetDebuffTimeRemaining("Rupture") <= 6 && WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Rupture");
                            return;
                        }
                        if (WoW.CurrentComboPoints == 5 && WoW.Energy >= 25 && WoW.CanCast("Rupture") && !WoW.TargetHasDebuff("Rupture") &&
                            WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Rupture");
                            return;
                        }
                        if (WoW.CurrentComboPoints == 5 && WoW.Energy >= 25 && WoW.TargetHasDebuff("Rupture") &&
                            WoW.TargetDebuffTimeRemaining("Rupture") <= 6 && WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Rupture");
                            return;
                        }
                        if (!WoW.PlayerHasBuff("Vanish") && WoW.TargetHasDebuff("Toxins") && WoW.TargetDebuffTimeRemaining("Toxins") <= 1.5 &&
                            WoW.Energy >= 35 && WoW.CurrentComboPoints == 4 &&
                            WoW.CanCast("Envenom") && WoW.TargetHasDebuff("Rupture") && WoW.TargetDebuffTimeRemaining("Rupture") > 6 &&
                            WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Envenom");
                            return;
                        }
                        if (!WoW.PlayerHasBuff("Vanish") && WoW.TargetHasDebuff("Toxins") && WoW.TargetDebuffTimeRemaining("Toxins") <= 1.5 &&
                            WoW.Energy >= 35 && WoW.CurrentComboPoints == 5 &&
                            WoW.CanCast("Envenom") && WoW.TargetHasDebuff("Rupture") && WoW.TargetDebuffTimeRemaining("Rupture") > 6 &&
                            WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Envenom");
                            return;
                        }
                        if (!WoW.PlayerHasBuff("Vanish") && !WoW.TargetHasDebuff("Toxins") && WoW.Energy >= 35 && WoW.CurrentComboPoints == 4 &&
                            WoW.CanCast("Envenom") &&
                            WoW.TargetHasDebuff("Rupture") && WoW.TargetDebuffTimeRemaining("Rupture") > 6 && WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Envenom");
                            return;
                        }
                        if (!WoW.PlayerHasBuff("Vanish") && !WoW.TargetHasDebuff("Toxins") && WoW.Energy >= 35 && WoW.CurrentComboPoints == 5 &&
                            WoW.CanCast("Envenom") &&
                            WoW.TargetHasDebuff("Rupture") && WoW.TargetDebuffTimeRemaining("Rupture") > 6 && WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Envenom");
                            return;
                        }
                        if (!WoW.PlayerHasBuff("Vanish") && WoW.TargetHasDebuff("Toxins") && WoW.TargetHasDebuff("Vendetta") && WoW.Energy >= 140 &&
                            WoW.CurrentComboPoints >= 4 &&
                            WoW.CanCast("Envenom") && WoW.TargetHasDebuff("Rupture") && WoW.TargetDebuffTimeRemaining("Rupture") > 6 &&
                            WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Envenom");
                            return;
                        }
                        if (WoW.CanCast("Mutilate") && WoW.Energy >= 55 && WoW.CurrentComboPoints <= 3)
                        {
                            WoW.CastSpell("Mutilate");
                            return;
                        }
                        if (UseCooldowns && WoW.CanCast("Vendetta") && !WoW.IsSpellOnCooldown("Vendetta") && WoW.Energy <= 50)
                        {
                            WoW.CastSpell("Vendetta");
                            return;
                        }

                        /*if (UseCooldowns &&
                         * WoW.CanCast("Vanish") &&
                         * WoW.CurrentComboPoints >= 5 &&
                         * WoW.Energy >= 25 && WoW.TargetHasDebuff("Vendetta") &&
                         * (
                         *  WoW.TargetHasDebuff("Rupture") &&
                         *  WoW.TargetDebuffTimeRemaining("Rupture") < 10
                         * )
                         * ) {
                         * WoW.CastSpell("Vanish");
                         * return;
                         * }*/
                        if (UseCooldowns && WoW.CurrentComboPoints == 5 && !WoW.IsSpellOnCooldown("Vanish") && WoW.Energy >= 35 &&
                            WoW.TargetHasDebuff("Vendetta"))
                        {
                            WoW.CastSpell("Vanish");
                            return;
                        }
                        if (UseCooldowns && WoW.CurrentComboPoints == 5 && WoW.PlayerHasBuff("Vanish") && WoW.Energy >= 35 && WoW.TargetHasDebuff("Vendetta"))
                        {
                            WoW.CastSpell("Rupture");
                            return;
                        }
                    }
                }


                if (combatRoutine.Type == RotationType.AOE || combatRoutine.Type == RotationType.Cleave) // Do AoE Target Stuff here
                {
                    if (WoW.HasTarget && WoW.IsSpellInRange("Rupture") && WoW.IsInCombat)
                    {
                        if (WoW.Energy >= 35 && WoW.CurrentComboPoints <= 4 && WoW.CanCast("Fan Of Knives"))
                        {
                            WoW.CastSpell("Fan Of Knives");
                            return;
                        }
                        if (WoW.Energy >= 35 && WoW.CurrentComboPoints == 4 && WoW.TargetHealthPercent <= 35 && WoW.CanCast("Envenom"))
                        {
                            WoW.CastSpell("Envenom");
                            return;
                        }
                        if (WoW.Energy >= 35 && WoW.CurrentComboPoints == 5 && WoW.TargetHealthPercent <= 35 && WoW.CanCast("Envenom"))
                        {
                            WoW.CastSpell("Envenom");
                            return;
                        }
                        if (WoW.Energy >= 25 && WoW.CurrentComboPoints == 4 && WoW.TargetHealthPercent >= 36 && WoW.CanCast("Rupture") &&
                            !WoW.TargetHasDebuff("Rupture"))
                        {
                            WoW.CastSpell("Rupture");
                            return;
                        }
                        if (WoW.Energy >= 25 && WoW.CurrentComboPoints == 5 && WoW.TargetHealthPercent >= 36 && WoW.CanCast("Rupture") &&
                            !WoW.TargetHasDebuff("Rupture"))
                        {
                            WoW.CastSpell("Rupture");
                            return;
                        }
                        if (WoW.Energy >= 35 && WoW.CurrentComboPoints >= 4 && WoW.TargetHealthPercent >= 36 && WoW.TargetHasDebuff("Rupture") &&
                            WoW.CanCast("Envenom"))
                        {
                            WoW.CastSpell("Envenom");
                            return;
                        }
                        if (WoW.CanCast("Garrote") && WoW.Energy >= 45 && !WoW.TargetHasDebuff("Garrote") && !WoW.IsSpellOnCooldown("Garrote") &&
                            WoW.CurrentComboPoints <= 4 &&
                            WoW.IsSpellInRange("Garrote"))
                        {
                            WoW.CastSpell("Garrote");
                        }
                    }
                }
            }
        }
 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;
             }
         }
     }
 }
        public override void Pulse()
        {
            if (WoW.IsInCombat && Control.IsKeyLocked(Keys.Scroll) && !WoW.TargetIsPlayer && !WoW.IsMounted)
            {
                SelectRotation(4, 100, 1);
            }

            if (DetectKeyPress.GetKeyState(0x6A) < 0)
            {
                UseCooldowns = !UseCooldowns;
                Thread.Sleep(150);
            }

            /*if(WoW.IsInCombat && !WoW.HasTarget)
             * {
             * WoW.KeyPressRelease(WoW.Keys.Tab);
             * return;
             * }*/
            if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat && !WoW.IsMounted)
            {
                if (WoW.CanCast("FeignDeath") && WoW.Level >= 28 && WoW.HealthPercent <= ConfigFile.ReadValue <int>("Hunter", "FeignDeath Percent") && FeignDeath && !WoW.IsSpellOnCooldown("FeignDeath") && WoW.HealthPercent != 0)
                {
                    WoW.CastSpell("FeignDeath");
                    return;
                }
                if (WoW.CanCast("Exhilaration") && WoW.Level >= 24 && WoW.HealthPercent <= ConfigFile.ReadValue <int>("Hunter", "Exhilaration Percent") && Exhilaration && !WoW.IsSpellOnCooldown("Exhilaration") && WoW.HealthPercent != 0)
                {
                    WoW.CastSpell("Exhilaration");
                    return;
                }
                if (WoW.CanCast("AspectoftheTurtle") && WoW.Level >= 70 && WoW.HealthPercent <= ConfigFile.ReadValue <int>("Hunter", "AspectoftheTurtle Percent") && AspectoftheTurtle && !WoW.IsSpellOnCooldown("AspectoftheTurtle") && WoW.HealthPercent != 0)
                {
                    WoW.CastSpell("AspectoftheTurtle");
                    return;
                }

                if (KilJaeden && WoW.CanCast("Kil'jaeden's Burning Wish") && !WoW.ItemOnCooldown("Kil'jaeden's Burning Wish"))
                {
                    WoW.CastSpell("Kil'jaeden's Burning Wish");
                    return;
                }
                if ((WoW.CanCast("Healthstone") || WoW.CanCast("Potion")) &&
                    (WoW.ItemCount("Healthstone") >= 1 || WoW.ItemCount("Potion") >= 1) &&
                    (!WoW.ItemOnCooldown("Healthstone") || !WoW.ItemOnCooldown("Potion")) &&
                    WoW.HealthPercent <= ConfigFile.ReadValue <int>("Hunter", "Potion Percent") && WoW.HealthPercent != 0 && Potion)
                {
                    Thread.Sleep(500);
                    WoW.CastSpell("Healthstone");
                    WoW.CastSpell("Potion");
                    return;
                }
                if (Pot && BL && WoW.CanCast("Pot") && !WoW.PlayerHasBuff("Pot") && WoW.ItemCount("Pot") >= 1 && !WoW.ItemOnCooldown("Pot"))
                {
                    WoW.CastSpell("Pot");
                    return;
                }

                if (!WoW.HasPet && WoW.CanCast("Wolf"))
                {
                    WoW.CastSpell("Wolf");
                    return;
                }
                if (WoW.PetHealthPercent <= 0 && WoW.CanCast("Phoenix"))
                {
                    WoW.CastSpell("Phoenix");
                    return;
                }

                if (WoW.PetHealthPercent <= 90 &&
                    WoW.Level >= 14 && !WoW.PetHasBuff("Heal Pet") &&
                    HealPet &&
                    WoW.CanCast("Revive Pet") &&
                    !WoW.IsMoving)
                {
                    WoW.CastSpell("Heal Pet");
                    return;
                }
                if (WoW.PetHealthPercent <= 0 &&
                    WoW.IsSpellOnCooldown("Phoenix") &&
                    WoW.CanCast("Revive Pet") &&
                    !WoW.IsMoving)
                {
                    WoW.CastSpell("Revive Pet");
                    return;
                }
                if (WoW.TargetIsCasting)
                {
                    if (WoW.CanCast("Counter Shot") && WoW.Level >= 32 &&
                        WoW.TargetIsCastingAndSpellIsInterruptible &&
                        WoW.TargetPercentCast >= ConfigFile.ReadValue <int>("Hunter", "CounterShot Percent") &&
                        !WoW.IsSpellOnCooldown("Counter Shot") &&
                        !WoW.PlayerIsChanneling &&
                        !WoW.WasLastCasted("Counter Shot"))
                    {
                        WoW.CastSpell("Counter Shot");
                        return;
                    }
                    if (WoW.CanCast("Intimidation") && WoW.Level >= 32 &&
                        Intimidation &&
                        WoW.TargetIsCastingAndSpellIsInterruptible &&
                        WoW.TargetPercentCast <= ConfigFile.ReadValue <int>("Hunter", "Intimidation Percent") &&
                        !WoW.IsSpellOnCooldown("Intimidation") &&
                        !WoW.PlayerIsChanneling &&
                        !WoW.WasLastCasted("Intimidation"))
                    {
                        WoW.CastSpell("Intimidation");
                        return;
                    }
                }
                if (WoW.CanCast("Kil'jaeden's Burning Wish") && KilJaeden && !WoW.ItemOnCooldown("Kil'jaeden's Burning Wish") && !WoW.IsSpellOnCooldown("Kil'jaeden's Burning Wish"))
                {
                    WoW.CastSpell("Kil'jaeden's Burning Wish");
                    return;
                }
                if (WoW.CanCast("Volley") &&
                    !WoW.PlayerHasBuff("Volley") &&
                    WoW.Talent(6) == 3)
                {
                    WoW.CastSpell("Volley");
                    return;
                }
                if (WoW.CanCast("Berserking")

                    && !WoW.IsSpellOnCooldown("Berserking") &&
                    WoW.PlayerRace == "Troll")
                {
                    WoW.CastSpell("Berserking");
                    return;
                }
                if (WoW.CanCast("Arcane Torrent") &&
                    WoW.PlayerRace == "BloodElf" &&
                    WoW.Focus <= 85)
                {
                    WoW.CastSpell("Arcane Torrent");
                    return;
                }
                if (WoW.CanCast("Blood Fury")

                    && !WoW.IsSpellOnCooldown("Blood Fury") &&
                    WoW.PlayerRace == "Orc")
                {
                    WoW.CastSpell("Blood Fury");
                    return;
                }
                if (WoW.CanCast("Chimaera Shot") &&
                    WoW.Focus < 90 &&
                    WoW.IsSpellOnCooldown("Dire Frenzy") &&
                    WoW.IsSpellOnCooldown("Kill Command") &&
                    WoW.CanCast("Chimaera Shot") &&
                    WoW.Talent(2) == 3)
                {
                    WoW.CastSpell("Chimaera Shot");
                    return;
                }
            }
            if (combatRoutine.Type == RotationType.SingleTarget || combatRoutine.Type == RotationType.SingleTargetCleave)
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat && !WoW.IsMounted)
                {
                    if (WoW.CanCast("A Murder of Crows") &&
                        WoW.Talent(6) == 1 &&
                        WoW.Focus >= 25 &&
                        WoW.IsSpellInRange("Cobra Shot") &&
                        !WoW.IsSpellOnCooldown("A Murder of Crows"))
                    {
                        WoW.CastSpell("A Murder of Crows");
                        return;
                    }
//	stampede,if=buff.bloodlust.up|buff.bestial_wrath.up|cooldown.bestial_wrath.remains<=2|target.time_to_die<=14
                    if (WoW.CanCast("Stampede") && WoW.Talent(7) == 1 && WoW.IsSpellInRange("Cobra Shot") && ((WoW.PlayerHasBuff("Bestial Wrath")) || (WoW.SpellCooldownTimeRemaining("Bestial Wrath") <= 2)) &&
                        !WoW.PlayerHasBuff("AspectoftheTurtle") &&
                        !WoW.IsSpellOnCooldown("Stampede"))
                    {
                        WoW.CastSpell("Stampede");

                        return;
                    }
//dire_beast,if=cooldown.bestial_wrath.remains>3
                    if (WoW.CanCast("Dire Beast") && WoW.Level >= 12 && WoW.Talent(2) != 2 && !WoW.IsSpellOnCooldown("Dire Beast") && WoW.SpellCooldownTimeRemaining("Bestial Wrath") > 300 && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Dire Beast");
                        return;
                    }
//dire_frenzy,if=(cooldown.bestial_wrath.remains>6&(!equipped.the_mantle_of_command|pet.cat.buff.dire_frenzy.remains<=gcd.max*1.2))
                    if (WoW.CanCast("Dire Frenzy") && (WoW.SpellCooldownTimeRemaining("Bestial Wrath") > 600 && (WoW.Legendary(1) != 3 || WoW.PetBuffTimeRemaining("Dire Frenzy") <= 70)) && WoW.Talent(2) == 2 && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Dire Frenzy");
                        return;
                    }
//|(charges>=2&focus.deficit>=25+talent.dire_stable.enabled*12)|target.time_to_die<9
                    if (WoW.CanCast("Dire Frenzy") && WoW.PlayerSpellCharges("Dire Frenzy") >= 2 && WoW.Focus <= 95 && WoW.Talent(2) == 2 && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Dire Frenzy");
                        return;
                    }
                    if (WoW.CanCast("Dire Frenzy") && WoW.PlayerSpellCharges("Dire Frenzy") >= 2 && WoW.Focus <= 83 && WoW.Talent(2) == 2 && WoW.Talent(1) == 3 && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Dire Frenzy");
                        return;
                    }
//aspect_of_the_wild,if=buff.bestial_wrath.up|target.time_to_die<12
                    if (WoW.CanCast("Aspect of the Wild") && WoW.Level >= 26 && UseCooldowns && WoW.PlayerHasBuff("Bestial Wrath") && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Aspect of the Wild");
                        return;
                    }
//titans_thunder,if=talent.dire_frenzy.enabled|cooldown.dire_beast.remains>=3|(buff.bestial_wrath.up&pet.dire_beast.active)
                    if (WoW.CanCast("Titan's Thunder") && WoW.Level >= 110 && (WoW.Talent(2) == 2 || (WoW.Talent(2) != 2 && WoW.SpellCooldownTimeRemaining("Dire Beast") > 300) || (WoW.Talent(2) != 2 && WoW.PlayerHasBuff("Bestial Wrath") && WoW.PlayerHasBuff("Dire Beast"))) && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Titan's Thunder");
                        return;
                    }
//bestial_wrath
                    if (WoW.CanCast("Bestial Wrath") && WoW.Level >= 40 && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Bestial Wrath");
                        return;
                    }
//kill_command
                    if (WoW.CanCast("Kill Command") && (WoW.Focus >= 30 || (WoW.PlayerHasBuff("Roar of the Seven Lions") && WoW.Focus >= 25)) && WoW.Level >= 10 && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Kill Command");
                        return;
                    }
                    if (WoW.CanCast("Cobra Shot") && WoW.Level <= 39 && WoW.Focus > 40

                        && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Cobra Shot");
                        return;
                    }
//cobra_shot,if=(cooldown.kill_command.remains>focus.time_to_max&cooldown.bestial_wrath.remains>focus.time_to_max)|(buff.bestial_wrath.up&focus.regen*cooldown.kill_command.remains>30)|target.time_to_die<cooldown.kill_command.remains
                    if (WoW.CanCast("Cobra Shot") && (WoW.Focus > 32 || (WoW.PlayerHasBuff("Roar of the Seven Lions") && WoW.Focus >= 25)) && (WoW.SpellCooldownTimeRemaining("Kill Command") > (FocusTimetoMax)) && (WoW.SpellCooldownTimeRemaining("Bestial Wrath") > (FocusTimetoMax))

                        && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Cobra Shot");
                        return;
                    }
                    if (WoW.CanCast("Cobra Shot") && (WoW.Focus > 32 || (WoW.PlayerHasBuff("Roar of the Seven Lions") && WoW.Focus >= 25)) && WoW.PlayerHasBuff("Bestial Wrath") && ((FocusRegen * WoW.SpellCooldownTimeRemaining("Kill Command")) > 300) && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Cobra Shot");
                        return;
                    }
                }
            }

            if (combatRoutine.Type == RotationType.AOE)
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat)
                {
                    if (WoW.CanCast("Barrage") &&
                        WoW.Talent(6) == 2 &&
                        !WoW.IsSpellOnCooldown("Barrage") &&
                        WoW.IsSpellInRange("Cobra Shot") &&
                        WoW.Focus >= 60)
                    {
                        WoW.CastSpell("Barrage");
                        return;
                    }

                    if (WoW.CanCast("A Murder of Crows") &&
                        WoW.Talent(6) == 1 &&
                        WoW.Focus >= 46 - FocusRegen &&
                        WoW.PetBuffTimeRemaining("Beast Cleave") > GCD &&
                        WoW.IsSpellInRange("Cobra Shot") &&
                        !WoW.IsSpellOnCooldown("A Murder of Crows"))
                    {
                        WoW.CastSpell("A Murder of Crows");
                        return;
                    }
                    if (WoW.CanCast("Multi-Shot") && WoW.Level >= 50 &&
                        (WoW.Focus >= 40 || (WoW.PlayerHasBuff("Roar of the Seven Lions") && WoW.Focus >= 34)) &&
                        !WoW.PetHasBuff("Beast Cleave") &&
                        WoW.IsSpellInRange("Multi-Shot"))
                    {
                        WoW.CastSpell("Multi-Shot");
                        return;
                    }
                    if (WoW.CanCast("Multi-Shot") && WoW.Level >= 50 &&
                        (WoW.Focus >= 40 || (WoW.PlayerHasBuff("Roar of the Seven Lions") && WoW.Focus >= 34)) &&
                        WoW.PetHasBuff("Beast Cleave") &&
                        WoW.PetBuffTimeRemaining("Beast Cleave") <= 70 &&
                        WoW.IsSpellInRange("Multi-Shot"))
                    {
                        WoW.CastSpell("Multi-Shot");
                        return;
                    }
//	stampede,if=buff.bloodlust.up|buff.bestial_wrath.up|cooldown.bestial_wrath.remains<=2|target.time_to_die<=14
                    if (WoW.CanCast("Stampede") && WoW.Talent(7) == 1 && WoW.IsSpellInRange("Cobra Shot") && ((WoW.PlayerHasBuff("Bestial Wrath")) || (WoW.SpellCooldownTimeRemaining("Bestial Wrath") <= 2)) &&
                        !WoW.PlayerHasBuff("AspectoftheTurtle") &&
                        !WoW.IsSpellOnCooldown("Stampede"))
                    {
                        WoW.CastSpell("Stampede");

                        return;
                    }
//dire_beast,if=cooldown.bestial_wrath.remains>3
                    if (WoW.CanCast("Dire Beast") && WoW.Level >= 12 && WoW.Talent(2) != 2 && !WoW.IsSpellOnCooldown("Dire Beast") && WoW.SpellCooldownTimeRemaining("Bestial Wrath") > 300 && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Dire Beast");
                        return;
                    }
//dire_frenzy,if=(cooldown.bestial_wrath.remains>6&(!equipped.the_mantle_of_command|pet.cat.buff.dire_frenzy.remains<=gcd.max*1.2))
                    if (WoW.CanCast("Dire Frenzy") && (WoW.SpellCooldownTimeRemaining("Bestial Wrath") > 600 && (WoW.Legendary(1) != 3 || WoW.PetBuffTimeRemaining("Dire Frenzy") <= 70)) && WoW.Talent(2) == 2 && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Dire Frenzy");
                        return;
                    }
//|(charges>=2&focus.deficit>=25+talent.dire_stable.enabled*12)|target.time_to_die<9
                    if (WoW.CanCast("Dire Frenzy") && WoW.PlayerSpellCharges("Dire Frenzy") >= 2 && WoW.Focus <= 95 && WoW.Talent(2) == 2 && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Dire Frenzy");
                        return;
                    }
                    if (WoW.CanCast("Dire Frenzy") && WoW.PlayerSpellCharges("Dire Frenzy") >= 2 && WoW.Focus <= 83 && WoW.Talent(2) == 2 && WoW.Talent(1) == 3 && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Dire Frenzy");
                        return;
                    }
//aspect_of_the_wild,if=buff.bestial_wrath.up|target.time_to_die<12
                    if (WoW.CanCast("Aspect of the Wild") && WoW.Level >= 26 && UseCooldowns && WoW.PetHasBuff("Beast Cleave") && WoW.PetBuffTimeRemaining("Beast Cleave") > GCD && WoW.PlayerHasBuff("Bestial Wrath") && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Aspect of the Wild");
                        return;
                    }
//titans_thunder,if=talent.dire_frenzy.enabled|cooldown.dire_beast.remains>=3|(buff.bestial_wrath.up&pet.dire_beast.active)
                    if (WoW.CanCast("Titan's Thunder") && WoW.Level >= 110 && WoW.PetHasBuff("Beast Cleave") && WoW.PetBuffTimeRemaining("Beast Cleave") > GCD && (WoW.Talent(2) == 2 || (WoW.Talent(2) != 2 && WoW.SpellCooldownTimeRemaining("Dire Beast") > 300) || (WoW.Talent(2) != 2 && WoW.PlayerHasBuff("Bestial Wrath") && WoW.PlayerHasBuff("Dire Beast"))) && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Titan's Thunder");
                        return;
                    }
//bestial_wrath
                    if (WoW.CanCast("Bestial Wrath") && WoW.Level >= 40 && WoW.PetHasBuff("Beast Cleave") && WoW.PetBuffTimeRemaining("Beast Cleave") > GCD && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Bestial Wrath");
                        return;
                    }
//kill_command
                    if (WoW.CanCast("Kill Command") && WoW.Level >= 10 && ((WoW.Focus >= 70 - FocusRegen) || (WoW.PlayerHasBuff("Roar of the Seven Lions") && (WoW.Focus >= 59 - FocusRegen))) && WoW.PetHasBuff("Beast Cleave") && WoW.PetBuffTimeRemaining("Beast Cleave") > GCD && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Kill Command");
                        return;
                    }
//cobra_shot,if=(cooldown.kill_command.remains>focus.time_to_max&cooldown.bestial_wrath.remains>focus.time_to_max)|(buff.bestial_wrath.up&focus.regen*cooldown.kill_command.remains>30)|target.time_to_die<cooldown.kill_command.remains
                    if (WoW.CanCast("Cobra Shot") && WoW.PetHasBuff("Beast Cleave") && WoW.PetBuffTimeRemaining("Beast Cleave") > GCD && ((WoW.Focus > 72 - FocusRegen) || (WoW.PlayerHasBuff("Roar of the Seven Lions") && (WoW.Focus >= 59 - FocusRegen))) && (WoW.SpellCooldownTimeRemaining("Kill Command") > FocusTimetoMax && WoW.SpellCooldownTimeRemaining("Bestial Wrath") > FocusTimetoMax)

                        && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Cobra Shot");
                        return;
                    }
                    if (WoW.CanCast("Cobra Shot") && WoW.PetHasBuff("Beast Cleave") && WoW.PetBuffTimeRemaining("Beast Cleave") > GCD && ((WoW.Focus > 72 - FocusRegen) || (WoW.PlayerHasBuff("Roar of the Seven Lions") && (WoW.Focus >= 59 - FocusRegen))) && WoW.PlayerHasBuff("Bestial Wrath") && ((FocusRegen * WoW.SpellCooldownTimeRemaining("Kill Command")) > 300) && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Cobra Shot");
                        return;
                    }
                    if (WoW.CanCast("Cobra Shot") && WoW.Level <= 39 && WoW.Focus > 40

                        && WoW.IsSpellInRange("Cobra Shot"))
                    {
                        WoW.CastSpell("Cobra Shot");
                        return;
                    }
                }
            }
        }
        }                                              //please Set between 1-99 NpC in range for ST if not desired set to 99

        public override void Pulse()
        {
            if (DetectKeyPress.GetKeyState(0x6A) < 0)
            {
                UseCooldowns = !UseCooldowns;
                Thread.Sleep(150);
            }

            /*if(WoW.IsInCombat && !WoW.HasTarget)
             * {
             * WoW.KeyPressRelease(WoW.Keys.Tab);
             * return;
             * }*/
            if (WoW.IsInCombat && !pullwatch.IsRunning)
            {
                pullwatch.Start();
                Log.Write("Starting Combat, Starting Pullwatch.", Color.Red);
            }
            if (!WoW.IsInCombat && pullwatch.ElapsedMilliseconds > 10000)
            {
                pullwatch.Reset();
                Log.Write("Leaving Combat, Resetting Stopwatches.", Color.Red);
            }


//Log.Write("Direcount" + DireBeastCount  , Color.Red);
//Log.Write("focusregdire" + (FocusRegen+DireBeastCount*1.5) , Color.Red);
//Log.Write("focusreg" + (FocusRegen+DireBeastCount*1.5)  , Color.Red);

//Log.Write("timetomax" + (((120f - WoW.Focus) /(FocusRegen+DireBeastCount*1.5)) *100) , Color.Red);
//Log.Write("timetomax" + (((120f - WoW.Focus) /((10f* (1f + (WoW.HastePercent / 100f)))+WoW.PlayerBuffStacks("Dire Beast")*1.5)) *100f) , Color.Red);



            if (combatRoutine.Type == RotationType.SingleTarget || combatRoutine.Type == RotationType.SingleTargetCleave)
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && !WoW.IsMounted)
                {
//shadow_dance,if=talent.dark_shadow.enabled&!stealthed.all&buff.death_from_above.up&buff.death_from_above.remains<=0.15
                    if (WoW.CanCast("ShadowDance") && (WoW.PlayerHasBuff("DeathFromAbove") || WoW.LastSpell == "DeathFromAbove") && !stealth && WoW.Talent(6) == 1)
                    {
                        Thread.Sleep(1000);
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
//shadow_dance,if=charges_fractional>=variable.shd_fractional|target.time_to_die<cooldown.symbols_of_death.remains
                    if (WoW.CanCast("ShadowDance") && WoW.PlayerSpellCharges("ShadowDance") <= 2 && !stealth && WoW.LastSpell != "ShadowDance")
                    {
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
//	death_from_above,if=!talent.dark_shadow.enabled|spell_targets>=4&buff.shadow_dance.up|spell_targets<4&!buff.shadow_dance.up&(buff.symbols_of_death.up|cooldown.symbols_of_death.remains>=10+set_bonus.tier20_4pc*5)
                    if (WoW.CanCast("DeathFromAbove") && WoW.IsSpellInRange("NightBlade") && WoW.Talent(6) != 1 && (WoW.PlayerHasBuff("SymbolsOfDeath") || WoW.SpellCooldownTimeRemaining("SymbolsOfDeath") >= 1000))
                    {
                        WoW.CastSpell("DeathFromAbove");
                        return;
                    }
//	call_action_list,name=cds
                    if (combatRoutine.UseCooldowns)
                    {
                        if (WoW.CanCast("Berserking") && !WoW.IsSpellOnCooldown("Berserking") && WoW.PlayerRace == "Troll" && stealth)
                        {
                            WoW.CastSpell("Berserking");
                            return;
                        }
                        if (WoW.CanCast("Arcane Torrent") && !WoW.IsSpellOnCooldown("Arcane Torrent") && WoW.PlayerRace == "BloodElf" && WoW.Energy <= 20)
                        {
                            WoW.CastSpell("Arcane Torrent");
                            return;
                        }
                        if (WoW.CanCast("Blood Fury") && stealth && !WoW.IsSpellOnCooldown("Blood Fury") && WoW.PlayerRace == "Orc")
                        {
                            WoW.CastSpell("Blood Fury");
                            return;
                        }
//symbols_of_death,if=(talent.death_from_above.enabled&cooldown.death_from_above.remains<=3&(dot.nightblade.remains>=cooldown.death_from_above.remains+3|target.time_to_die-dot.nightblade.remains<=6)&(time>=3|set_bonus.tier20_4pc))
                        if (WoW.CanCast("SymbolsOfDeath") && WoW.Talent(7) == 3 && stealth && WoW.SpellCooldownTimeRemaining("DeathFromAbove") <= 300 && (WoW.TargetDebuffTimeRemaining("NightBlade") >= (WoW.SpellCooldownTimeRemaining("DeathFromAbove") + 300)) && ((pullwatch.ElapsedMilliseconds >= 3000) || T204pc) && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35)
                        {
                            WoW.CastSpell("SymbolsOfDeath");
                            return;
                        }
//shadow_blades,if=(time>10&combo_points.deficit>=2+stealthed.all-equipped.mantle_of_the_master_assassin)|(time<10&(!talent.marked_for_death.enabled|combo_points.deficit>=3|dot.nightblade.ticking))
                        if (WoW.CanCast("ShadowBlades") && ((pullwatch.ElapsedMilliseconds > 10000 && WoW.CurrentComboPoints <= 4 && stealth) || (pullwatch.ElapsedMilliseconds < 10000 && (WoW.Talent(7) != 2 || WoW.CurrentComboPoints <= 3 || WoW.TargetHasDebuff("Nightblade")))) && WoW.IsSpellInRange("NightBlade"))
                        {
                            WoW.CastSpell("ShadowBlades");
                            return;
                        }
//goremaws_bite,if=!stealthed.all&cooldown.shadow_dance.charges_fractional<=variable.shd_fractional&((combo_points.deficit>=4-(time<10)*2&energy.deficit>50+talent.vigor.enabled*25-(time>=10)*15)|(combo_points.deficit>=1&target.time_to_die<8))
                        if (WoW.CanCast("GoremawsBite") && WoW.IsSpellInRange("NightBlade") && WoW.PlayerSpellCharges("ShadowDance") < 2 && !stealth && WoW.CurrentComboPoints <= 2 && WoW.Energy <= 50)
                        {
                            WoW.CastSpell("GoremawsBite");
                            return;
                        }
//vanish,if=energy>=55-talent.shadow_focus.enabled*10&variable.dsh_dfa&(!equipped.mantle_of_the_master_assassin|buff.symbols_of_death.up)&cooldown.shadow_dance.charges_fractional<=variable.shd_fractional				&!buff.shadow_dance.up&!buff.stealth.up&mantle_duration=0&(dot.nightblade.remains>=cooldown.death_from_above.remains+6|target.time_to_die-dot.nightblade.remains<=6)&cooldown.death_from_above.remains<=1&(time<10|combo_points>=3)|target.time_to_die<=7
                        if (WoW.CanCast("Vanish") && WoW.IsSpellInRange("NightBlade") && (WoW.Energy >= 50 || (WoW.Talent(2) == 3 && WoW.Energy >= 45)) && dshdfa && (!MantleoftheMaster || WoW.PlayerHasBuff("SymbolsOfDeath")) && WoW.PlayerSpellCharges("ShadowDance") < 2 && !stealth && (WoW.TargetDebuffTimeRemaining("NightBlade") >= (WoW.SpellCooldownTimeRemaining("DeathFromAbove") + 600)) && WoW.SpellCooldownTimeRemaining("DeathFromAbove") <= 100 && ((pullwatch.ElapsedMilliseconds < 10000) || WoW.CurrentComboPoints >= 3))
                        {
                            WoW.CastSpell("Vanish");
                            return;
                        }
                    }
                    if (stealth)
                    {
//combo_points>=5&(spell_targets.shuriken_storm>=3+equipped.shadow_satyrs_walk|(mantle_duration<=1.3&mantle_duration-gcd.remains>=0.3))

                        /*	if (WoW.CurrentComboPoints >=5 )
                         *      {
                         * //nightblade,if=(!talent.dark_shadow.enabled|!buff.shadow_dance.up)&target.time_to_die-remains>6&(mantle_duration=0|remains<=mantle_duration)&((refreshable&(!finality|buff.finality_nightblade.up))|remains<tick_time*2)
                         *      if (WoW.CanCast("NightBlade") && WoW.IsSpellInRange("NightBlade")&& WoW.Energy >= 25 && (WoW.Talent(6) !=1 || !WoW.PlayerHasBuff("ShadowDance")) && (!WoW.TargetHasDebuff("NightBlade") || WoW.TargetDebuffTimeRemaining("NightBlade") <= 600) )
                         *      {
                         * WoW.CastSpell("NightBlade");
                         * return;
                         *      }
                         * //	death_from_above,if=!talent.dark_shadow.enabled|spell_targets>=4&buff.shadow_dance.up|spell_targets<4&!buff.shadow_dance.up&(buff.symbols_of_death.up|cooldown.symbols_of_death.remains>=10+set_bonus.tier20_4pc*5)
                         *      if (WoW.CanCast("DeathFromAbove")&& WoW.IsSpellInRange("NightBlade") && WoW.Talent(6) !=1 && WoW.PlayerHasBuff("ShadowDance") && (WoW.PlayerHasBuff("SymbolsOfDeath") || WoW.SpellCooldownTimeRemaining("SymbolsOfDeath") >= 1000))
                         *      {
                         * WoW.CastSpell("DeathFromAbove");
                         * return;
                         *      }
                         * //eviscerate
                         *      if (WoW.CanCast("Eviscerate")  && WoW.IsSpellInRange("NightBlade") && WoW.Energy >=35 && WoW.TargetHasDebuff("NightBlade"))
                         *      {
                         *              WoW.CastSpell("Eviscerate");
                         *              return;
                         *      }
                         */
//shadowstrike
                        if (WoW.CanCast("ShadowStrike") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 40 && WoW.CurrentComboPoints <= 5)
                        {
                            WoW.CastSpell("ShadowStrike");
                            return;
                        }
                    }
//	nightblade,if=target.time_to_die>6&remains<gcd.max&combo_points>=4-(time<10)*2
                    if (WoW.CanCast("NightBlade") && WoW.Energy >= 25 && WoW.TargetDebuffTimeRemaining("NightBlade") < GCD && WoW.CurrentComboPoints >= 4 && pullwatch.ElapsedMilliseconds < 10000)
                    {
                        WoW.CastSpell("NightBlade");
                        return;
                    }
//finish,if=combo_points>=5+(talent.deeper_stratagem.enabled&!buff.shadow_blades.up&(mantle_duration=0|set_bonus.tier20_4pc))|(combo_points>=4&combo_points.deficit<=2&spell_targets.shuriken_storm>=3&spell_targets.shuriken_storm<=4)|(target.time_to_die<=1&combo_points>=3)
                    if ((WoW.CurrentComboPoints >= 5 && (MantleDuration == 0 || T204pc)))
                    {
//nightblade,if=(!talent.dark_shadow.enabled|!buff.shadow_dance.up)&target.time_to_die-remains>6&(mantle_duration=0|remains<=mantle_duration)&((refreshable&(!finality|buff.finality_nightblade.up))|remains<tick_time*2)
                        if (WoW.CanCast("NightBlade") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 25 && (WoW.Talent(6) != 1 || !WoW.PlayerHasBuff("ShadowDance")) && (!WoW.TargetHasDebuff("NightBlade") || WoW.TargetDebuffTimeRemaining("NightBlade") <= 600))
                        {
                            WoW.CastSpell("NightBlade");
                            return;
                        }
//	death_from_above,if=!talent.dark_shadow.enabled|spell_targets>=4&buff.shadow_dance.up|spell_targets<4&!buff.shadow_dance.up&(buff.symbols_of_death.up|cooldown.symbols_of_death.remains>=10+set_bonus.tier20_4pc*5)
                        if (WoW.CanCast("DeathFromAbove") && WoW.IsSpellInRange("NightBlade") && (WoW.PlayerHasBuff("SymbolsOfDeath") || WoW.SpellCooldownTimeRemaining("SymbolsOfDeath") >= 1000))
                        {
                            WoW.CastSpell("DeathFromAbove");
                            Thread.Sleep(1000);
                            WoW.CastSpell("ShadowDance");
                            return;
                        }
//eviscerate
                        if (WoW.CanCast("Eviscerate") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35 && WoW.TargetHasDebuff("NightBlade"))
                        {
                            WoW.CastSpell("Eviscerate");
                            return;
                        }
                    }
//backstab
                    if (WoW.CanCast("Backstab") && WoW.CurrentComboPoints < 6 && WoW.Energy >= 35 && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("Backstab");
                        return;
                    }
                }
            }


            if (combatRoutine.Type == RotationType.AOE)
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && !WoW.IsMounted)
                {
//shadow_dance,if=talent.dark_shadow.enabled&!stealthed.all&buff.death_from_above.up&buff.death_from_above.remains<=0.15
                    if (WoW.CanCast("ShadowDance") && (WoW.PlayerHasBuff("DeathFromAbove") || WoW.LastSpell == "DeathFromAbove") && !stealth && WoW.Talent(6) == 1)
                    {
                        Thread.Sleep(1000);
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
//shadow_dance,if=charges_fractional>=variable.shd_fractional|target.time_to_die<cooldown.symbols_of_death.remains
                    if (WoW.CanCast("ShadowDance") && WoW.PlayerSpellCharges("ShadowDance") <= 2 && !stealth && WoW.LastSpell != "ShadowDance")
                    {
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
//	death_from_above,if=!talent.dark_shadow.enabled|spell_targets>=4&buff.shadow_dance.up|spell_targets<4&!buff.shadow_dance.up&(buff.symbols_of_death.up|cooldown.symbols_of_death.remains>=10+set_bonus.tier20_4pc*5)
                    if (WoW.CanCast("DeathFromAbove") && WoW.IsSpellInRange("NightBlade") && WoW.Talent(6) != 1 && (WoW.PlayerHasBuff("SymbolsOfDeath") || WoW.SpellCooldownTimeRemaining("SymbolsOfDeath") >= 1000))
                    {
                        WoW.CastSpell("DeathFromAbove");
                        return;
                    }
//	call_action_list,name=cds
                    if (combatRoutine.UseCooldowns)
                    {
                        if (WoW.CanCast("Berserking") && !WoW.IsSpellOnCooldown("Berserking") && WoW.PlayerRace == "Troll" && stealth)
                        {
                            WoW.CastSpell("Berserking");
                            return;
                        }
                        if (WoW.CanCast("Arcane Torrent") && !WoW.IsSpellOnCooldown("Arcane Torrent") && WoW.PlayerRace == "BloodElf" && WoW.Energy <= 20)
                        {
                            WoW.CastSpell("Arcane Torrent");
                            return;
                        }
                        if (WoW.CanCast("Blood Fury") && stealth && !WoW.IsSpellOnCooldown("Blood Fury") && WoW.PlayerRace == "Orc")
                        {
                            WoW.CastSpell("Blood Fury");
                            return;
                        }
//symbols_of_death,if=(talent.death_from_above.enabled&cooldown.death_from_above.remains<=3&(dot.nightblade.remains>=cooldown.death_from_above.remains+3|target.time_to_die-dot.nightblade.remains<=6)&(time>=3|set_bonus.tier20_4pc))
                        if (WoW.CanCast("SymbolsOfDeath") && WoW.Talent(7) == 3 && stealth && WoW.SpellCooldownTimeRemaining("DeathFromAbove") <= 300 && (WoW.TargetDebuffTimeRemaining("NightBlade") >= (WoW.SpellCooldownTimeRemaining("DeathFromAbove") + 300)) && ((pullwatch.ElapsedMilliseconds >= 3000) || T204pc) && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35)
                        {
                            WoW.CastSpell("SymbolsOfDeath");
                            return;
                        }
//shadow_blades,if=(time>10&combo_points.deficit>=2+stealthed.all-equipped.mantle_of_the_master_assassin)|(time<10&(!talent.marked_for_death.enabled|combo_points.deficit>=3|dot.nightblade.ticking))
                        if (WoW.CanCast("ShadowBlades") && ((pullwatch.ElapsedMilliseconds > 10000 && WoW.CurrentComboPoints <= 4 && stealth) || (pullwatch.ElapsedMilliseconds < 10000 && (WoW.Talent(7) != 2 || WoW.CurrentComboPoints <= 3 || WoW.TargetHasDebuff("Nightblade")))) && WoW.IsSpellInRange("NightBlade"))
                        {
                            WoW.CastSpell("ShadowBlades");
                            return;
                        }
//goremaws_bite,if=!stealthed.all&cooldown.shadow_dance.charges_fractional<=variable.shd_fractional&((combo_points.deficit>=4-(time<10)*2&energy.deficit>50+talent.vigor.enabled*25-(time>=10)*15)|(combo_points.deficit>=1&target.time_to_die<8))
                        if (WoW.CanCast("GoremawsBite") && WoW.IsSpellInRange("NightBlade") && WoW.PlayerSpellCharges("ShadowDance") < 2 && !stealth && WoW.CurrentComboPoints <= 2 && WoW.Energy <= 50)
                        {
                            WoW.CastSpell("GoremawsBite");
                            return;
                        }
//vanish,if=energy>=55-talent.shadow_focus.enabled*10&variable.dsh_dfa&(!equipped.mantle_of_the_master_assassin|buff.symbols_of_death.up)&cooldown.shadow_dance.charges_fractional<=variable.shd_fractional				&!buff.shadow_dance.up&!buff.stealth.up&mantle_duration=0&(dot.nightblade.remains>=cooldown.death_from_above.remains+6|target.time_to_die-dot.nightblade.remains<=6)&cooldown.death_from_above.remains<=1&(time<10|combo_points>=3)|target.time_to_die<=7
                        if (WoW.CanCast("Vanish") && WoW.IsSpellInRange("NightBlade") && (WoW.Energy >= 50 || (WoW.Talent(2) == 3 && WoW.Energy >= 45)) && dshdfa && (!MantleoftheMaster || WoW.PlayerHasBuff("SymbolsOfDeath")) && WoW.PlayerSpellCharges("ShadowDance") < 2 && !stealth && (WoW.TargetDebuffTimeRemaining("NightBlade") >= (WoW.SpellCooldownTimeRemaining("DeathFromAbove") + 600)) && WoW.SpellCooldownTimeRemaining("DeathFromAbove") <= 100 && ((pullwatch.ElapsedMilliseconds < 10000) || WoW.CurrentComboPoints >= 3))
                        {
                            WoW.CastSpell("Vanish");
                            return;
                        }
                    }
                    if (stealth)
                    {
//combo_points>=5&(spell_targets.shuriken_storm>=3+equipped.shadow_satyrs_walk|(mantle_duration<=1.3&mantle_duration-gcd.remains>=0.3))

                        /*	if (WoW.CurrentComboPoints >=5 )
                         *      {
                         * //nightblade,if=(!talent.dark_shadow.enabled|!buff.shadow_dance.up)&target.time_to_die-remains>6&(mantle_duration=0|remains<=mantle_duration)&((refreshable&(!finality|buff.finality_nightblade.up))|remains<tick_time*2)
                         *      if (WoW.CanCast("NightBlade") && WoW.IsSpellInRange("NightBlade")&& WoW.Energy >= 25 && (WoW.Talent(6) !=1 || !WoW.PlayerHasBuff("ShadowDance")) && (!WoW.TargetHasDebuff("NightBlade") || WoW.TargetDebuffTimeRemaining("NightBlade") <= 600) )
                         *      {
                         * WoW.CastSpell("NightBlade");
                         * return;
                         *      }
                         * //	death_from_above,if=!talent.dark_shadow.enabled|spell_targets>=4&buff.shadow_dance.up|spell_targets<4&!buff.shadow_dance.up&(buff.symbols_of_death.up|cooldown.symbols_of_death.remains>=10+set_bonus.tier20_4pc*5)
                         *      if (WoW.CanCast("DeathFromAbove")&& WoW.IsSpellInRange("NightBlade") && WoW.Talent(6) !=1 && WoW.PlayerHasBuff("ShadowDance") && (WoW.PlayerHasBuff("SymbolsOfDeath") || WoW.SpellCooldownTimeRemaining("SymbolsOfDeath") >= 1000))
                         *      {
                         * WoW.CastSpell("DeathFromAbove");
                         * return;
                         *      }
                         * //eviscerate
                         *      if (WoW.CanCast("Eviscerate")  && WoW.IsSpellInRange("NightBlade") && WoW.Energy >=35 && WoW.TargetHasDebuff("NightBlade"))
                         *      {
                         *              WoW.CastSpell("Eviscerate");
                         *              return;
                         *      }
                         */
//shadowstrike
                        if (WoW.CanCast("ShurikenStorm") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 40 && WoW.CurrentComboPoints <= 5)
                        {
                            WoW.CastSpell("ShurikenStorm");
                            return;
                        }
                    }
//	nightblade,if=target.time_to_die>6&remains<gcd.max&combo_points>=4-(time<10)*2
                    if (WoW.CanCast("NightBlade") && WoW.Energy >= 25 && WoW.TargetDebuffTimeRemaining("NightBlade") < GCD && WoW.CurrentComboPoints >= 4 && pullwatch.ElapsedMilliseconds < 10000)
                    {
                        WoW.CastSpell("NightBlade");
                        return;
                    }
//finish,if=combo_points>=5+(talent.deeper_stratagem.enabled&!buff.shadow_blades.up&(mantle_duration=0|set_bonus.tier20_4pc))|(combo_points>=4&combo_points.deficit<=2&spell_targets.shuriken_storm>=3&spell_targets.shuriken_storm<=4)|(target.time_to_die<=1&combo_points>=3)
                    if ((WoW.CurrentComboPoints >= 5 && (MantleDuration == 0 || T204pc)))
                    {
//nightblade,if=(!talent.dark_shadow.enabled|!buff.shadow_dance.up)&target.time_to_die-remains>6&(mantle_duration=0|remains<=mantle_duration)&((refreshable&(!finality|buff.finality_nightblade.up))|remains<tick_time*2)
                        if (WoW.CanCast("NightBlade") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 25 && (WoW.Talent(6) != 1 || !WoW.PlayerHasBuff("ShadowDance")) && (!WoW.TargetHasDebuff("NightBlade") || WoW.TargetDebuffTimeRemaining("NightBlade") <= 600))
                        {
                            WoW.CastSpell("NightBlade");
                            return;
                        }
//	death_from_above,if=!talent.dark_shadow.enabled|spell_targets>=4&buff.shadow_dance.up|spell_targets<4&!buff.shadow_dance.up&(buff.symbols_of_death.up|cooldown.symbols_of_death.remains>=10+set_bonus.tier20_4pc*5)
                        if (WoW.CanCast("DeathFromAbove") && WoW.IsSpellInRange("NightBlade") && (WoW.PlayerHasBuff("SymbolsOfDeath") || WoW.SpellCooldownTimeRemaining("SymbolsOfDeath") >= 1000))
                        {
                            WoW.CastSpell("DeathFromAbove");
                            Thread.Sleep(1000);
                            WoW.CastSpell("ShadowDance");
                            return;
                        }
//eviscerate
                        if (WoW.CanCast("Eviscerate") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35 && WoW.TargetHasDebuff("NightBlade"))
                        {
                            WoW.CastSpell("Eviscerate");
                            return;
                        }
                    }
//backstab
                    if (WoW.CanCast("ShurikenStorm") && WoW.CurrentComboPoints < 6 && WoW.Energy >= 35 && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("ShurikenStorm");
                        return;
                    }
                }
            }
        }
Beispiel #13
0
        public override void Pulse()
        {
            if (interruptwatch.ElapsedMilliseconds == 0)
            {
                interruptwatch.Start();
                return;
            }


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

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

            if (WoW.IsInCombat && WoW.HealthPercent < 35 && WoW.CanCast("Last Stand") && !WoW.IsSpellOnCooldown("Last Stand"))
            {
                WoW.CastSpell("Last Stand");
                return;
            }
            if (WoW.IsInCombat && WoW.HealthPercent < 20 && WoW.CanCast("Shield Wall") && !WoW.IsSpellOnCooldown("Shield Wall"))
            {
                WoW.CastSpell("Shield Wall");
                return;
            }

            if (autointerrupt && WoW.IsInCombat && !WoW.IsSpellOnCooldown("Pummel") && WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsSpellInRange("Shield Slam") && WoW.TargetIsCasting &&
                WoW.TargetIsCastingAndSpellIsInterruptible && WoW.TargetPercentCast >= 80)
            {
                WoW.CastSpell("Pummel");
                return;
            }


            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_LCONTROL) < 0)
            {
                if (WoW.IsInCombat && !WoW.IsSpellOnCooldown("HeroicLeap"))
                {
                    WoW.CastSpell("HeroicLeap");
                    return;
                }
                return;
            }
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_1) < 0)
            {
                if (WoW.IsInCombat && !WoW.IsSpellOnCooldown("Thunder Clap"))
                {
                    WoW.CastSpell("Thunder Clap");
                    return;
                }
                return;
            }
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_LMENU) < 0)
            {
                if (WoW.IsInCombat && !WoW.IsSpellOnCooldown("Shockwave"))
                {
                    WoW.CastSpell("Shockwave");
                    return;
                }
                return;
            }

            if (combatRoutine.Type == RotationType.SingleTarget || combatRoutine.Type == RotationType.AOE) // Do Single Target Stuff here
            {
                if (CombatWatch.IsRunning && !WoW.IsInCombat)
                {
                    CombatWatch.Reset();
                }
                if (!CombatWatch.IsRunning && WoW.IsInCombat)
                {
                    CombatWatch.Start();
                }

                if (WoW.HasTarget && WoW.TargetIsEnemy && !WoW.PlayerIsChanneling)
                {
                    if (!WoW.TargetHasDebuff("ShockWavestun") && WoW.IsInCombat)

                    {
                        if (WoW.CanCast("Shield Block") && WoW.Rage >= 15 && !WoW.PlayerIsChanneling &&
                            (WoW.PlayerSpellCharges("Shield Block") == 2 ||
                             (WoW.PlayerSpellCharges("Shield Block") >= 1 && WoW.HealthPercent < 100 && WoW.PlayerBuffTimeRemaining("ShieldBlockAura") <= 2) ||
                             WoW.PlayerSpellCharges("Shield Block") == 1 && WoW.HealthPercent < 100))
                        {
                            WoW.CastSpell("Shield Block");
                            return;
                        }

                        if (WoW.IsSpellInRange("Shield Slam") && WoW.CanCast("Thunder Clap") && !WoW.IsSpellOnCooldown("Thunder Clap") && CombatWatch.ElapsedMilliseconds > 1000 &&
                            CombatWatch.ElapsedMilliseconds < 5000)
                        {
                            WoW.CastSpell("Thunder Clap");
                            return;
                        }

                        /* ------------------ IGNORE PAIN MANAGEMENT----------------------*/

                        if (WoW.CanCast("Ignore Pain") && WoW.PlayerHasBuff("Vengeance: Ignore Pain") && WoW.Rage >= 39)
                        {
                            WoW.CastSpell("Ignore Pain");
                            return;
                        }

                        if (WoW.CanCast("Ignore Pain") && WoW.Rage > 30 && WoW.HealthPercent < 100 && (!WoW.PlayerHasBuff("Ignore Pain") || WoW.PlayerBuffTimeRemaining("Ignore Pain") <= 2) &&
                            !WoW.PlayerHasBuff("Vengeance: Ignore Pain") && !WoW.PlayerHasBuff("Vengeance: Focused Rage"))
                        {
                            WoW.CastSpell("Ignore Pain");
                            return;
                        }

                        /* ------------------ END IGNORE PAIN MANAGEMENT-------------------*/

                        if (WoW.TargetIsCasting && WoW.CanCast("SpellReflect") && !WoW.IsSpellOnCooldown("SpellReflect"))
                        {
                            WoW.CastSpell("SpellReflect");
                        }
                        if (WoW.IsSpellInRange("Shield Slam") && WoW.CanCast("Battle Cry") && !WoW.IsSpellOnCooldown("Battle Cry"))
                        {
                            WoW.CastSpell("Battle Cry");
                            return;
                        }
                        if (WoW.IsSpellInRange("Shield Slam") && WoW.CanCast("Shield Slam") && !WoW.IsSpellOnCooldown("Shield Slam") && WoW.PlayerHasBuff("Legendary"))
                        {
                            WoW.CastSpell("Shield Slam");
                            return;
                        }
                        if (WoW.IsSpellInRange("Shield Slam") && WoW.CanCast("Thunder Clap") && !WoW.IsSpellOnCooldown("Thunder Clap"))
                        {
                            WoW.CastSpell("Thunder Clap");
                            return;
                        }
                        if (WoW.CanCast("Revenge") && !WoW.IsSpellOnCooldown("Revenge") && WoW.IsSpellInRange("Shield Slam") && WoW.IsSpellOverlayed("Revenge") &&
                            !WoW.PlayerHasBuff("Vengeance: Ignore Pain"))
                        {
                            WoW.CastSpell("Revenge");
                            return;
                        }
                        if (WoW.CanCast("Revenge") && !WoW.IsSpellOnCooldown("Revenge") && WoW.IsSpellInRange("Shield Slam") && WoW.PlayerHasBuff("Vengeance: Focused Rage") && WoW.Rage > 59)
                        {
                            WoW.CastSpell("Revenge");
                            return;
                        }
                        if (WoW.CanCast("Revenge") && !WoW.IsSpellOnCooldown("Revenge") && WoW.IsSpellInRange("Shield Slam") && !WoW.PlayerHasBuff("Ignore Pain") && WoW.Rage > 35 &&
                            WoW.HealthPercent < 100)
                        {
                            WoW.CastSpell("Revenge");
                            return;
                        }
                        if (WoW.CanCast("Revenge") && !WoW.IsSpellOnCooldown("Revenge") && WoW.IsSpellInRange("Shield Slam") && WoW.PlayerHasBuff("Ignore Pain") &&
                            WoW.PlayerBuffTimeRemaining("Ignore Pain") <= 3 && WoW.Rage > 40 && WoW.HealthPercent < 100)
                        {
                            WoW.CastSpell("Revenge");
                            return;
                        }
                        if (WoW.CanCast("Revenge") && !WoW.IsSpellOnCooldown("Revenge") && WoW.IsSpellInRange("Shield Slam") && !WoW.PlayerHasBuff("Vengeance: Focused Rage") &&
                            !WoW.PlayerHasBuff("Vengeance: Ignore Pain") && WoW.Rage > 69)
                        {
                            WoW.CastSpell("Revenge");
                            return;
                        }
                        if (WoW.CanCast("Victory Rush") && !WoW.IsSpellOnCooldown("Victory Rush") && WoW.IsSpellInRange("Shield Slam") && WoW.HealthPercent < 90 &&
                            WoW.PlayerHasBuff("VictoryRush"))
                        {
                            WoW.CastSpell("Victory Rush");
                            return;
                        }
                        if (WoW.IsSpellInRange("Devastate") && WoW.CanCast("Devastate"))
                        {
                            WoW.CastSpell("Devastate");
                            return;
                        }
                    }
                    if (WoW.CanCast("Neltharion's Fury") && WoW.TargetHasDebuff("ShockWavestun"))
                    {
                        WoW.CastSpell("Neltharion's Fury");
                        return;
                    }

                    /* actions.prot=spell_reflection,if=incoming_damage_2500ms>health.max*0.20
                     *                                  actions.prot+=/demoralizing_shout,if=incoming_damage_2500ms>health.max*0.20&!talent.booming_voice.enabled
                     *                                  actions.prot+=/last_stand,if=incoming_damage_2500ms>health.max*0.40
                     *                                  actions.prot+=/shield_wall,if=incoming_damage_2500ms>health.max*0.40&!cooldown.last_stand.remains=0
                     *                                  actions.prot+=/potion,name=unbending_potion,if=(incoming_damage_2500ms>health.max*0.15&!buff.potion.up)|target.time_to_die<=25
                     *                                  actions.prot+=/battle_cry,if=cooldown.shield_slam.remains=0
                     *                                  actions.prot+=/demoralizing_shout,if=talent.booming_voice.enabled&buff.battle_cry.up
                     *                                  actions.prot+=/ravager,if=talent.ravager.enabled&buff.battle_cry.up
                     *                                  actions.prot+=/neltharions_fury,if=!buff.shield_block.up&cooldown.shield_block.remains>3&((cooldown.shield_slam.remains>3&talent.heavy_repercussions.enabled)|(!talent.heavy_repercussions.enabled))
                     *                                  actions.prot+=/shield_block,if=!buff.neltharions_fury.up&((cooldown.shield_slam.remains=0&talent.heavy_repercussions.enabled)|action.shield_block.charges=2|!talent.heavy_repercussions.enabled)
                     *                                  actions.prot+=/ignore_pain,if=(rage>=60&!talent.vengeance.enabled)|(buff.vengeance_ignore_pain.up&rage>=39)|(talent.vengeance.enabled&!buff.vengeance_ignore_pain.up&!buff.vengeance_revenge.up&rage<30&!buff.revenge.react)
                     *                                  actions.prot+=/shield_slam,if=(!(cooldown.shield_block.remains<=gcd.max*2&!buff.shield_block.up)&talent.heavy_repercussions.enabled)|!talent.heavy_repercussions.enabled
                     *                                  actions.prot+=/thunder_clap
                     *                                  actions.prot+=/revenge,if=(talent.vengeance.enabled&buff.revenge.react&!buff.vengeance_ignore_pain.up)|(buff.vengeance_revenge.up&rage>=59)|(talent.vengeance.enabled&!buff.vengeance_ignore_pain.up&!buff.vengeance_revenge.up&rage>=69)|(!talent.vengeance.enabled&buff.revenge.react)
                     *                                  actions.prot+=/devastate */
                }
            }
            if (combatRoutine.Type == RotationType.AOE)
            {
                // Do AOE Stuff here
            }
        }
Beispiel #14
0
        internal static void DoRotation()
        {
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Shift) < 0)
            {
                return;
            }
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Z) < 0)
            {
                Rotation.ChangeRotation();
            }
            if (ObjectManager.LocalPlayer.IsMounted)
            {
                return;
            }



            switch (ObjectManager.LocalPlayer.Class)
            {
            case WowUnit.WowUnitClass.Paladin:
                //Paladin.DoPaladin();
                break;

            case WowUnit.WowUnitClass.Warrior:
                Warrior.DoWarrior();
                break;

            case WowUnit.WowUnitClass.Hunter:
                Hunter.DoHunter();
                break;

            case WowUnit.WowUnitClass.Druid:
                Druid.DoDruid();
                break;

            case WowUnit.WowUnitClass.Shaman:
                Shaman.DoShaman();
                break;

            case WowUnit.WowUnitClass.Rogue:
                Rogue.DoRogue();
                break;

            case WowUnit.WowUnitClass.Priest:
                Priest.DoPriest();
                break;

            case WowUnit.WowUnitClass.DeathKnight:
                DeathKnight.DoDeathKnight();
                break;

            case WowUnit.WowUnitClass.Mage:
                Mage.DoMage();
                break;

            case WowUnit.WowUnitClass.Warlock:
                Warlock.DoWarlock();
                break;

            case WowUnit.WowUnitClass.Monk:
                Monk.DoMonk();
                break;
            }
        }
        public override void Pulse()
        {
            if (DetectKeyPress.GetKeyState(0x6A) < 0)
            {
                UseCooldowns = !UseCooldowns;
                Thread.Sleep(150);
            }
            if (!WoW.IsInCombat && !WoW.PlayerHasBuff("Stealth") && !WoW.IsMounted && WoW.CanCast("Stealth"))
            {
                WoW.CastSpell("Stealth");
                return;
            }
            if (WoW.CanCast("Symbols of Death") && WoW.PlayerHasBuff("Stealth") && !WoW.IsInCombat && !WoW.IsMounted)
            {
                WoW.CastSpell("Symbols of Death");
                return;
            }
            if (WoW.CanCast("CrimsonVial") && WoW.HealthPercent <= 40 && WoW.Energy >= 35)
            {
                WoW.CastSpell("CrimsonVial");
                return;
            }
            if (WoW.TargetIsCasting)             // Kick
            {
                if (WoW.CanCast("Kick") && WoW.IsSpellInRange("Kick") && WoW.TargetIsCastingAndSpellIsInterruptible && WoW.TargetPercentCast >= 55 && !WoW.IsSpellOnCooldown("Kick") && !WoW.PlayerIsChanneling && !WoW.WasLastCasted("Kick"))
                {
                    WoW.CastSpell("Kick");
                    return;
                }
            }
            if (combatRoutine.Type == RotationType.SingleTarget || combatRoutine.Type == RotationType.SingleTargetCleave) // Do Single Target Stuff here
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat && !WoW.IsMounted)
                {
                    if (combatRoutine.UseCooldowns)
                    {
                        if (WoW.CanCast("ShadowBlades") && WoW.PlayerHasBuff("Symbols of Death") && WoW.IsSpellInRange("NightBlade"))
                        {
                            WoW.CastSpell("ShadowBlades");
                            return;
                        }
                        if (WoW.CanCast("Berserking") && !WoW.IsSpellOnCooldown("Berserking") && WoW.PlayerRace == "Troll")
                        {
                            WoW.CastSpell("Berserking");
                            return;
                        }
                        if (WoW.CanCast("Arcane Torrent") && !WoW.IsSpellOnCooldown("Arcane Torrent") && WoW.PlayerRace == "BloodElf" && WoW.Energy <= 20)
                        {
                            WoW.CastSpell("Arcane Torrent");
                            return;
                        }
                        if (WoW.CanCast("Blood Fury") && !WoW.IsSpellOnCooldown("Blood Fury") && WoW.PlayerRace == "Orc")
                        {
                            WoW.CastSpell("Blood Fury");
                            return;
                        }
                        if (WoW.CanCast("Vanish") && WoW.IsSpellInRange("NightBlade") && WoW.TargetHasDebuff("NightBlade") && (!WoW.PlayerHasBuff("Stealth") || !WoW.PlayerHasBuff("ShadowDance")))
                        {
                            WoW.CastSpell("Vanish");
                            return;
                        }
                    }
                    if (WoW.PlayerHasBuff("Stealth") || WoW.PlayerHasBuff("Subterfuge") || WoW.PlayerHasBuff("ShadowDance"))
                    {
                        if (WoW.CanCast("Symbols of Death") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35 && WoW.PlayerBuffTimeRemaining("Symbols of Death") <= 500)
                        {
                            WoW.CastSpell("Symbols of Death");
                            return;
                        }
                        if (WoW.CanCast("ShadowStrike") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 40 && WoW.CurrentComboPoints <= 5)
                        {
                            WoW.CastSpell("ShadowStrike");
                            return;
                        }
                        if (WoW.CanCast("NightBlade") && WoW.CurrentComboPoints >= 5 && WoW.Energy >= 25 &&
                            (!WoW.TargetHasDebuff("NightBlade") || WoW.TargetDebuffTimeRemaining("NightBlade") <= 600) && WoW.IsSpellInRange("NightBlade"))
                        {
                            WoW.CastSpell("NightBlade");
                            return;
                        }
                        if (WoW.CanCast("GoremawsBite") && WoW.IsSpellInRange("NightBlade") && WoW.CurrentComboPoints <= 3)
                        {
                            WoW.CastSpell("GoremawsBite");
                            return;
                        }
                        if (WoW.CanCast("Eviscerate") && WoW.CurrentComboPoints >= 5 && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35 && WoW.TargetHasDebuff("NightBlade"))
                        {
                            WoW.CastSpell("Eviscerate");
                            return;
                        }
                    }
                    if (WoW.CanCast("ShadowDance") && (!WoW.PlayerHasBuff("Stealth") || !WoW.PlayerHasBuff("ShadowDance") || !WoW.PlayerHasBuff("Vanish") || !WoW.PlayerHasBuff("Subterfuge")) && WoW.Energy >= 55 &&
                        (WoW.PlayerSpellCharges("ShadowDance") >= 2 && WoW.CurrentComboPoints <= 3 && WoW.IsSpellInRange("NightBlade")))
                    {
                        WoW.CastSpell("ShadowDance");
                        return;
                    }
                    if (WoW.CanCast("NightBlade") && WoW.CurrentComboPoints >= 5 && WoW.Energy >= 25 &&
                        (!WoW.TargetHasDebuff("NightBlade") || WoW.TargetDebuffTimeRemaining("NightBlade") <= 600) && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("NightBlade");
                        return;
                    }
                    if (WoW.CanCast("GoremawsBite") && WoW.IsSpellInRange("NightBlade") && WoW.CurrentComboPoints <= 3)
                    {
                        WoW.CastSpell("GoremawsBite");
                        return;
                    }
                    if (WoW.CanCast("Eviscerate") && WoW.CurrentComboPoints >= 5 && WoW.Energy >= 35 && WoW.TargetHasDebuff("NightBlade") && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("Eviscerate");
                        return;
                    }
                    if (WoW.CanCast("Backstab") && WoW.CurrentComboPoints < 6 && WoW.Energy >= 45 && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("Backstab");
                        return;
                    }
                }
            }

            if (combatRoutine.Type == RotationType.AOE) // Do AoE Stuff here
            {
                if (WoW.PlayerHasBuff("Stealth") || WoW.PlayerHasBuff("Subterfuge") || WoW.PlayerHasBuff("ShadowDance"))
                {
                    if (WoW.CanCast("Symbols of Death") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35 && WoW.PlayerBuffTimeRemaining("Symbols of Death") <= 500)
                    {
                        WoW.CastSpell("Symbols of Death");
                        return;
                    }
                    if (WoW.CanCast("ShurikenStorm") && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 40 && WoW.CurrentComboPoints <= 5)
                    {
                        WoW.CastSpell("ShurikenStorm");
                        return;
                    }
                    if (WoW.CanCast("NightBlade") && WoW.CurrentComboPoints >= 5 && WoW.Energy >= 25 &&
                        (!WoW.TargetHasDebuff("NightBlade") || WoW.TargetDebuffTimeRemaining("NightBlade") <= 600) && WoW.IsSpellInRange("NightBlade"))
                    {
                        WoW.CastSpell("NightBlade");
                        return;
                    }
                    if (WoW.CanCast("GoremawsBite") && WoW.IsSpellInRange("NightBlade") && WoW.CurrentComboPoints <= 3)
                    {
                        WoW.CastSpell("GoremawsBite");
                        return;
                    }
                    if (WoW.CanCast("Eviscerate") && WoW.CurrentComboPoints >= 5 && WoW.IsSpellInRange("NightBlade") && WoW.Energy >= 35 && WoW.TargetHasDebuff("NightBlade"))
                    {
                        WoW.CastSpell("Eviscerate");
                        return;
                    }
                }
                if (WoW.CanCast("ShadowDance") && (!WoW.PlayerHasBuff("Stealth") || !WoW.PlayerHasBuff("ShadowDance") || !WoW.PlayerHasBuff("Vanish") || !WoW.PlayerHasBuff("Subterfuge")) && WoW.Energy >= 55 &&
                    (WoW.PlayerSpellCharges("ShadowDance") >= 2 && WoW.CurrentComboPoints <= 3 && WoW.IsSpellInRange("NightBlade")))
                {
                    WoW.CastSpell("ShadowDance");
                    return;
                }
                if (WoW.CanCast("NightBlade") && WoW.CurrentComboPoints >= 5 && WoW.Energy >= 25 &&
                    (!WoW.TargetHasDebuff("NightBlade") || WoW.TargetDebuffTimeRemaining("NightBlade") <= 600) && WoW.IsSpellInRange("NightBlade"))
                {
                    WoW.CastSpell("NightBlade");
                    return;
                }
                if (WoW.CanCast("GoremawsBite") && WoW.IsSpellInRange("NightBlade"))
                {
                    WoW.CastSpell("GoremawsBite");
                    return;
                }
                if (WoW.CanCast("Eviscerate") && WoW.CurrentComboPoints >= 5 && WoW.Energy >= 35 && WoW.TargetHasDebuff("NightBlade") && WoW.IsSpellInRange("NightBlade"))
                {
                    WoW.CastSpell("Eviscerate");
                    return;
                }
                if (WoW.CanCast("ShurikenStorm") && WoW.CurrentComboPoints < 6 && WoW.Energy >= 35 && WoW.IsSpellInRange("NightBlade"))
                {
                    WoW.CastSpell("ShurikenStorm");
                    return;
                }
            }
        }
        public override void Pulse()
        {
            if (WoW.PlayerHasBuff("Mount"))
            {
                return;
            }

            if (WoW.IsInCombat && WoW.HealthPercent < 35 && WoW.CanCast("Last Stand") && !WoW.IsSpellOnCooldown("Last Stand"))
            {
                WoW.CastSpell("Last Stand");
                return;
            }
            if (WoW.IsInCombat && WoW.HealthPercent < 20 && WoW.CanCast("Shield Wall") && !WoW.IsSpellOnCooldown("Shield Wall"))
            {
                WoW.CastSpell("Shield Wall");
                return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_LCONTROL) < 0)
            {
                if (WoW.IsInCombat && !WoW.IsSpellOnCooldown("HeroicLeap"))
                {
                    WoW.CastSpell("HeroicLeap");
                    return;
                }
                return;
            }
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_1) < 0)
            {
                if (WoW.IsInCombat && !WoW.IsSpellOnCooldown("Thunder Clap"))
                {
                    WoW.CastSpell("Thunder Clap");
                    return;
                }
                return;
            }
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_LMENU) < 0)
            {
                if (WoW.IsInCombat && !WoW.IsSpellOnCooldown("Shockwave"))
                {
                    WoW.CastSpell("Shockwave");
                    return;
                }
                return;
            }

            if (combatRoutine.Type == RotationType.SingleTarget) // Do Single Target Stuff here
            {
                if (CombatWatch.IsRunning && !WoW.IsInCombat)
                {
                    CombatWatch.Reset();
                }
                if (!CombatWatch.IsRunning && WoW.IsInCombat)
                {
                    CombatWatch.Start();
                }

                if (WoW.HasTarget && WoW.TargetIsEnemy && !WoW.PlayerIsChanneling)
                {
                    if (!WoW.TargetHasDebuff("ShockWavestun") && WoW.IsInCombat)

                    {
                        if (WoW.CanCast("Shield Block") && WoW.Rage >= 10 && !WoW.PlayerIsChanneling && WoW.HealthPercent < 100 &&
                            (WoW.PlayerSpellCharges("Shield Block") == 2 ||
                             (WoW.PlayerSpellCharges("Shield Block") >= 1 && WoW.HealthPercent <= 90 && WoW.PlayerBuffTimeRemaining("ShieldBlockAura") <= 2)))
                        {
                            WoW.CastSpell("Shield Block");
                            return;
                        }

                        if (WoW.IsSpellInRange("Shield Slam") && WoW.CanCast("Thunder Clap") && !WoW.IsSpellOnCooldown("Thunder Clap") && CombatWatch.ElapsedMilliseconds > 1000 &&
                            CombatWatch.ElapsedMilliseconds < 5000)
                        {
                            WoW.CastSpell("Thunder Clap");
                            return;
                        }

                        /* ------------------ IGNORE PAIN MANAGEMENT----------------------*/

                        if (WoW.CanCast("Ignore Pain") && WoW.PlayerHasBuff("Vengeance: Ignore Pain") && WoW.PlayerHasBuff("Ultimatum") && WoW.Rage >= 18)
                        {
                            WoW.CastSpell("Ignore Pain");
                            return;
                        }

                        if (WoW.CanCast("Ignore Pain") && WoW.Rage > 35 && WoW.PlayerHasBuff("Vengeance: Ignore Pain"))
                        {
                            WoW.CastSpell("Ignore Pain");
                            return;
                        }

                        if (WoW.CanCast("Ignore Pain") && WoW.Rage < 30 && WoW.Rage >= 20 && WoW.HealthPercent < 100 &&
                            (!WoW.PlayerHasBuff("Ignore Pain") || WoW.PlayerBuffTimeRemaining("Ignore Pain") <= 2) && !WoW.PlayerHasBuff("Ultimatum") &&
                            !WoW.PlayerHasBuff("Vengeance: Ignore Pain") && !WoW.PlayerHasBuff("Vengeance: Focused Rage"))
                        {
                            WoW.CastSpell("Ignore Pain");
                            return;
                        }

                        /* ------------------ END IGNORE PAIN MANAGEMENT-------------------*/


                        /* ------------------ FOCUSED RAGE MANAGEMENT----------------------*/

                        if (WoW.CanCast("Focused Rage") && (!WoW.PlayerHasBuff("Ignore Pain") || WoW.PlayerBuffTimeRemaining("Ignore Pain") <= 2) &&
                            WoW.PlayerHasBuff("Vengeance: Focused Rage") && WoW.Rage >= 20)
                        {
                            WoW.CastSpell("Focused Rage");
                        }
                        if (WoW.CanCast("Focused Rage") && WoW.PlayerHasBuff("Ultimatum") && (!WoW.PlayerHasBuff("Ignore Pain") || WoW.PlayerBuffTimeRemaining("Ignore Pain") <= 2) &&
                            WoW.PlayerHasBuff("Vengeance: Focused Rage"))
                        {
                            WoW.CastSpell("Focused Rage");
                        }
                        if (WoW.CanCast("Focused Rage") && WoW.PlayerHasBuff("Ultimatum") && !WoW.PlayerHasBuff("Vengeance: Ignore Pain") && !WoW.PlayerHasBuff("Vengeance: Focused Rage"))
                        {
                            WoW.CastSpell("Focused Rage");
                        }
                        if (WoW.CanCast("Focused Rage") && WoW.Rage >= 30 && !WoW.PlayerHasBuff("Vengeance: Focused Rage") && !WoW.PlayerHasBuff("Vengeance: Ignore Pain"))
                        {
                            WoW.CastSpell("Focused Rage");
                        }
                        if (WoW.CanCast("Focused Rage") && WoW.Rage < 10 && WoW.PlayerHasBuff("Ultimatum") && WoW.PlayerHasBuff("Vengeance: Ignore Pain") &&
                            !WoW.IsSpellOnCooldown("Shield Slam"))
                        {
                            WoW.CastSpell("Focused Rage");
                        }
                        if (WoW.CanCast("Focused Rage") && WoW.Rage >= 120)
                        {
                            WoW.CastSpell("Focused Rage");
                        }

                        /* ------------------ END FOCUSED RAGE MANAGEMENT-------------------*/

                        if (WoW.TargetIsCasting && WoW.CanCast("SpellReflect") && !WoW.IsSpellOnCooldown("SpellReflect"))
                        {
                            WoW.CastSpell("SpellReflect");
                        }
                        if (WoW.IsSpellInRange("Shield Slam") && WoW.CanCast("Shield Slam") && !WoW.IsSpellOnCooldown("Shield Slam"))
                        {
                            WoW.CastSpell("Shield Slam");
                            return;
                        }
                        if (WoW.CanCast("Revenge") && !WoW.IsSpellOnCooldown("Revenge") && WoW.IsSpellInRange("Shield Slam"))
                        {
                            WoW.CastSpell("Revenge");
                            return;
                        }
                        if (WoW.CanCast("Victory Rush") && !WoW.IsSpellOnCooldown("Victory Rush") && WoW.IsSpellInRange("Shield Slam") && WoW.HealthPercent < 90 &&
                            WoW.PlayerHasBuff("VictoryRush"))
                        {
                            WoW.CastSpell("Victory Rush");
                            return;
                        }
                        if (WoW.IsSpellInRange("Devastate") && WoW.CanCast("Devastate"))
                        {
                            WoW.CastSpell("Devastate");
                            return;
                        }

                        /* if (WoW.IsSpellInRange("Shield Slam")&& WoW.CanCast("Thunder Clap")&& !WoW.IsSpellOnCooldown("Thunder Clap"))
                         *                              {
                         *                                      WoW.CastSpell("Thunder Clap");
                         *                                      return;
                         *                              }  */
                    }
                    if (WoW.CanCast("Neltharion's Fury") && WoW.TargetHasDebuff("ShockWavestun"))
                    {
                        WoW.CastSpell("Neltharion's Fury");
                        return;
                    }
                }
            }
            if (combatRoutine.Type == RotationType.AOE)
            {
                // Do AOE Stuff here

                if (WoW.IsSpellOverlayed("Shield Slam"))
                {
                    Log.Write("Spell Overlayed: Shield Slam");
                }
            }
        }
        public override void Pulse() // Updated for Legion (tested and working for single target)
        {
            if (WoW.IsInCombat && Control.IsKeyLocked(Keys.Scroll) && !WoW.TargetIsPlayer && !WoW.IsMounted)
            {
                SelectRotation(4, 9999, 1);
            }

            //Dark Pact
            if (WoW.CanCast("Dark Pact") &&
                WoW.Talent(5) == 3 &&
                WoW.PlayerHealthPercent <= 30 &&
                !WoW.IsMounted)
            {
                WoW.CastSpell("Dark Pact");
                return;
            }

            //Shadowfury
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_LMENU) < 0 &&
                WoW.Talent(3) == 3 &&
                !WoW.IsMoving &&
                WoW.CanCast("Shadowfury"))
            {
                WoW.CastSpell("Shadowfury");
                return;
            }

            if (UseCooldowns)
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && !WoW.PlayerIsChanneling && WoW.IsInCombat && !WoW.PlayerIsCasting && !WoW.IsMounted)
                {
                    //Doomguard
                    if (WoW.CanCast("Doomguard") &&
                        (WoW.Talent(6) == 0 || WoW.Talent(6) == 2 || WoW.Talent(6) == 3) &&
                        WoW.CurrentSoulShards >= 1 &&
                        WoW.IsSpellInRange("Doom"))
                    {
                        WoW.CastSpell("Doomguard");
                        return;
                    }

                    //Grimoire of Service
                    if (WoW.CanCast("Grimoire: Felguard") &&
                        WoW.Talent(6) == 2 &&
                        WoW.CurrentSoulShards >= 1 &&
                        WoW.IsSpellInRange("Doom"))
                    {
                        WoW.CastSpell("Grimoire: Felguard");
                        return;
                    }

                    //Soul Harvest
                    if (WoW.CanCast("Soul Harvest") &&
                        WoW.Talent(4) == 3 &&
                        !WoW.IsMoving &&
                        WoW.IsSpellInRange("Doom") &&
                        (WoW.PlayerHasBuff("Bloodlust") || WoW.PlayerHasBuff("Time Warp") || WoW.PlayerHasBuff("Netherwinds") ||
                         WoW.PlayerHasBuff("Drums of War") || WoW.PlayerHasBuff("Heroism")))
                    {
                        WoW.CastSpell("Soul Harvest");
                        return;
                    }
                }
            }

            if (combatRoutine.Type == RotationType.SingleTarget) // Do Single Target Stuff here
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && !WoW.PlayerIsChanneling && WoW.IsInCombat && !WoW.PlayerIsCasting && !WoW.IsMounted)
                {
                    if ((!WoW.TargetHasDebuff("Doom") || WoW.TargetDebuffTimeRemaining("Doom") <= 150) &&
                        WoW.CanCast("Doom") &&
                        WoW.IsSpellInRange("Doom"))
                    {
                        WoW.CastSpell("Doom");
                        return;
                    }

                    if (WoW.CanCast("Darkglare") &&
                        WoW.Talent(7) == 1 &&
                        WoW.CurrentSoulShards >= 1 &&
                        WoW.IsSpellInRange("Doom"))
                    {
                        WoW.CastSpell("Darkglare");
                        return;
                    }

                    if (WoW.CanCast("Call Dreadstalkers") &&
                        (WoW.CurrentSoulShards >= 2 || WoW.TargetHasDebuff("Demonic Calling")) &&
                        WoW.IsSpellInRange("Doom") &&
                        !WoW.IsMoving)
                    {
                        WoW.CastSpell("Call Dreadstalkers");
                        return;
                    }

                    if (WoW.CanCast("Hand of Guldan") &&
                        WoW.CurrentSoulShards >= 4 &&
                        WoW.IsSpellInRange("Doom") &&
                        !WoW.IsMoving)
                    {
                        WoW.CastSpell("Hand of Guldan");
                        return;
                    }

                    if (WoW.CanCast("Demonic Empowerment") &&
                        !WoW.IsMoving &&
                        !WoW.WasLastCasted("Demonic Empowerment") &&
                        (!WoW.PetHasBuff("Demonic Empowerment") || WoW.PetBuffTimeRemaining("Demonic Empowerment") <= 1.5 ||
                         WoW.WasLastCasted("Call Dreadstalkers") || WoW.WasLastCasted("Grimoire: Felguard") || WoW.WasLastCasted("Doomguard") ||
                         WoW.WasLastCasted("Hand of Guldan")))
                    {
                        WoW.CastSpell("Demonic Empowerment");
                        Thread.Sleep(1000);
                        return;
                    }

                    if (WoW.CanCast("Talkiels Consumption") &&
                        WoW.PetHasBuff("Demonic Empowerment") &&
                        WoW.PetBuffTimeRemaining("Demonic Empowerment") >= 2 &&
                        WoW.DreadstalkersCount >= 1 &&
                        WoW.IsSpellInRange("Doom") &&
                        !WoW.IsMoving)
                    {
                        WoW.CastSpell("Talkiels Consumption");
                        return;
                    }

                    if (WoW.CanCast("Felstorm") &&
                        WoW.PetHasBuff("Demonic Empowerment") &&
                        WoW.PetBuffTimeRemaining("Demonic Empowerment") >= 6 &&
                        WoW.IsSpellInRange("Doom"))
                    {
                        WoW.CastSpell("Felstorm");
                        return;
                    }

                    if (WoW.CanCast("Shadowflame") &&
                        WoW.Talent(1) == 2 &&
                        !WoW.TargetHasDebuff("Shadowflame") &&
                        WoW.CanCast("Shadowflame") &&
                        WoW.IsSpellInRange("Doom"))
                    {
                        WoW.CastSpell("Shadowflame");
                        return;
                    }

                    if (WoW.CanCast("Life Tap") &&
                        WoW.Mana < 60 &&
                        WoW.PlayerHealthPercent > 50)
                    {
                        WoW.CastSpell("Life Tap");
                        return;
                    }

                    if (WoW.CanCast("Demonwrath") &&
                        WoW.Mana > 60 &&
                        WoW.IsMoving)
                    {
                        WoW.CastSpell("Demonwrath");
                        return;
                    }

                    if ((WoW.CanCast("Shadow Bolt") || WoW.CanCast("Demonbolt")) &&
                        WoW.IsSpellInRange("Doom") &&
                        !WoW.IsMoving)
                    {
                        WoW.CastSpell("Shadow Bolt");
                        WoW.CastSpell("Demonbolt");
                        return;
                    }
                }
            }
            if (combatRoutine.Type == RotationType.AOE)
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && !WoW.PlayerIsChanneling && WoW.IsInCombat && !WoW.PlayerIsCasting && !WoW.IsMounted)
                {
                    if (WoW.CanCast("Hand of Guldan") &&
                        WoW.CurrentSoulShards >= 4 &&
                        WoW.IsSpellInRange("Doom") &&
                        !WoW.IsMoving)
                    {
                        WoW.CastSpell("Hand of Guldan");
                        return;
                    }

                    if (WoW.CanCast("Implosion") &&
                        WoW.Talent(2) == 3 &&
                        WoW.WildImpsCount >= 1 &&
                        WoW.IsSpellInRange("Doom"))
                    {
                        WoW.CastSpell("Implosion");
                        return;
                    }

                    if (WoW.CanCast("Darkglare") &&
                        WoW.Talent(7) == 1 &&
                        WoW.CurrentSoulShards >= 1 &&
                        WoW.IsSpellInRange("Doom"))
                    {
                        WoW.CastSpell("Darkglare");
                        return;
                    }

                    if (WoW.CanCast("Demonic Empowerment") &&
                        WoW.CanCast("Felstorm") &&
                        !WoW.IsMoving &&
                        !WoW.WasLastCasted("Demonic Empowerment") &&
                        (!WoW.PetHasBuff("Demonic Empowerment") || WoW.PetBuffTimeRemaining("Demonic Empowerment") <= 6))
                    {
                        WoW.CastSpell("Demonic Empowerment");
                        Thread.Sleep(2000);
                        return;
                    }

                    if (WoW.CanCast("Felstorm") &&
                        WoW.PetHasBuff("Demonic Empowerment") &&
                        WoW.PetBuffTimeRemaining("Demonic Empowerment") >= 6 &&
                        WoW.IsSpellInRange("Doom"))
                    {
                        WoW.CastSpell("Felstorm");
                        return;
                    }

                    if (WoW.CanCast("Life Tap") &&
                        WoW.Mana < 60 &&
                        WoW.PlayerHealthPercent > 50)
                    {
                        WoW.CastSpell("Life Tap");
                        return;
                    }

                    if (WoW.CanCast("Demonwrath") &&
                        WoW.Mana > 60)
                    {
                        WoW.CastSpell("Demonwrath");
                        return;
                    }
                }
            }

            if (combatRoutine.Type == RotationType.Cleave)
            {
                // Do Single Target Cleave stuff here if applicable else ignore this one
            }
        }
Beispiel #18
0
        public override void Pulse()
        {
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_LSHIFT) < 0)
            {
                return;
            }

            // Interrupt
            if (WoW.TargetIsCastingAndSpellIsInterruptible && WoW.CanCast("Pummel") && WoW.IsSpellInRange("Pummel") && WoW.TargetPercentCast > Random.Next(20, 40))
            {
                WoW.CastSpell("Pummel");
                return;
            }

            // Defensive CD's
            if (WoW.CanCast("Enraged Regeneration") && WoW.HealthPercent < 30)
            {
                WoW.CastSpell("Enraged Regeneration");
                WoW.CastSpell("Bloodthirst", WoW.CanCast("Bloodthirst") && WoW.IsSpellInRange("Bloodthirst"));
                return;
            }
            if (WoW.CanCast("Commanding Shout") && (WoW.HealthPercent < 15))
            {
                WoW.CastSpell("Commanding Shout");
                WoW.CastSpell("Bloodthirst", WoW.CanCast("Bloodthirst") && WoW.IsSpellInRange("Bloodthirst"));
                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");
                }
            }

            // Targeting
            if (!WoW.HasTarget || !WoW.TargetIsEnemy)
            {
                WoW.TargetNearestEnemy();
            }

            if (combatRoutine.Type != RotationType.SingleTarget || DetectKeyPress.GetKeyState(DetectKeyPress.VK_LCONTROL) < 0)
            {
                // Multitarget Rotation
                BattleCryRotationSequence = 0;
                if (UseCooldowns)
                {
                    if (WoW.CanCast("Battle Cry") && WoW.IsSpellInRange("Rampage") && !WoW.IsSpellOnCooldown("Rampage"))
                    {
                        WoW.CastSpell("Battle Cry");
                        WoW.CastSpell("Avatar", WoW.CanCast("Avatar"));
                    }
                }

                if (WoW.CanCast("Odyns Fury") && WoW.IsSpellInRange("Bloodthirst") && WoW.PlayerHasBuff("Battle Cry"))
                {
                    WoW.CastSpell("Odyns Fury");
                    return;
                }
                if (!WoW.PlayerHasBuff("Meat Cleaver") && WoW.CanCast("Whirlwind") && WoW.IsSpellInRange("Bloodthirst"))
                {
                    WoW.CastSpell("Whirlwind");
                    return;
                }
                if (WoW.CanCast("Rampage") && WoW.IsSpellInRange("Rampage") && ((!WoW.PlayerHasBuff("Enrage") && WoW.Rage >= 85) || WoW.Rage >= 100))
                {
                    WoW.CastSpell("Rampage");
                    return;
                }
                if (WoW.CanCast("Bloodthirst") && WoW.IsSpellInRange("Bloodthirst") && !WoW.PlayerHasBuff("Enrage"))
                {
                    WoW.CastSpell("Bloodthirst");
                    return;
                }
                if (combatRoutine.Type == RotationType.Cleave && WoW.CanCast("Raging Blow") && WoW.IsSpellInRange("Raging Blow"))
                {
                    WoW.CastSpell("Raging Blow");
                    return;
                }
                if (WoW.CanCast("Whirlwind") && WoW.IsSpellInRange("Bloodthirst"))
                {
                    WoW.CastSpell("Whirlwind");
                    return;
                }
            }

            else
            {
                // Singletarget Rotation
                if (UseCooldowns)
                {
                    if (BattleCryRotationSequence == 0)
                    {
                        if (WoW.CanCast("Battle Cry") && WoW.IsSpellInRange("Rampage") && !WoW.IsSpellOnCooldown("Rampage"))
                        {
                            if (WoW.SpellCooldownTimeRemaining("Raging Blow") > 150)
                            {
                                //wait for raging blow to come up before using cooldowns
                                WoW.CastSpell("Furious Slash", WoW.CanCast("Furious Slash") && WoW.IsSpellInRange("Furious Slash"));
                                return;
                            }
                            WoW.CastSpell("Battle Cry");
                            WoW.CastSpell("Avatar", WoW.CanCast("Avatar"));
                            WoW.CastSpell("Rampage");
                            BattleCryRotationSequence++;
                            return;
                        }
                    }
                    else if (BattleCryRotationSequence == 1)
                    {
                        if (WoW.CanCast("Raging Blow") && WoW.IsSpellInRange("Raging Blow"))
                        {
                            WoW.CastSpell("Raging Blow");
                            BattleCryRotationSequence++;
                        }
                        return;
                    }
                    else if (BattleCryRotationSequence == 2)
                    {
                        if (WoW.CanCast("Odyns Fury"))
                        {
                            WoW.CastSpell("Odyns Fury");
                            BattleCryRotationSequence++;
                        }
                        return;
                    }
                    else if (BattleCryRotationSequence == 3)
                    {
                        if (WoW.CanCast("Bloodthirst") && WoW.IsSpellInRange("Bloodthirst"))
                        {
                            WoW.CastSpell("Bloodthirst");
                            BattleCryRotationSequence++;
                        }
                        return;
                    }
                    else if (BattleCryRotationSequence == 4)
                    {
                        if (WoW.CanCast("Raging Blow") && WoW.IsSpellInRange("Raging Blow"))
                        {
                            WoW.CastSpell("Raging Blow");
                            BattleCryRotationSequence = 0;
                        }
                        return;
                    }

                    if (WoW.CanCast("Avatar") && (WoW.SpellCooldownTimeRemaining("Battle Cry") < 1200 || WoW.SpellCooldownTimeRemaining("Battle Cry") > 2200))
                    {
                        WoW.CastSpell("Avatar");
                        return;
                    }
                }
                else
                {
                    BattleCryRotationSequence = 0;
                }
                if (WoW.CanCast("Rampage") && WoW.IsSpellInRange("Rampage") && ((!WoW.PlayerHasBuff("Enrage") && WoW.Rage >= 85) || WoW.Rage >= 100))
                {
                    WoW.CastSpell("Rampage");
                    return;
                }
                if (WoW.CanCast("Bloodthirst") && WoW.IsSpellInRange("Bloodthirst") && !WoW.PlayerHasBuff("Enrage"))
                {
                    WoW.CastSpell("Bloodthirst");
                    return;
                }
                if (WoW.CanCast("Odyns Fury") && WoW.PlayerHasBuff("Enrage") && WoW.PlayerHasBuff("Battle Cry"))
                {
                    WoW.CastSpell("Odyns Fury");
                    return;
                }
                if (WoW.CanCast("Execute") && WoW.IsSpellInRange("Execute") && WoW.PlayerHasBuff("Enrage") && WoW.TargetHealthPercent <= 20)
                {
                    WoW.CastSpell("Execute");
                    return;
                }
                if (WoW.CanCast("Bloodthirst") && WoW.IsSpellInRange("Bloodthirst"))
                {
                    WoW.CastSpell("Bloodthirst");
                    return;
                }
                if (WoW.CanCast("Raging Blow") && WoW.IsSpellInRange("Raging Blow"))
                {
                    WoW.CastSpell("Raging Blow");
                    return;
                }
                if (WoW.CanCast("Whirlwind") && WoW.PlayerHasBuff("Wrecking Ball"))
                {
                    WoW.CastSpell("Whirlwind");
                    return;
                }
                WoW.CastSpell("Furious Slash", WoW.CanCast("Furious Slash") && WoW.IsSpellInRange("Furious Slash"));
            }
        }
        public override void Pulse()
        {
            if (!coolDownStopWatch.IsRunning || coolDownStopWatch.ElapsedMilliseconds > 60000)
            {
                coolDownStopWatch.Restart();
            }
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_MULTIPLY) < 0)                              //Use cooldowns manage by *numButton
            {
                if (coolDownStopWatch.ElapsedMilliseconds > 1000)
                {
                    combatRoutine.UseCooldowns = !combatRoutine.UseCooldowns;
                    //Log.Write("Cooldowns " + (combatRoutine.UseCooldowns ? "On" : "Off"));
                    coolDownStopWatch.Restart();
                }
            }

            if (combatRoutine.Type == RotationType.SingleTarget)                                                                     // Do Single Target Stuff here
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && !WoW.PlayerHasBuff("Ghost Wolf") && WoW.IsInCombat)                        //First things go first but break if we wanna run in Wolf
                {
                    if (WoW.CanCast("Wind Shear") && WoW.TargetIsCastingAndSpellIsInterruptible && WoW.IsSpellInRange("Wind Shear")) //interupt every spell
                    {
                        WoW.CastSpell("Wind Shear");
                        return;
                    }

                    if (WoW.CanCast("Feral Spirit") && WoW.IsSpellInRange("Stormstrike") && combatRoutine.UseCooldowns && WoW.Maelstrom >= 20)                     //Wolves in melee range
                    {
                        Log.Write("Using Feral Spirit", Color.Red);
                        WoW.CastSpell("Feral Spirit");
                        return;
                    }

                    if (WoW.CanCast("Crash Lightning") && WoW.Maelstrom >= 20 && WoW.SpellCooldownTimeRemaining("Feral Spirit") >= 115)                     //Crash lightning for alpha wolf
                    {
                        WoW.CastSpell("Crash Lightning");
                        return;
                    }

                    if (WoW.CanCast("Rockbiter") && (!WoW.PlayerHasBuff("Landslide") || WoW.PlayerBuffTimeRemaining("Landslide") <= 1) && WoW.IsSpellInRange("Flametongue")) //REFRESH LANDSLIDE
                    {
                        Log.Write("Reseting Landslide", Color.Red);
                        WoW.CastSpell("Rockbiter");
                        return;
                    }

                    if (WoW.CanCast("Fury of Air") && !WoW.PlayerHasBuff("Fury of Air") && WoW.IsSpellInRange("Flametongue") && WoW.Maelstrom >= 22) //REFRESH Fury of Air
                    {
                        Log.Write("Reseting Fury of Air", Color.Red);
                        WoW.CastSpell("Fury of Air");
                        return;
                    }

                    if (WoW.CanCast("Flametongue") && WoW.IsSpellInRange("Flametongue") && ((!WoW.PlayerHasBuff("Flametongue") || WoW.PlayerBuffTimeRemaining("Flametongue") <= 1)) || (WoW.SpellCooldownTimeRemaining("Doom Winds") <= 6 && WoW.PlayerBuffTimeRemaining("Flametongue") <= 4)) //REFRESH FLAMETONGUE
                    {
                        Log.Write("Reseting Flametongue buff", Color.Red);
                        WoW.CastSpell("Flametongue");
                        return;
                    }

                    if (WoW.CanCast("Doom Winds") && combatRoutine.UseCooldowns && WoW.IsSpellInRange("Stormstrike") && WoW.PlayerHasBuff("Flametongue"))
                    {
                        WoW.CastSpell("Doom Winds");
                        return;
                    }

                    if (WoW.CanCast("Lightning Bolt") && WoW.IsSpellInRange("Lightning Bolt") && WoW.Maelstrom >= 46)                     //Overcharge
                    {
                        WoW.CastSpell("Lightning Bolt");
                        return;
                    }

                    if (WoW.CanCast("Stormstrike") && WoW.IsSpellInRange("Stormstrike") && WoW.PlayerHasBuff("Stormbringer") && WoW.Maelstrom >= 26)
                    {
                        WoW.CastSpell("Stormstrike");
                        return;
                    }

                    if (WoW.CanCast("Lava Lash") && WoW.IsSpellInRange("Stormstrike") && WoW.PlayerHasBuff("Hot Hand"))                     //Hot Hand
                    {
                        WoW.CastSpell("Lava Lash");
                        return;
                    }

                    if (WoW.SpellCooldownTimeRemaining("Lightning Bolt") >= 1)                      // to get not GCD locked on Bolt
                    {
                        if (WoW.CanCast("Stormstrike") && WoW.IsSpellInRange("Stormstrike") && WoW.Maelstrom >= 80)
                        {
                            WoW.CastSpell("Stormstrike");
                            return;
                        }

                        if (WoW.CanCast("Lava Lash") && WoW.IsSpellInRange("Stormstrike") && WoW.Maelstrom >= 120)
                        {
                            WoW.CastSpell("Lava Lash");                                     //Buffer Lava
                            return;
                        }

                        if (WoW.CanCast("Flametongue") && WoW.PlayerBuffTimeRemaining("Flametongue") <= 5 && WoW.IsSpellInRange("Flametongue"))
                        {
                            WoW.CastSpell("Flametongue");                                     //REFRESH FLAMETONGUE PANDEMIC
                            return;
                        }

                        if (WoW.CanCast("Rockbiter") && WoW.IsSpellInRange("Flametongue"))
                        {
                            WoW.CastSpell("Rockbiter");                                     //Nothing to do
                            return;
                        }
                        if (WoW.CanCast("Feral Lunge") && !WoW.IsSpellInRange("Flametongue") && WoW.IsSpellInRange("Feral Lunge"))                         //out of range of flametongue 10y and in range of feral lunge 8-25y
                        {
                            WoW.CastSpell("Feral Lunge");
                            return;
                        }
                    }

                    if (WoW.CanCast("Astral Shift") && WoW.HealthPercent < 60) //ASTRAL SHIFT - DMG REDUCTION if we are below 60% of HP
                    {
                        WoW.CastSpell("Astral Shift");
                        return;
                    }
                }
            }
            if (combatRoutine.Type == RotationType.SingleTargetCleave)
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && !WoW.PlayerHasBuff("Ghost Wolf") && WoW.IsInCombat)                        //First things go first
                {
                    if (WoW.CanCast("Wind Shear") && WoW.TargetIsCastingAndSpellIsInterruptible && WoW.IsSpellInRange("Wind Shear")) //interupt every spell
                    {
                        WoW.CastSpell("Wind Shear");
                        return;
                    }

                    if (WoW.CanCast("Feral Spirit") && WoW.IsSpellInRange("Stormstrike") && combatRoutine.UseCooldowns && WoW.Maelstrom >= 20)                     //Wolves in melee range
                    {
                        Log.Write("Using Feral Spirit", Color.Red);
                        WoW.CastSpell("Feral Spirit");
                        return;
                    }

                    if (WoW.CanCast("Crash Lightning") && WoW.Maelstrom >= 20 && WoW.SpellCooldownTimeRemaining("Feral Spirit") >= 115)                     //Crash lightning for alpha wolf
                    {
                        WoW.CastSpell("Crash Lightning");
                        return;
                    }

                    if (WoW.CanCast("Rockbiter") && (!WoW.PlayerHasBuff("Landslide") || WoW.PlayerBuffTimeRemaining("Landslide") <= 1) && WoW.IsSpellInRange("Flametongue")) //REFRESH LANDSLIDE
                    {
                        Log.Write("Reseting Landslide", Color.Red);
                        WoW.CastSpell("Rockbiter");
                        return;
                    }

                    if (WoW.CanCast("Fury of Air") && !WoW.PlayerHasBuff("Fury of Air") && WoW.IsSpellInRange("Flametongue") && WoW.Maelstrom >= 22) //REFRESH Fury of Air
                    {
                        Log.Write("Reseting Fury of Air", Color.Red);
                        WoW.CastSpell("Fury of Air");
                        return;
                    }

                    if (WoW.CanCast("Flametongue") && WoW.IsSpellInRange("Flametongue") && ((!WoW.PlayerHasBuff("Flametongue") || WoW.PlayerBuffTimeRemaining("Flametongue") <= 1)) || (WoW.SpellCooldownTimeRemaining("Doom Winds") <= 6 && WoW.PlayerBuffTimeRemaining("Flametongue") <= 4)) //REFRESH FLAMETONGUE
                    {
                        Log.Write("Reseting Flametongue buff", Color.Red);
                        WoW.CastSpell("Flametongue");
                        return;
                    }

                    if (WoW.CanCast("Doom Winds") && combatRoutine.UseCooldowns && WoW.IsSpellInRange("Stormstrike") && WoW.PlayerHasBuff("Flametongue"))
                    {
                        WoW.CastSpell("Doom Winds");
                        return;
                    }

                    if (WoW.CanCast("Lightning Bolt") && WoW.IsSpellInRange("Lightning Bolt") && WoW.Maelstrom >= 46)                     //Overcharge
                    {
                        WoW.CastSpell("Lightning Bolt");
                        return;
                    }

                    if (WoW.CanCast("Stormstrike") && WoW.IsSpellInRange("Stormstrike") && WoW.PlayerHasBuff("Stormbringer") && WoW.Maelstrom >= 26)
                    {
                        WoW.CastSpell("Stormstrike");
                        return;
                    }

                    if (WoW.CanCast("Lava Lash") && WoW.IsSpellInRange("Stormstrike") && WoW.PlayerHasBuff("Hot Hand"))                     //Hot Hand
                    {
                        WoW.CastSpell("Lava Lash");
                        return;
                    }

                    if (WoW.CanCast("Crash Lightning") && WoW.Maelstrom >= 22 && WoW.IsSpellInRange("Stormstrike") && !WoW.PlayerHasBuff("Crash Lightning"))                     //Crash lightning for cleave to enable storm
                    {
                        Log.Write("Reseting Crashing buff", Color.Blue);
                        WoW.CastSpell("Crash Lightning");
                        return;
                    }

                    if (WoW.SpellCooldownTimeRemaining("Lightning Bolt") >= 1)                      // to get not GCD locked on Bolt
                    {
                        if (WoW.CanCast("Stormstrike") && WoW.IsSpellInRange("Stormstrike") && WoW.Maelstrom >= 80)
                        {
                            WoW.CastSpell("Stormstrike");
                            return;
                        }

                        if (WoW.CanCast("Lava Lash") && WoW.IsSpellInRange("Stormstrike") && WoW.Maelstrom >= 120)
                        {
                            WoW.CastSpell("Lava Lash");                                     //Buffer Lava
                            return;
                        }

                        if (WoW.CanCast("Flametongue") && WoW.PlayerBuffTimeRemaining("Flametongue") <= 5 && WoW.IsSpellInRange("Flametongue"))
                        {
                            WoW.CastSpell("Flametongue");                                     //REFRESH FLAMETONGUE PANDEMIC
                            return;
                        }

                        if (WoW.CanCast("Rockbiter") && WoW.IsSpellInRange("Flametongue"))
                        {
                            WoW.CastSpell("Rockbiter");                                     //Nothing to do
                            return;
                        }
                        if (WoW.CanCast("Feral Lunge") && !WoW.IsSpellInRange("Flametongue") && WoW.IsSpellInRange("Feral Lunge"))                         //out of range of flametongue 10y and in range of feral lunge 8-25y
                        {
                            WoW.CastSpell("Feral Lunge");
                            return;
                        }
                    }

                    if (WoW.CanCast("Astral Shift") && WoW.HealthPercent < 60) //ASTRAL SHIFT - DMG REDUCTION if we are below 60% of HP
                    {
                        WoW.CastSpell("Astral Shift");
                        return;
                    }
                }
            }
            if (combatRoutine.Type == RotationType.AOE)
            {
                if (WoW.HasTarget && WoW.TargetIsEnemy && !WoW.PlayerHasBuff("Ghost Wolf") && WoW.IsInCombat)                        //First things go first
                {
                    if (WoW.CanCast("Wind Shear") && WoW.TargetIsCastingAndSpellIsInterruptible && WoW.IsSpellInRange("Wind Shear")) //interupt every spell
                    {
                        WoW.CastSpell("Wind Shear");
                        return;
                    }

                    if (WoW.CanCast("Feral Spirit") && WoW.IsSpellInRange("Stormstrike") && combatRoutine.UseCooldowns && WoW.Maelstrom >= 20)                     //Wolves in melee range
                    {
                        Log.Write("Using Feral Spirit", Color.Red);
                        WoW.CastSpell("Feral Spirit");
                        return;
                    }

                    if (WoW.CanCast("Crash Lightning") && WoW.Maelstrom >= 20 && WoW.SpellCooldownTimeRemaining("Feral Spirit") >= 115)                     //Crash lightning for alpha wolf
                    {
                        WoW.CastSpell("Crash Lightning");
                        return;
                    }

                    if (WoW.CanCast("Rockbiter") && (!WoW.PlayerHasBuff("Landslide") || WoW.PlayerBuffTimeRemaining("Landslide") <= 1) && WoW.IsSpellInRange("Flametongue")) //REFRESH LANDSLIDE
                    {
                        Log.Write("Reseting Landslide", Color.Red);
                        WoW.CastSpell("Rockbiter");
                        return;
                    }

                    if (WoW.CanCast("Fury of Air") && !WoW.PlayerHasBuff("Fury of Air") && WoW.IsSpellInRange("Flametongue") && WoW.Maelstrom >= 22) //REFRESH Fury of Air
                    {
                        Log.Write("Reseting Fury of Air", Color.Red);
                        WoW.CastSpell("Fury of Air");
                        return;
                    }

                    if (WoW.CanCast("Flametongue") && WoW.IsSpellInRange("Flametongue") && ((!WoW.PlayerHasBuff("Flametongue") || WoW.PlayerBuffTimeRemaining("Flametongue") <= 1)) || (WoW.SpellCooldownTimeRemaining("Doom Winds") <= 6 && WoW.PlayerBuffTimeRemaining("Flametongue") <= 4)) //REFRESH FLAMETONGUE
                    {
                        Log.Write("Reseting Flametongue buff", Color.Red);
                        WoW.CastSpell("Flametongue");
                        return;
                    }

                    if (WoW.CanCast("Doom Winds") && combatRoutine.UseCooldowns && WoW.IsSpellInRange("Stormstrike") && WoW.PlayerHasBuff("Flametongue"))
                    {
                        WoW.CastSpell("Doom Winds");
                        return;
                    }

                    if (WoW.CanCast("Lightning Bolt") && WoW.IsSpellInRange("Lightning Bolt") && WoW.Maelstrom >= 46)                     //Overcharge
                    {
                        WoW.CastSpell("Lightning Bolt");
                        return;
                    }

                    if (WoW.CanCast("Stormstrike") && WoW.IsSpellInRange("Stormstrike") && WoW.PlayerHasBuff("Stormbringer") && WoW.Maelstrom >= 26)
                    {
                        WoW.CastSpell("Stormstrike");
                        return;
                    }

                    if (WoW.CanCast("Lava Lash") && WoW.IsSpellInRange("Stormstrike") && WoW.PlayerHasBuff("Hot Hand"))                     //Hot Hand
                    {
                        WoW.CastSpell("Lava Lash");
                        return;
                    }

                    if (WoW.CanCast("Crash Lightning") && WoW.Maelstrom >= 22 && WoW.IsSpellInRange("Stormstrike"))                     //Crash lightning priority for aoe
                    {
                        WoW.CastSpell("Crash Lightning");
                        return;
                    }

                    if (WoW.SpellCooldownTimeRemaining("Lightning Bolt") >= 1)                      // to get not GCD locked on Bolt
                    {
                        if (WoW.CanCast("Stormstrike") && WoW.IsSpellInRange("Stormstrike") && WoW.Maelstrom >= 80)
                        {
                            WoW.CastSpell("Stormstrike");
                            return;
                        }

                        if (WoW.CanCast("Lava Lash") && WoW.IsSpellInRange("Stormstrike") && WoW.Maelstrom >= 120)
                        {
                            WoW.CastSpell("Lava Lash");                                     //Buffer Lava
                            return;
                        }

                        if (WoW.CanCast("Flametongue") && WoW.PlayerBuffTimeRemaining("Flametongue") <= 5 && WoW.IsSpellInRange("Flametongue"))
                        {
                            WoW.CastSpell("Flametongue");                                     //REFRESH FLAMETONGUE PANDEMIC
                            return;
                        }

                        if (WoW.CanCast("Rockbiter") && WoW.IsSpellInRange("Flametongue"))
                        {
                            WoW.CastSpell("Rockbiter");                                     //Nothing to do
                            return;
                        }
                        if (WoW.CanCast("Feral Lunge") && !WoW.IsSpellInRange("Flametongue") && WoW.IsSpellInRange("Feral Lunge"))                         //out of range of flametongue 10y and in range of feral lunge 8-25y
                        {
                            WoW.CastSpell("Feral Lunge");
                            return;
                        }
                    }

                    if (WoW.CanCast("Astral Shift") && WoW.HealthPercent < 60) //ASTRAL SHIFT - DMG REDUCTION if we are below 60% of HP
                    {
                        WoW.CastSpell("Astral Shift");
                        return;
                    }
                }
            }
        }
Beispiel #20
0
        public override void Pulse()        // Updated for Legion (tested and working for single target)
        {
            if (WoW.IsInCombat && Control.IsKeyLocked(Keys.Scroll) && !WoW.TargetIsPlayer && !WoW.IsMounted)
            {
                SelectRotation(4, 2, 1);
                SelectRotation(4, 3, 1);
            }

            //Healthstone - Potion
            if ((WoW.CanCast("Healthstone") || WoW.CanCast("Potion")) &&
                (WoW.ItemCount("Healthstone") >= 1 || WoW.ItemCount("Potion") >= 1) &&
                (!WoW.ItemOnCooldown("Healthstone") || !WoW.ItemOnCooldown("Potion")) &&
                !WoW.PlayerHasBuff("Feign Death") &&
                WoW.HealthPercent <= 30 &&
                !WoW.IsMounted &&
                WoW.HealthPercent != 0)
            {
                Thread.Sleep(500);
                WoW.CastSpell("Healthstone");
                WoW.CastSpell("Potion");
                return;
            }

            //Exhilaration
            if (WoW.CanCast("Exhilaration") &&
                WoW.HealthPercent <= 20 &&
                !WoW.IsMounted &&
                !WoW.PlayerHasBuff("Feign Death") &&
                WoW.HealthPercent != 0)
            {
                WoW.CastSpell("Exhilaration");
                return;
            }

            //Counter Shot
            if (WoW.CanCast("Counter Shot") &&
                WoW.TargetIsCastingAndSpellIsInterruptible &&
                !WoW.IsSpellOnCooldown("Counter Shot") &&
                WoW.TargetIsCasting &&
                WoW.IsSpellInRange("Counter Shot") &&
                WoW.TargetPercentCast > 75)
            {
                WoW.CastSpell("Counter Shot");
                return;
            }

            ////Revive Pet Call pet
            if ((!WoW.HasPet || WoW.PetHealthPercent <= 0) &&
                !WoW.IsMounted &&
                WoW.HealthPercent != 0 &&
                !WoW.PlayerHasBuff("Feign Death"))
            {
                WoW.CastSpell("Heart of the Phoenix");
                WoW.CastSpell("Revive Pet");
                Thread.Sleep(500);
                WoW.CastSpell("Call Pet");
                return;
            }

            //Voley
            if (WoW.CanCast("Voley") &&
                !WoW.PlayerHasBuff("Feign Death") &&
                !WoW.PlayerHasBuff("Voley") &&
                WoW.HealthPercent != 0 &&
                WoW.Talent(6) == 3)
            {
                WoW.CastSpell("Voley");
                return;
            }

            //Intimidation //Binding Shot
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_Z) < 0 &&
                ((WoW.CanCast("Intimidation") && WoW.Talent(5) == 3) || (WoW.CanCast("Binding Shot") && WoW.Talent(5) == 1)))
            {
                WoW.CastSpell("Binding Shot");
                WoW.CastSpell("Intimidation");
                return;
            }

            //Freezing Trap
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_X) < 0 &&
                WoW.CanCast("Freezing Trap") &&
                !WoW.IsMounted)
            {
                WoW.CastSpell("Freezing Trap");
                return;
            }

            //Tar Trap
            if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_C) < 0 &&
                WoW.CanCast("Tar Trap") &&
                !WoW.IsMounted)
            {
                WoW.CastSpell("Tar Trap");
                return;
            }

            if (WoW.HasTarget && WoW.TargetIsEnemy && WoW.IsInCombat && !WoW.IsMounted && !WoW.PlayerIsChanneling && !WoW.PlayerHasBuff("Feign Death") && WoW.HealthPercent != 0)
            {
                //Cooldowns
                if (UseCooldowns)
                {
                }

                //Stampede
                if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_LCONTROL) < 0 &&
                    WoW.CanCast("Stampede") &&
                    WoW.Talent(7) == 1)
                {
                    WoW.CastSpell("Stampede");
                    return;
                }

                /*/Aspect of the Wild
                 * if (WoW.CanCast("Aspect of the Wild")
                 *  && !WoW.PlayerHasBuff("Aspect of the Turtle")
                 *  && WoW.PlayerHasBuff("Bestial Wrath")
                 *  && WoW.PlayerBuffTimeRemaining("Bestial Wrath") >= 1300)
                 * {
                 *  WoW.CastSpell("Aspect of the Wild");
                 * }*/

                //SINGLE TARGET
                //Bestial Wrath
                if ((combatRoutine.Type == RotationType.SingleTarget || combatRoutine.Type == RotationType.SingleTargetCleave) &&
                    WoW.CanCast("Bestial Wrath") &&
                    !WoW.PlayerHasBuff("Aspect of the Turtle") &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    (WoW.Focus >= 97 || (WoW.Focus >= 90 && WoW.CanCast("Aspect of the Wild"))))
                {
                    WoW.CastSpell("Bestial Wrath");
                    WoW.CastSpell("Aspect of the Wild");
                    //WoW.CastSpell("A Murder of Crows");
                    WoW.CastSpell("Kill Command");
                }

                //Dire Frenzy
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    (WoW.CanCast("Dire Frenzy") || WoW.SpellCooldownTimeRemaining("Dire Frenzy") <= 100) &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(2) == 2 &&
                    ((WoW.PetHasBuff("Dire Frenzy") && WoW.PetBuffTimeRemaining("Dire Frenzy") <= 200) || !WoW.PetHasBuff("Dire Frenzy") || WoW.PlayerSpellCharges("Dire Frenzy") >= 2))
                {
                    WoW.CastSpell("Titan's Thunder");
                    WoW.CastSpell("Dire Frenzy");
                    return;
                }

                //A Murder of Crows
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.CanCast("A Murder of Crows")
                    //&& WoW.PlayerHasBuff("Bestial Wrath")
                    && WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(6) == 1 &&
                    WoW.Focus >= 30)
                {
                    WoW.CastSpell("A Murder of Crows");
                    return;
                }

                // Dire beast
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.CanCast("Dire Beast") &&
                    WoW.SpellCooldownTimeRemaining("Bestial Wrath") > 300 &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(2) != 2)
                {
                    WoW.CastSpell("Dire Beast");
                    WoW.CastSpell("Titan's Thunder");
                    return;
                }

                //Kill Command
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    (WoW.SpellCooldownTimeRemaining("Kill Command") <= 100 || WoW.CanCast("Kill Command")) &&
                    WoW.Focus >= 30)
                {
                    WoW.CastSpell("Kill Command");
                    return;
                }

                //Chimaera Shot
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    WoW.CanCast("Chimaera Shot") &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(2) == 3 &&
                    WoW.Focus < 80)
                {
                    WoW.CastSpell("Chimaera Shot");
                    return;
                }

                //Cobra Shot
                if (combatRoutine.Type == RotationType.SingleTarget &&
                    ((WoW.Focus >= 90) || (WoW.PlayerHasBuff("Bestial Wrath") && WoW.Focus >= 32)) &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.CanCast("Cobra Shot") &&
                    !WoW.CanCast("Bestial Wrath"))
                {
                    WoW.CastSpell("Cobra Shot");
                    return;
                }

                //AOE

                //Bestial Wrath
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CanCast("Bestial Wrath") &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    !WoW.PlayerHasBuff("Aspect of the Turtle"))
                {
                    WoW.CastSpell("Bestial Wrath");
                    return;
                }

                // Dire beast
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CanCast("Dire Beast") &&
                    WoW.SpellCooldownTimeRemaining("Bestial Wrath") > 300 &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(2) != 2)
                {
                    WoW.CastSpell("Dire Beast");
                    WoW.CastSpell("Titan's Thunder");
                    return;
                }

                //Dire Frenzy
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CanCast("Dire Frenzy") &&
                    WoW.SpellCooldownTimeRemaining("Bestial Wrath") > 600 &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(2) == 2)
                {
                    WoW.CastSpell("Titan's Thunder");
                    WoW.CastSpell("Dire Frenzy");
                    return;
                }

                //Barrage
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CanCast("Barrage") &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(6) == 2 &&
                    (WoW.Focus >= 60))
                {
                    WoW.CastSpell("Barrage");
                    return;
                }

                //Multishot
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CanCast("Multi-Shot") &&
                    WoW.IsSpellInRange("Multi-Shot") &&
                    WoW.Focus >= 40)
                {
                    WoW.CastSpell("Multi-Shot");
                    return;
                }

                //Chimaera Shot
                if (combatRoutine.Type == RotationType.AOE &&
                    WoW.CanCast("Chimaera Shot") &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(2) == 3 &&
                    WoW.Focus < 80)
                {
                    WoW.CastSpell("Chimaera Shot");
                    return;
                }

                //CLEAVE
                //Multishot - Beast Cleave uptime
                if (combatRoutine.Type == RotationType.SingleTargetCleave &&
                    WoW.CanCast("Multi-Shot") &&
                    (/*!WoW.PetHasBuff("BeastCleave") ||*/ WoW.PetBuffTimeRemaining("BeastCleave") < 0.5) &&
                    WoW.IsSpellInRange("Multi-Shot") &&
                    !WoW.CanCast("Bestial Wrath") &&
                    !WoW.PlayerHasBuff("Bestial Wrath") &&
                    WoW.Focus >= 40)
                {
                    WoW.CastSpell("Multi-Shot");
                    return;
                }

                //Dire Frenzy
                if (combatRoutine.Type == RotationType.SingleTargetCleave &&
                    WoW.CanCast("Dire Frenzy") &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(2) == 2 &&
                    ((WoW.PetHasBuff("Dire Frenzy") && WoW.PetBuffTimeRemaining("Dire Frenzy") <= 200) || !WoW.PetHasBuff("Dire Frenzy") || WoW.PlayerSpellCharges("Dire Frenzy") >= 2))
                {
                    WoW.CastSpell("Titan's Thunder");
                    WoW.CastSpell("Dire Frenzy");
                    return;
                }

                //A Murder of Crows
                if (combatRoutine.Type == RotationType.SingleTargetCleave &&
                    WoW.CanCast("A Murder of Crows") &&
                    WoW.PlayerHasBuff("Bestial Wrath") &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(6) == 1 &&
                    WoW.Focus >= 30)
                {
                    WoW.CastSpell("A Murder of Crows");
                    return;
                }

                // Dire beast
                if (combatRoutine.Type == RotationType.SingleTargetCleave &&
                    WoW.CanCast("Dire Beast") &&
                    WoW.SpellCooldownTimeRemaining("Bestial Wrath") > 300 &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(2) != 2)
                {
                    WoW.CastSpell("Dire Beast");
                    WoW.CastSpell("Titan's Thunder");
                    return;
                }

                //Barrage
                if (combatRoutine.Type == RotationType.SingleTargetCleave &&
                    WoW.CanCast("Barrage") &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(6) == 2 &&
                    (WoW.Focus >= 60))
                {
                    WoW.CastSpell("Barrage");
                    return;
                }

                //Kill Command
                if (combatRoutine.Type == RotationType.SingleTargetCleave &&
                    WoW.CanCast("Kill Command") &&
                    WoW.Focus >= 30)
                {
                    WoW.CastSpell("Kill Command");
                    return;
                }

                //Chimaera Shot
                if (combatRoutine.Type == RotationType.SingleTargetCleave &&
                    WoW.CanCast("Chimaera Shot") &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.Talent(2) == 3 &&
                    WoW.Focus < 80)
                {
                    WoW.CastSpell("Chimaera Shot");
                    return;
                }

                //Cobra Shot
                if (combatRoutine.Type == RotationType.SingleTargetCleave &&
                    ((WoW.Focus >= 85) || (WoW.PlayerHasBuff("Bestial Wrath") && (WoW.Focus >= 32))) &&
                    WoW.IsSpellInRange("Cobra Shot") &&
                    WoW.CanCast("Cobra Shot") &&
                    !WoW.CanCast("Bestial Wrath"))
                {
                    WoW.CastSpell("Cobra Shot");
                    return;
                }

                //Mend Pet
                if (WoW.HasPet &&
                    WoW.CanCast("Mend Pet") &&
                    WoW.HealthPercent != 0 &&
                    WoW.PetHealthPercent <= 75 &&
                    !WoW.PlayerHasBuff("Feign Death"))
                {
                    WoW.CastSpell("Mend Pet");
                    return;
                }
            }
        }
        public override void Pulse()
        {
            if (combatRoutine.Type == RotationType.SingleTarget) // Do Single Target Stuff here
            {
                if (!coolDownStopWatch.IsRunning || coolDownStopWatch.ElapsedMilliseconds > 60000)
                {
                    coolDownStopWatch.Restart();
                }
                if (DetectKeyPress.GetKeyState(DetectKeyPress.VK_MULTIPLY) < 0)                          //Use cooldowns manage by *numButton
                {
                    if (coolDownStopWatch.ElapsedMilliseconds > 1000)
                    {
                        combatRoutine.UseCooldowns = !combatRoutine.UseCooldowns;
                        //Log.Write("Cooldowns " + (combatRoutine.UseCooldowns ? "On" : "Off"));
                        coolDownStopWatch.Restart();
                    }
                }
                if (WoW.HasTarget && !WoW.PlayerIsChanneling && WoW.TargetIsEnemy && WoW.IsInCombat)
                {
                    if (WoW.PlayerHasBuff("Metamorphosis"))
                    {
                        if (combatRoutine.UseCooldowns)
                        {
                            if (WoW.CanCast("Nemesis") && WoW.IsSpellInRange("Chaos Strike"))
                            {
                                WoW.CastSpell("Nemesis");
                                return;
                            }
                            if (WoW.CanCast("Chaos Blades") && WoW.IsSpellInRange("Chaos Strike"))
                            {
                                WoW.CastSpell("Chaos Blades");
                                return;
                            }

                            if (WoW.CanCast("FOTI") && WoW.IsSpellInRange("Chaos Strike"))
                            {
                                WoW.CastSpell("FOTI");
                                return;
                            }
                        }
                        if (WoW.CanCast("Death Sweep") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 15)
                        {
                            WoW.CastSpell("Death Sweep");
                            return;
                        }
                        if (WoW.CanCast("Felblade") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury < 100)
                        {
                            WoW.CastSpell("Felblade"); //Felblade only at melee range to not make worse (if you need to gtfo)
                            return;
                        }
                        if (WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike") && (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_Z) < 0))
                        {
                            WoW.CastSpell("Eye Beam"); //Use Eyebeam by Z press
                            return;
                        }
                        if (WoW.CanCast("Annihilation") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 55)
                        {
                            WoW.CastSpell("Annihilation");
                            return;
                        }
                        //if (WoW.CanCast("Demons Bite") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <= 70)  // Fury Generator
                        //{
                        //    WoW.CastSpell("Demons Bite");
                        //    return;
                        //}
                        if (WoW.CanCast("Throw Glaive") && WoW.IsSpellInRange("Throw Glaive"))
                        {
                            WoW.CastSpell("Throw Glaive");
                            return;
                        }
                    }
                    if (combatRoutine.UseCooldowns)
                    {
                        if (WoW.CanCast("Nemesis") && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("Nemesis");
                            return;
                        }
                        if (WoW.CanCast("Chaos Blades") && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("Chaos Blades");
                            return;
                        }

                        if (WoW.CanCast("FOTI") && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("FOTI");
                            return;
                        }
                    }
                    if (WoW.CanCast("Blade Dance") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 15)
                    {
                        WoW.CastSpell("Blade Dance");
                        return;
                    }
                    if (WoW.CanCast("Felblade") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury < 100)
                    {
                        WoW.CastSpell("Felblade"); //Felblade only at melee range to not make worse (if you need to gtfo)
                        return;
                    }
                    if (WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.IsSpellInRange("Chaos Strike") && (DetectKeyPress.GetKeyState(DetectKeyPress.VK_KEY_Z) < 0))
                    {
                        WoW.CastSpell("Eye Beam"); //Use Eyebeam by Z press
                        return;
                    }
                    if (WoW.CanCast("Chaos Strike") && WoW.IsSpellInRange("Chaos Strike") &&
                        (WoW.Fury >= 70 || (WoW.Fury >= 55 && (WoW.PlayerHasBuff("Chaos Blades") || WoW.SpellCooldownTimeRemaining("Nemesis") >= 60))))
                    {
                        WoW.CastSpell("Chaos Strike"); //If we got damage buffs - spent fury on CS instantly (15 save for Blade Dance)
                        return;
                    }
                    if (WoW.CanCast("Blur") && WoW.IsInCombat && WoW.HealthPercent <= ConfigFile.ReadValue <int>("Demonhunter", "Blur Usage Percent"))
                    {
                        WoW.CastSpell("Blur");
                        return;
                    }
                    //if (WoW.CanCast("Demons Bite") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <= 70)  // Fury Generator
                    //{
                    //    WoW.CastSpell("Demons Bite");
                    //   return;
                    //}
                    if (WoW.CanCast("Throw Glaive") && WoW.IsSpellInRange("Throw Glaive"))
                    {
                        WoW.CastSpell("Throw Glaive");
                        return;
                    }
                }
            }
            if (combatRoutine.Type == RotationType.AOE || combatRoutine.Type == RotationType.SingleTargetCleave)
            {
                // Do AOE Stuff here
                if (WoW.HasTarget && !WoW.PlayerIsChanneling && WoW.TargetIsEnemy && WoW.IsInCombat)
                {
                    if (WoW.PlayerHasBuff("Metamorphosis"))
                    {
                        if (WoW.CanCast("FOTI") && WoW.PlayerHasBuff("Momentum") && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("FOTI");
                            return;
                        }
                        if (WoW.CanCast("Fel Barrage") && WoW.PlayerSpellCharges("Fel Barrage") == 5 && WoW.PlayerHasBuff("Momentum") && (WoW.PlayerBuffTimeRemaining("Momentum") >= 1) &&
                            WoW.IsSpellInRange("Fel Barrage"))
                        {
                            WoW.CastSpell("Fel Barrage");
                            return;
                        }
                        if (WoW.CanCast("Death Sweep") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 15)
                        {
                            WoW.CastSpell("Death Sweep");
                            return;
                        }
                        if (WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.PlayerHasBuff("Momentum") && (WoW.PlayerBuffTimeRemaining("Momentum") >= 1) && WoW.IsSpellInRange("Chaos Strike"))
                        {
                            WoW.CastSpell("Eye Beam");
                            return;
                        }
                        if (WoW.CanCast("Annihilation") && WoW.IsSpellInRange("Chaos Strike") && (WoW.Fury >= 40 && WoW.PlayerHasBuff("Momentum") || WoW.Fury >= 70))
                        {
                            WoW.CastSpell("Annihilation");
                            return;
                        }
                        if (WoW.CanCast("Fel Barrage") && WoW.PlayerSpellCharges("Fel Barrage") >= 4 && WoW.PlayerHasBuff("Momentum") && (WoW.PlayerBuffTimeRemaining("Momentum") >= 1) &&
                            WoW.IsSpellInRange("Fel Barrage"))
                        {
                            WoW.CastSpell("Fel Barrage");
                            return;
                        }
                        //if (WoW.CanCast("Demons Bite") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <= 70)  // Fury Generator
                        //{
                        //    WoW.CastSpell("Demons Bite");
                        //    return;
                        //}
                        if (WoW.CanCast("Throw Glaive") && WoW.IsSpellInRange("Throw Glaive") && WoW.PlayerHasBuff("Momentum"))
                        {
                            WoW.CastSpell("Throw Glaive");
                            return;
                        }
                    }
                    if (WoW.CanCast("FOTI") && WoW.PlayerHasBuff("Momentum") && WoW.IsSpellInRange("Chaos Strike"))
                    {
                        WoW.CastSpell("FOTI");
                        return;
                    }
                    if (WoW.CanCast("Fel Barrage") && WoW.PlayerSpellCharges("Fel Barrage") == 5 && WoW.PlayerHasBuff("Momentum") && (WoW.PlayerBuffTimeRemaining("Momentum") >= 1) &&
                        WoW.IsSpellInRange("Fel Barrage"))
                    {
                        WoW.CastSpell("Fel Barrage");
                        return;
                    }
                    if (WoW.CanCast("Blade Dance") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury >= 15)
                    {
                        WoW.CastSpell("Blade Dance");
                        return;
                    }
                    if (WoW.CanCast("Eye Beam") && WoW.Fury >= 50 && WoW.PlayerHasBuff("Momentum") && (WoW.PlayerBuffTimeRemaining("Momentum") > 1) && WoW.IsSpellInRange("Chaos Strike"))
                    {
                        WoW.CastSpell("Eye Beam");
                        return;
                    }
                    if (WoW.CanCast("Chaos Strike") && WoW.IsSpellInRange("Chaos Strike") && (WoW.Fury >= 40 && WoW.PlayerHasBuff("Momentum") || WoW.Fury >= 70)) // Fury Spender
                    {
                        WoW.CastSpell("Chaos Strike");
                        return;
                    }
                    if (WoW.CanCast("Fel Barrage") && WoW.PlayerSpellCharges("Fel Barrage") >= 4 && WoW.PlayerHasBuff("Momentum") && (WoW.PlayerBuffTimeRemaining("Momentum") >= 1) &&
                        WoW.IsSpellInRange("Fel Barrage"))
                    {
                        WoW.CastSpell("Fel Barrage");
                        return;
                    }
                    if (WoW.CanCast("Blur") && WoW.IsInCombat && WoW.HealthPercent <= ConfigFile.ReadValue <int>("Demonhunter", "Blur Usage Percent"))
                    {
                        WoW.CastSpell("Blur");
                        return;
                    }
                    //if (WoW.CanCast("Demons Bite") && WoW.IsSpellInRange("Chaos Strike") && WoW.Fury <= 70)  // Fury Generator
                    //{
                    //    WoW.CastSpell("Demons Bite");
                    //   return;
                    //}
                    if (WoW.CanCast("Throw Glaive") && WoW.IsSpellInRange("Throw Glaive") && WoW.PlayerHasBuff("Momentum"))
                    {
                        WoW.CastSpell("Throw Glaive");
                    }
                }
            }
        }