Example #1
0
        public override void Fight()
        {
            // Send our pet to attack
            this.Pet.Attack();

            // If we are 4 yards or closer to the target
            if (this.Target.DistanceToPlayer <= 4)
            {
                // Cast Raptor Strike and start melee attack
                this.Player.Cast("Raptor Strike");
                this.SetCombatDistance(25);
                this.Player.Attack();
            }
            else
            {
                // Are we to close for ranged attack?
                if (Player.ToCloseForRanged)
                {
                    // Run back til we are 18 yards away
                    if (!Player.Backup(18))
                    {
                        // Backup returns false? Means moveback is not possible.
                        // Set our combat range to 3 yards which results in the bot going into melee mod
                        this.SetCombatDistance(3);
                    }
                }
                // Start ranged attack
                this.Player.RangedAttack();

                // Over 10% mana?
                if (this.Player.ManaPercent >= 10)
                {
                    // Target got Serpent Sting debuff?
                    if (Player.GetSpellRank("Serpent Sting") != 0 && !this.Target.GotDebuff("Serpent Sting"))
                    {
                        // Cast Serpent Sting
                        this.Player.Cast("Serpent Sting");
                    }
                    // Can we use Arcane Shot?
                    if (Player.GetSpellRank("Arcane Shot") != 0 && this.Player.CanUse("Arcane Shot"))
                    {
                        // Cast Arcane Shot
                        this.Player.Cast("Arcane Shot");
                    }
                    // Can we use Concussive Shot?
                    if (Player.GetSpellRank("Concussive Shot") != 0 && this.Player.CanUse("Concussive Shot"))
                    {
                        // Cast Concussive Shot
                        this.Player.Cast("Concussive Shot");
                    }
                }
            }
        }