Exemplo n.º 1
0
 /// <summary>
 /// tests if the unit has the buff
 /// </summary>
 /// <param name="unit">unit to look for the buff on</param>
 /// <param name="buff">string value of the buff</param>
 /// <returns>true if the unit has the buff, false if it does not</returns>
 public bool hasBuff(ZzukBot.Engines.CustomClass.Objects._Unit unit, String buff)
 {
     foreach (string listBuff in unit.Buffs)
     {
         if (listBuff == buff)
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 2
0
 /// <summary>
 /// finds from all the attacking mobs the one with the lowest health percentage
 /// </summary>
 /// <returns>Unit with the lowest health percentage</returns>
 public ZzukBot.Engines.CustomClass.Objects._Unit lowestHealthAttackingMob()
 {
     ZzukBot.Engines.CustomClass.Objects._Unit lowestHealthMob = this.Attackers[0];
     foreach (ZzukBot.Engines.CustomClass.Objects._Unit unit in this.Attackers)
     {
         if (unit.HealthPercent < lowestHealthMob.HealthPercent)
         {
             lowestHealthMob = unit;
         }
     }
     return(lowestHealthMob);
 }
Exemplo n.º 3
0
        public override void Fight()
        {
            //get out of ghost wolf if issue
            if (this.Player.IsShapeShifted)
            {
                this.Player.CancelShapeShift();
                return;
            }

            //healing is priority
            if (this.Player.HealthPercent <= 40)
            {
                //Requires Quickheal addon
                this.Player.DoString("QuickHeal()");
            }

            //make sure to kill the low health one
            ZzukBot.Engines.CustomClass.Objects._Unit lowHealthMob = lowestHealthAttackingMob();
            if (this.Player.TargetGuid != lowHealthMob.Guid)
            {
                this.Player.SetTargetTo(lowHealthMob);
            }

            //counterspell
            if (this.Target.IsCasting != "" || this.Target.IsChanneling != "" && this.Player.ManaPercent >= 10)
            {
                if (this.Player.GetSpellRank("Earth Shock") != 0)
                {
                    if (Player.CanUse("Earth Shock"))
                    {
                        this.Player.Cast("Earth Shock");
                        return;
                    }
                }
            }

            //mana totem always!
            if (this.Player.GetSpellRank("Mana Tide Totem") != 0)
            {
                float rangeToTotem = this.Player.IsTotemSpawned("Mana Tide Totem");
                if (rangeToTotem == -1 && this.Player.CanUse("Mana Tide Totem"))
                {
                    this.Player.Cast("Mana Tide Totem");
                    return;
                }
            }

            //drop the searing totem
            if (this.Player.GetSpellRank("Searing Totem") != 0 && this.Player.ManaPercent >= 40 && this.Target.HealthPercent >= 70)
            {
                float rangeToTotem = this.Player.IsTotemSpawned("Searing Totem");
                if ((rangeToTotem == -1 || rangeToTotem > 25) && this.Player.CanUse("Searing Totem"))
                {
                    this.Player.Cast("Searing Totem");
                    return;
                }
            }

            //always cast stormstrike
            if (this.Player.GetSpellRank("Stormstrike") != 0 && this.Player.ManaPercent >= 20)
            {
                if (Player.CanUse("Stormstrike"))
                {
                    this.Player.Cast("Stormstrike");
                    return;
                }
            }

            //lightning shield = DPS
            if (this.Player.GetSpellRank("Lightning Shield") != 0 && this.Player.ManaPercent >= 40)
            {
                if (!this.Player.GotBuff("Lightning Shield"))
                {
                    this.Player.Cast("Lightning Shield");
                    return;
                }
            }
            //shocks
            if (this.Target.HealthPercent >= 40 && this.Player.ManaPercent >= 30 && this.Player.GetSpellRank("Flame Shock") != 0)
            {
                if (this.Player.CanUse("Flame Shock") && !this.Target.GotDebuff("Flame Shock"))
                {
                    this.Player.Cast("Flame Shock");
                    return;
                }
            }
            else if (this.Player.GetSpellRank("Earth Shock") != 0 && this.Player.ManaPercent >= 30)
            {
                if (this.Player.CanUse("Earth Shock"))
                {
                    this.Player.Cast("Earth Shock");
                    return;
                }
            }
            //standard attacks
            if (this.Target.DistanceToPlayer < 5)
            {
                this.Player.Attack();
                return;
            }
            else if (this.Player.ManaPercent >= 20 && this.Player.GetSpellRank("Lightning Bolt") != 0)
            {
                if (this.Player.CanUse("Lightning Bolt"))
                {
                    this.Player.Cast("Lightning Bolt");
                    return;
                }
            }

            //all else fails close the distance
            this.SetCombatDistance(3);
            return;
        }
        public override void Fight()
        {
            //backup for frosted targets
            if (this.Target.GotDebuff("Frost Nova") && this.Target.DistanceToPlayer < 6)
            {
                this.Player.ForceBackup(6);
            }
            else
            {
                this.Player.StopForceBackup();
            }

            //make sure to kill the low health one
            ZzukBot.Engines.CustomClass.Objects._Unit lowHealthMob = lowestHealthAttackingMob();
            if (this.Player.TargetGuid != lowHealthMob.Guid)
            {
                this.Player.SetTargetTo(lowHealthMob);
            }
            //handle multimob
            if (this.Attackers.Count >= 2)
            {
                //if one is about to die kill it!
                if (attackersAboutToDie() || this.Attackers.Count >= 5 && this.Target.DistanceToPlayer < 10)
                {
                    if (this.Player.GetSpellRank("Arcane Explosion") != 0)
                    {
                        if (this.Player.CanUse("Arcane Explosion"))
                        {
                            this.Player.Cast("Arcane Explosion");
                            return;
                        }
                    }
                }
                //cast frost nova
                if (this.Player.ManaPercent >= 20 && this.Player.GetSpellRank("Frost Nova") != 0 && this.Target.DistanceToPlayer <= 8)
                {
                    if (this.Player.CanUse("Frost Nova"))
                    {
                        this.Player.Cast("Frost Nova");
                        return;
                    }
                }
                //mana shield
                if (this.Player.HealthPercent <= 30 && !this.Player.GotBuff("Mana Shield"))
                {
                    if (this.Player.GetSpellRank("Mana Shield") != 0)
                    {
                        if (this.Player.CanUse("Mana Shield"))
                        {
                            this.Player.Cast("Mana Shield");
                            return;
                        }
                    }
                }
            }
            //OOM wand that bitch
            if (this.Player.ManaPercent < 10)
            {
                if (this.Player.IsWandEquipped())
                {
                    this.Player.StartWand();
                    return;
                }
            }
            //mana shield
            if (this.Player.HealthPercent <= 30 && !this.Player.GotBuff("Mana Shield"))
            {
                if (this.Player.GetSpellRank("Mana Shield") != 0)
                {
                    if (this.Player.CanUse("Mana Shield"))
                    {
                        this.Player.Cast("Mana Shield");
                        return;
                    }
                }
            }
            //ice barrier
            if (this.Player.ManaPercent >= 35 && this.Player.GetSpellRank("Ice Barrier") != 0 && (this.Attackers.Count > 1 || this.Target.HealthPercent > 10))
            {
                if (!this.Player.GotBuff("Ice Barrier"))
                {
                    if (this.Player.CanUse("Ice Barrier"))
                    {
                        this.Player.Cast("Ice Barrier");
                        return;
                    }
                }
            }
            //counterspell
            if (this.Player.ManaPercent >= 5 && this.Target.IsCasting != "" || this.Target.IsChanneling != "")
            {
                if (this.Player.GetSpellRank("Counterspell") != 0)
                {
                    if (this.Player.CanUse("Counterspell"))
                    {
                        this.Player.Cast("Counterspell");
                        return;
                    }
                }
            }

            //health potion
            if (this.Player.HealthPercent <= 20 && this.Player.ItemCount("Superior Healing Potion") != 0)
            {
                this.Player.UseItem("Superior Healing Potion");
            }

            //wand almost dead mobs
            if (this.Player.IsWandEquipped() && this.Target.HealthPercent < 5)
            {
                this.Player.StartWand();
                return;
            }
            //cast frost nova
            if (this.Player.ManaPercent >= 10 && this.Player.GetSpellRank("Frost Nova") != 0 && this.Target.DistanceToPlayer <= 10 && this.Target.HealthPercent >= 20)
            {
                if (this.Player.CanUse("Frost Nova"))
                {
                    this.Player.Cast("Frost Nova");
                    return;
                }
            }

            //always fireblast
            if (this.Player.ManaPercent >= 10 && this.Player.GetSpellRank("Fire Blast") != 0 && this.Target.DistanceToPlayer <= 20)
            {
                if (this.Player.CanUse("Fire Blast"))
                {
                    this.Player.Cast("Fire Blast");
                    return;
                }
            }
            //frostbolt
            if (this.Player.ManaPercent >= 10 && this.Player.GetSpellRank("Frostbolt") != 0)
            {
                if (this.Player.CanUse("Frostbolt"))
                {
                    this.Player.Cast("Frostbolt");
                    return;
                }
            }

            //cone of cold
            if (this.Player.GetSpellRank("Cone of Cold") != 0 && this.Target.DistanceToPlayer <= 10 && Target.HealthPercent > 10)
            {
                if (this.Player.CanUse("Cone of Cold"))
                {
                    this.Player.Cast("Cone of Cold");
                    return;
                }
            }

            //wand
            if (this.Player.IsWandEquipped())
            {
                this.Player.StartWand();
                return;
            }
        }
Exemplo n.º 5
0
        public override void Fight()
        {
            //freak out because the shit is hitting the fan
            if (this.Player.HealthPercent < 10 && this.Player.CanUse("Psychic Scream"))
            {
                this.Player.StopWand();
                this.Player.Cast("Psychic Scream");
            }

            //healing is priority
            if (this.Player.HealthPercent <= 40)
            {
                //Requires Quickheal addon
                this.Player.DoString("QuickHeal()");
            }

            //make sure to kill the low health one
            ZzukBot.Engines.CustomClass.Objects._Unit lowHealthMob = lowestHealthAttackingMob();
            if (this.Player.TargetGuid != lowHealthMob.Guid)
            {
                this.Player.SetTargetTo(lowHealthMob);
            }

            //multi mob SWP all the time
            ZzukBot.Engines.CustomClass.Objects._Unit mobwithoutSWP = mobWithoutDebuff("Shadow Word: Pain");
            if (mobwithoutSWP != null && this.Player.GetSpellRank("Shadow Word: Pain") != 0)
            {
                if (!mobwithoutSWP.GotDebuff("Shadow Word: Pain") && mobwithoutSWP.HealthPercent > 10)
                {
                    this.Player.StopWand();
                    this.Player.SetTargetTo(mobwithoutSWP);
                    this.Player.Cast("Shadow Word: Pain");
                    return;
                }
            }

            if (this.Player.GetSpellRank("Power Word: Shield") != 0)
            {
                if (!this.Player.GotBuff("Power Word: Shield") && !this.Player.GotDebuff("Weakened Soul") && this.Target.HealthPercent > 5)
                {
                    this.Player.StopWand();
                    this.Player.Cast("Power Word: Shield");
                }
            }

            if (this.Player.GetSpellRank("Inner Fire") != 0)
            {
                if (!Player.GotBuff("Inner Fire"))
                {
                    this.Player.StopWand();
                    this.Player.Cast("Inner Fire");
                    return;
                }
            }

            if (this.Player.IsWandEquipped())
            {
                this.Player.StartWand();
            }
            else
            {
                this.Player.Attack();
            }
            return;
        }
Exemplo n.º 6
0
        public override void Fight()
        {
            //freak out because the shit is hitting the fan
            if (this.Player.HealthPercent < 10 && this.Player.CanUse("Psychic Scream"))
            {
                this.Player.StopWand();
                this.Player.Cast("Psychic Scream");
            }



            //make sure to kill the low health one
            ZzukBot.Engines.CustomClass.Objects._Unit lowHealthMob = lowestHealthAttackingMob();
            if (this.Player.TargetGuid != lowHealthMob.Guid)
            {
                this.Player.SetTargetTo(lowHealthMob);
            }

            //multi mob SWP all the time
            ZzukBot.Engines.CustomClass.Objects._Unit mobwithoutSWP = mobWithoutDebuff("Shadow Word: Pain");
            if (mobwithoutSWP != null && this.Player.GetSpellRank("Shadow Word: Pain") != 0)
            {
                if (!mobwithoutSWP.GotDebuff("Shadow Word: Pain") && mobwithoutSWP.HealthPercent > 10)
                {
                    if (this.Player.ManaPercent > 9)
                    {
                        this.Player.SetTargetTo(mobwithoutSWP);
                        this.Player.Cast("Shadow Word: Pain");
                        return;
                    }
                }
            }

            if (this.Player.GetSpellRank("Vampiric Embrace") != 0)
            {
                if (this.Player.CanUse("Vampiric Embrace") && !Target.GotDebuff("Vampiric Embrace"))
                {
                    this.Player.Cast("Vampiric Embrace");
                    return;
                }
            }

            if (this.Player.GetSpellRank("Mind Blast") != 0)
            {
                if (this.Player.CanUse("Mind Blast") && this.Player.ManaPercent > 10)
                {
                    this.Player.Cast("Mind Blast");
                    return;
                }
            }



            if (this.Player.GetSpellRank("Devouring Plague") != 0)
            {
                if (this.Player.CanUse("Devouring Plague") && this.Player.ManaPercent > 10)
                {
                    this.Player.Cast("Devouring Plague");
                    return;
                }
            }

            if (this.Player.GetSpellRank("Power Word: Shield") != 0)
            {
                if (!Target.GotDebuff("Vampiric Embrace"))
                {
                    if (!this.Player.GotBuff("Power Word: Shield") && !this.Player.GotDebuff("Weakened Soul") && this.Target.HealthPercent > 5)
                    {
                        this.Player.Cast("Power Word: Shield");
                    }
                }
                if (this.Player.HealthPercent <= 80)
                {
                    if (!this.Player.GotBuff("Power Word: Shield") && !this.Player.GotDebuff("Weakened Soul") && this.Target.HealthPercent > 5)
                    {
                        this.Player.Cast("Power Word: Shield");
                    }
                }
            }

            if (this.Player.GetSpellRank("Inner Fire") != 0)
            {
                if (!Player.GotBuff("Inner Fire"))
                {
                    this.Player.Cast("Inner Fire");
                    return;
                }
            }

            if (this.Player.GetSpellRank("Mind Flay") != 0)
            {
                if (this.Player.CanUse("Mind Flay") && !Target.GotDebuff("Mind Flay"))
                {
                    if (this.Player.ManaPercent > 9)
                    {
                        this.Player.Cast("Mind Flay");
                        return;
                    }
                }
            }

            if (this.Player.IsWandEquipped())
            {
                if (this.Player.ManaPercent <= 10)
                {
                    this.Player.StartWand();
                }
            }

            else
            {
                this.Player.Attack();
            }

            return;
        }