Exemple #1
0
//public override void OnCombat(WoW.Classes.ObjectManager.WowUnit unit)
//{
//}
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            var MyRage   = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Rage);
            var MyEnergy = ObjectManager.LocalPlayer.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.Energy);

            if (TARGET.Health >= 1 && ME.InCombat)
            {
                /////////////////////////////////////////////////////////////////////////////TANK SPEC////////////////////////////////////////////////////////////////////////////////
                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                if (ME.HasAuraById((int)Auras.TankCheck))
                {
                    //Healing & Survival
                    {
                        if (ME.HealthPercent <= 60 && AI.Controllers.Spell.CanCast((int)Spells.FrenzyRegen))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrenzyRegen);
                            return;
                        }
                        if (MyRage >= 60 && AI.Controllers.Spell.CanCast((int)Spells.SavageD) && !ME.HasAuraById((int)Auras.SavageD))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SavageD);
                            return;
                        }
                        if (ME.HasAuraById((int)Auras.DoC))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealingTouch);
                            return;
                        }


                        if (TARGET.Position.Distance3DFromPlayer < 7)
                        {
                            //Mangle!!!
                            if (AI.Controllers.Spell.CanCast((int)Spells.MangleBear))
                            {
                                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.MangleBear);
                                return;
                            }
                            //Maul With Procs
                            if (AI.Controllers.Spell.CanCast((int)Spells.Maul))
                            {
                                if (ObjectManager.LocalPlayer.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.Rage) >= 90 || ME.HasAuraById((int)Auras.TAC) && ME.HasAuraById((int)Auras.SavageD))
                                {
                                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Maul);
                                    return;
                                }
                            }

                            //Thrash Debuff
                            if (AI.Controllers.Spell.CanCast((int)Spells.Thrash))
                            {
                                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Thrash);
                                return;
                            }
                            //FaerieFire
                            if (!TARGET.HasAuraById((int)Auras.FF) && AI.Controllers.Spell.CanCast((int)Spells.FF) || AI.Controllers.Spell.CanCast((int)Spells.FF))
                            {
                                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FF);
                                return;
                            }

                            //Lacerate
                            if (AI.Controllers.Spell.CanCast((int)Spells.Lacerate))
                            {
                                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Lacerate);
                                return;
                            }
                        }
                    }
                }

/////////////////////////////////////////////////////////////////////////////////Boomkin///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                if (ME.HasAuraById((int)Auras.BoomkinCheck))
                {
                    //Healing & Survival
                    if (TARGET.Position.Distance3DFromPlayer <= 40)
                    {
                        // Rejuvenation
                        if (ME.HealthPercent <= 50 &&
                            !ME.HasAuraById((int)Auras.Rejuvenation) &&
                            AI.Controllers.Spell.CanCast((int)Spells.Rejuvenation))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rejuvenation);
                            return;
                        }

                        if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 80 && AI.Controllers.Spell.CanCast((int)Spells.Innervate))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Innervate);
                            return;
                        }

                        // Moonfire
                        if ((!TARGET.HasAuraById((int)Auras.Moonfire) ||
                             TARGET.Auras.Where(x => x.SpellId == (int)Auras.Moonfire && x.TimeLeft <= 6000).Any()) &&
                            AI.Controllers.Spell.CanCast((int)Spells.Moonfire))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Moonfire);
                            return;
                        }

                        // Sunfire
                        if ((!TARGET.HasAuraById((int)Auras.Sunfire) ||
                             TARGET.Auras.Where(x => x.SpellId == (int)Auras.Sunfire && x.TimeLeft <= 6000).Any()) &&
                            AI.Controllers.Spell.CanCast((int)Spells.Sunfire))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Sunfire);
                            return;
                        }


                        // StarFall
                        if (AI.Controllers.Spell.CanCast((int)Spells.StarFall))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFall);
                            return;
                        }

                        // Starsurge
                        if (AI.Controllers.Spell.CanCast((int)Spells.Starsurge))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Starsurge);
                            return;
                        }


                        if (ME.HasAuraById((int)Auras.AstralInsight) && AI.Controllers.Spell.CanCast((int)Spells.AstralC))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.AstralC);
                            return;
                        }

                        // Solar
                        if (ME.HasAuraById((int)Auras.EclipseSolar))
                        {
                            if ((!TARGET.HasAuraById((int)Auras.Sunfire) ||
                                 TARGET.Auras.Where(x => x.SpellId == (int)Auras.Sunfire && x.TimeLeft <= 6000).Any()) &&
                                AI.Controllers.Spell.CanCast((int)Spells.Sunfire))
                            {
                                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Sunfire);
                                return;
                            }

                            if ((!TARGET.HasAuraById((int)Auras.Moonfire) ||
                                 TARGET.Auras.Where(x => x.SpellId == (int)Auras.Moonfire && x.TimeLeft <= 6000).Any()) &&
                                AI.Controllers.Spell.CanCast((int)Spells.Moonfire))
                            {
                                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Moonfire);
                                return;
                            }


                            if (AI.Controllers.Spell.CanCast((int)Spells.Wrath))
                            {
                                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Wrath);
                                return;
                            }
                        }
                        // Lunar
                        if (ME.HasAuraById((int)Auras.EclipseLunar))
                        {
                            if ((!TARGET.HasAuraById((int)Auras.Moonfire) ||
                                 TARGET.Auras.Where(x => x.SpellId == (int)Auras.Moonfire && x.TimeLeft <= 6000).Any()) &&
                                AI.Controllers.Spell.CanCast((int)Spells.Moonfire))
                            {
                                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Moonfire);
                                return;
                            }

                            if ((!TARGET.HasAuraById((int)Auras.Sunfire) ||
                                 TARGET.Auras.Where(x => x.SpellId == (int)Auras.Sunfire && x.TimeLeft <= 6000).Any()) &&
                                AI.Controllers.Spell.CanCast((int)Spells.Sunfire))
                            {
                                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Sunfire);
                                return;
                            }


                            if (AI.Controllers.Spell.CanCast((int)Spells.StarFire))
                            {
                                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFire);
                                return;
                            }
                        }
                        // Wrath
                        if (AI.Controllers.Spell.CanCast((int)Spells.Wrath) && ME.HasAuraById((int)Auras.EMSolar))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Wrath);
                            return;
                        }
                        // Starfire
                        if (AI.Controllers.Spell.CanCast((int)Spells.StarFire) && ME.HasAuraById((int)Auras.EMLunar))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFire);
                            return;
                        }

                        if (AI.Controllers.Spell.CanCast((int)Spells.StarFire) && !ME.HasAuraById((int)Auras.EMLunar) && !ME.HasAuraById((int)Auras.EMLunar))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFire);
                            return;
                        }
                    }
                }

                ////////////////////////////////////////////////////////////////Feral/////////////////////////////////////////////////////////////////////////
                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                if (ME.HasAuraById((int)Auras.FeralCheck))
                {
//	if (!ME.InCombat && ME.UnitsAttackingMeOrPet.Count == 0 && AI.Controllers.Spell.CanCast((int)Spells.Prowl) && !ME.HasAuraById((int)Auras.Prowl))
//          {
//               Logger.WriteLine("Enter stealth ...");
//               WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Prowl);
//           }

                    if (ME.HasAuraById((int)Auras.GlyphofS) && !ME.HasAuraById((int)Auras.SavageRoar) && AI.Controllers.Spell.CanCast((int)Spells.SavageRoar))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SavageRoar);
                        return;
                    }

                    if (ME.HasAuraById((int)Auras.PredSwiftness) && AI.Controllers.Spell.CanCast((int)Spells.HealingTouch))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealingTouch);
                        return;
                    }

                    if (TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rip && x.TimeLeft > 6000).Any() && AI.Controllers.Spell.CanCast((int)Spells.FeroBite) && ME.ComboPoints > 4 ||
                        TARGET.HealthPercent < 25 && ME.ComboPoints > 4 && TARGET.HasAuraById((int)Auras.Rip) && AI.Controllers.Spell.CanCast((int)Spells.FeroBite))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FeroBite);
                        return;
                    }


                    if (!TARGET.HasAuraById((int)Auras.Rip) && AI.Controllers.Spell.CanCast((int)Spells.Rip) && ME.ComboPoints > 4 ||
                        TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rip && x.TimeLeft < 3000).Any() && AI.Controllers.Spell.CanCast((int)Spells.Rip) && ME.ComboPoints > 4 && AI.Controllers.Spell.CanCast((int)Spells.Rip) ||
                        ME.HasAuraById((int)Auras.DoC) && ME.Auras.Where(x => x.SpellId == (int)Auras.DoC && x.StackCount <= 2).Any() && ME.ComboPoints > 4 && AI.Controllers.Spell.CanCast((int)Spells.Rip)
                        )
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rip);
                        return;
                    }

                    if (!TARGET.HasAuraById((int)Auras.Rake) && AI.Controllers.Spell.CanCast((int)Spells.Rake) && ME.ComboPoints <= 4 ||
                        TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rake && x.TimeLeft < 4000).Any() && AI.Controllers.Spell.CanCast((int)Spells.Rake) ||
                        ME.HasAuraById((int)Auras.DoC) && ME.Auras.Where(x => x.SpellId == (int)Auras.DoC && x.StackCount >= 2).Any() && ME.ComboPoints < 5 && AI.Controllers.Spell.CanCast((int)Spells.Rake))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rake);
                        return;
                    }

                    if (!TARGET.HasAuraById((int)Auras.Thrash) && AI.Controllers.Spell.CanCast((int)Spells.ThrashFeral) && TARGET.HasAuraById((int)Auras.Rip) && TARGET.HasAuraById((int)Auras.Rake) && ME.ComboPoints > 3)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ThrashFeral);
                    }

                    if (MyEnergy <= 30 && AI.Controllers.Spell.CanCast((int)Spells.TigerFury))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerFury);
                    }

                    if (!TARGET.HasAuraById((int)Auras.FF) && AI.Controllers.Spell.CanCast((int)Spells.FF))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FF);
                    }


                    if (ME.ComboPoints < 5 && AI.Controllers.Spell.CanCast((int)Spells.MangleFeral))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.MangleFeral);
                        return;
                    }
                }


//////////////////////////////////////////////////////////////////////3
            } ////////////////////////End Single Target Rotation///////////////////
        }     /////////////////////////////////////////////////////////////////////
Exemple #2
0
//public override void OnCombat(WoW.Classes.ObjectManager.WowUnit unit)
//{
//}
private void castNextSpellbySinglePriority(WowUnit TARGET)
{

		var MyChi = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.MonkChi);
		var MyEnergy = ObjectManager.LocalPlayer.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.Energy);

	if (TARGET.Health >= 1 && ME.InCombat)
	{
	if (ME.HasAuraById((int)Auras.TankCheck))
	{
	//Healing & Survival
	{
	
	
	if (ME.HealthPercent <= 95 && MyChi >= 3 && AI.Controllers.Spell.CanCast((int)Spells.Guard) && ME.HasAuraById((int)Auras.PG) && !ME.HasAuraById((int)Auras.Guard))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Guard);
                return;
            }
			
			
	if (ME.HealthPercent <= 99 && AI.Controllers.Spell.CanCast((int)Spells.ZP) && !ME.HasAuraById((int)Auras.ZP)) 
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ZP);
                return;
            }	
			
			
	if (ME.HealthPercent <= 80 && MyChi < 4 && AI.Controllers.Spell.CanCast((int)Spells.ExpelHarm))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ExpelHarm);
                return;
            }
			
	//Defensive
	
	if (MyChi >= 1 && ME.HasAuraById((int)Auras.StagM) || ME.HasAuraById((int)Auras.StagH) 
        || MyChi >= 1 && ME.HasAuraById((intAuras.StagL) && ME.Auras.Where(x => x.SpellId == (int)Auras.StagL && x.TimeLeft <= 7000).Any() )
			{
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PureBrew);
                return;
            }
			
	if (ME.Auras.Where(x => x.SpellId == (int)Auras.ElusiveBrew && x.StackCount >= 5).Any() &&
            AI.Controllers.Spell.CanCast((int)Spells.ElusiveBrew) && !ME.HasAuraById((int)Auras.Elusive)
	|| ME.Auras.Where(x => x.SpellId == (int)Auras.ElusiveBrew && x.StackCount >= 15).Any() &&
            AI.Controllers.Spell.CanCast((int)Spells.ElusiveBrew) && !ME.HasAuraById((int)Auras.Elusive))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ElusiveBrew);
                return;
            }
			
	if (ME.HealthPercent <= 94 && AI.Controllers.Spell.CanCast((int)Spells.Guard) && ME.HasAuraById((int)Auras.PG) && !ME.HasAuraById((int)Auras.Guard))
			{
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Guard);
                return;
            }
	
	

	//Rotation!!!
	if (AI.Controllers.Spell.CanCast((int)Spells.BOK) && !ME.HasAuraById((int)Auras.Shuffle)
	|| AI.Controllers.Spell.CanCast((int)Spells.BOK) && ME.Auras.Where(x => x.SpellId == (int)Auras.Shuffle && x.TimeLeft < 12000).Any())
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BOK);
                return;
            }
			
	if (AI.Controllers.Spell.CanCast((int)Spells.TigerPalm) && ME.Auras.Where(x => x.SpellId == (int)Auras.TP && x.TimeLeft < 3000).Any()
	|| AI.Controllers.Spell.CanCast((int)Spells.TigerPalm) && !ME.HasAuraById((int)Auras.TP))
	        {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerPalm);
                return;
            }
	
	
	if (MyChi <= 3 && AI.Controllers.Spell.CanCast((int)Spells.KegSmash))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.KegSmash);
                return;
            }
			
			
	if (MyChi < 4 && AI.Controllers.Spell.CanCast((int)Spells.Jab))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Jab);
                return;
            }
	
	if (MyChi >= 3 && AI.Controllers.Spell.CanCast((int)Spells.BOK))
			{
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BOK);
                return;
            }	
			
			
			if (AI.Controllers.Spell.CanCast((int)Spells.TigerPalm))
			{
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerPalm);
                return;
            }
	}
    }
}
}
Exemple #3
0
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            if (TARGET.Health >= 1 && ME.InCombat)
            {
                if (ME.HasAuraById((int)Auras.BloodCheck))
                {
                    // Bone Shield
                    if ((!ME.HasAuraById((int)Auras.BoneShield) ||
                         ME.Auras.Where(x => x.SpellId == (int)Auras.BoneShield && x.StackCount <= 1).Any()) &&
                        AI.Controllers.Spell.CanCast((int)Spells.BoneShield))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BoneShield);
                        return;
                    }

                    // Rune Strike
                    if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 89 &&
                        AI.Controllers.Spell.CanCast((int)Spells.RuneStrike))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RuneStrike);
                        return;
                    }

                    // Horn of Winter
                    if (!ME.HasAuraById((int)Auras.HoW) &&
                        AI.Controllers.Spell.CanCast((int)Spells.HoW))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                        return;
                    }

                    // We always want to face the target
                    //WoW.Internals.Movements.Face(unit.Position);

                    if (TARGET.Position.Distance3DFromPlayer > 10 && TARGET.Position.Distance3DFromPlayer < 30 &&
                        ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) > 1 &&
                        ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Frost) > 1)
                    {
                        if (!TARGET.HasAuraById((int)Auras.FrostFever) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak) || !TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Outbreak);
                            return;
                        }
                    }



                    // Deseases

                    if (ME.HasAuraById((int)Auras.CS) && TARGET.Position.Distance3DFromPlayer <= 15)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodBoil);
                        return;
                    }
                    if (TARGET.Position.Distance3DFromPlayer <= 15)
                    {
                        if ((TARGET.Auras.Where(x => x.SpellId == (int)Auras.FrostFever && x.TimeLeft < 8000).Any() ||
                             TARGET.Auras.Where(x => x.SpellId == (int)Auras.BloodPlague && x.TimeLeft < 8000).Any()) &&
                            AI.Controllers.Spell.CanCast((int)Spells.BloodBoil) ||
                            ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 2 && ME.UnitsAttackingMe.Count > 1 && TARGET.HasAuraById((int)Auras.BloodPlague))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodBoil);
                            return;
                        }
                    }
                    // Heart Strike
                    if (AI.Controllers.Spell.CanCast((int)Spells.HS) && ME.HasAuraById((int)Auras.BloodShield) &&
                        ME.Auras.Where(x => x.SpellId == (int)Auras.BloodShield && x.TimeLeft >= 6).Any() &&
                        ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Death) >= 1 ||
                        AI.Controllers.Spell.CanCast((int)Spells.HS) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 1)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HS);
                        return;
                    }

                    if (!ME.HasAuraById((int)Auras.BloodShield) && TARGET.HasAuraById((int)Auras.BloodPlague) ||
                        (ME.HasAuraById((int)Auras.BloodShield) && ME.Auras.Where(x => x.SpellId == (int)Auras.BloodShield && x.TimeLeft <= 6000).Any()))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathStrike);
                        return;
                    }

                    if (!TARGET.HasAuraById((int)Auras.FrostFever) ||
                        !TARGET.HasAuraById((int)Auras.BloodPlague))
                    {
                        if (!TARGET.HasAuraById((int)Auras.FrostFever) &&
                            AI.Controllers.Spell.CanCast((int)Spells.IcyTouch))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.IcyTouch);
                            return;
                        }
                        if (!TARGET.HasAuraById((int)Auras.BloodPlague) &&
                            AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                            return;
                        }
                    }

                    // Death Strike
                    if (AI.Controllers.Spell.CanCast((int)Spells.DeathStrike))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathStrike);
                        return;
                    }


                    // Soul Reaper
                    if (TARGET.HealthPercent < 35 &&
                        AI.Controllers.Spell.CanCast((int)Spells.SoulReaper))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoulReaper);
                        return;
                    }

                    // Horn of Winter
                    if (AI.Controllers.Spell.CanCast((int)Spells.HoW))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                        return;
                    }

                    // Rune Strike
                    if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 30 &&
                        AI.Controllers.Spell.CanCast((int)Spells.RuneStrike))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RuneStrike);
                        return;
                    }


                    else
                    {
                        // Death Coil
                        if (TARGET.HealthPercent < 10 &&
                            AI.Controllers.Spell.CanCast((int)Spells.DeathCoil))
                        {
                            AI.Controllers.Spell.UseShapeshiftForm((int)Spells.DeathCoil);
                            return;
                        }

                        // AI.Controllers.Mover.MoveToObject(TARGET);
                    }

                    AI.Controllers.Spell.AttackTarget();
                    // No cast processed
                    // We should do a "Right Click" on the TARGET here if we are not in combat
                    // in order to auto attack it.
                }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////FROST SPEC//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                if (ME.HasAuraById((int)Auras.FrostCheck) && !TARGET.HasAuraById((int)Auras.DWCheck))
                {
                    // Horn of Winter
                    if (!ME.HasAuraById((int)Auras.HoW) &&
                        AI.Controllers.Spell.CanCast((int)Spells.HoW))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                        return;
                    }

                    // We always want to face the target
                    //WoW.Internals.Movements.Face(TARGET.Position);

                    if (ME.HealthPercent < 30)
                    {
                        // Death Strike
                        if (AI.Controllers.Spell.CanCast((int)Spells.DeathStrike))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathStrike);
                            return;
                        }
                    }

                    if (TARGET.Position.Distance3DFromPlayer > 10)
                    {
                        if (!TARGET.HasAuraById((int)Auras.FrostFever) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak) || !TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Outbreak);
                            return;
                        }
                    }

                    // Frost Strike
                    if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 89 &&
                        AI.Controllers.Spell.CanCast((int)Spells.FrostStrike))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrostStrike);
                        return;
                    }

                    //Pillar Of Frost
                    if (!ME.HasAuraById((int)Auras.PoF) && AI.Controllers.Spell.CanCast((int)Spells.PoF))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PoF);
                    }
                    // Deseases

                    if (ME.HasAuraById((int)Auras.Rime))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                        return;
                    }

                    if (!TARGET.HasAuraById((int)Auras.FrostFever) ||
                        !TARGET.HasAuraById((int)Auras.BloodPlague))
                    {
                        if (!TARGET.HasAuraById((int)Auras.FrostFever) &&
                            AI.Controllers.Spell.CanCast((int)Spells.HowlingBlast))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                            return;
                        }
                        if (!TARGET.HasAuraById((int)Auras.BloodPlague) &&
                            AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                            return;
                        }
                    }

                    // Obliterate
                    if (AI.Controllers.Spell.CanCast((int)Spells.Obliterate))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Obliterate);
                        return;
                    }

                    //Soul Reaper if Target Health below 35%
                    if (AI.Controllers.Spell.CanCast((int)Spells.SoulReaperFrost) && TARGET.HealthPercent < 35)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoulReaperFrost);
                        return;
                    }

                    // Frost Strike
                    if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 20 &&
                        AI.Controllers.Spell.CanCast((int)Spells.FrostStrike))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrostStrike);
                        return;
                    }

                    // Horn of Winter
                    if (AI.Controllers.Spell.CanCast((int)Spells.HoW))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                        return;
                    }

                    if (ME.Auras.Where(x => x.SpellId == (int)Auras.BloodTap && x.StackCount >= 5).Any() && AI.Controllers.Spell.CanCast((int)Spells.BloodTap))
                    {
                        //AI.Controllers.Spell.Cast((int)Spells.BloodTap, TARGET);
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodTap);
                        return;
                    }


                    else
                    {
                        // Death Coil
                        if (TARGET.HealthPercent < 10 &&
                            AI.Controllers.Spell.CanCast((int)Spells.DeathCoil))
                        {
                            AI.Controllers.Spell.UseShapeshiftForm((int)Spells.DeathCoil);
                            return;
                        }

                        // AI.Controllers.Mover.MoveToObject(TARGET);
                    }

                    AI.Controllers.Spell.AttackTarget();
                    // No cast processed
                    // We should do a "Right Click" on the TARGET here if we are not in combat
                    // in order to auto attack it.
                }
                ////////////////////////////////DW FROST  Written By schmiddi/////////////////////////////////////////////////////
                if (ME.HasAuraById((int)Auras.FrostCheck) && TARGET.HasAuraById((int)Auras.DWCheck))
                {
                    //Frost Strike if over 89 Runic Power
                    if (ME.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 89 && AI.Controllers.Spell.CanCast((int)Spells.FrostStrike) ||
                        ME.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 20 && AI.Controllers.Spell.CanCast((int)Spells.FrostStrike) && ME.HasAuraById((int)Auras.KillingM))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrostStrike);
                        return;
                    }
                    //Pillar Of Frost
                    if (!ME.HasAuraById((int)Auras.PoF) && AI.Controllers.Spell.CanCast((int)Spells.PoF))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PoF);
                    }

                    //Howling Blast on Cooldown
                    if (AI.Controllers.Spell.CanCast((int)Spells.HowlingBlast) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Frost) > 1 ||
                        AI.Controllers.Spell.CanCast((int)Spells.HowlingBlast) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Death) > 1 ||
                        ME.HasAuraById((int)Auras.Rime))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                        return;
                    }
                    //Soul Reaper if Target Health below 35%
                    if (AI.Controllers.Spell.CanCast((int)Spells.SoulReaperFrost) && TARGET.HealthPercent < 35)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoulReaperFrost);
                        return;
                    }
                    //Blood Plague Check
                    if (AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && !TARGET.HasAuraById((int)Auras.BloodPlague))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                        return;
                    }

                    //Obliterate if you have 1 Unholy Rune
                    if (AI.Controllers.Spell.CanCast((int)Spells.Obliterate) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) >= 1)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Obliterate);
                        return;
                    }
                    //Howling Blast
                    if (AI.Controllers.Spell.CanCast((int)Spells.HowlingBlast))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                        return;
                    }
                    //Frost Strike
                    if (ME.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 20 && AI.Controllers.Spell.CanCast((int)Spells.FrostStrike))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrostStrike);
                        return;
                    }
                    //Horn of Winter
                    if (AI.Controllers.Spell.CanCast((int)Spells.HoW))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                        return;
                    }
                    if (ME.Auras.Where(x => x.SpellId == (int)Auras.BloodTap && x.StackCount >= 5).Any())
                    {
                        //AI.Controllers.Spell.Cast((int)Spells.BloodTap, TARGET);
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodTap);
                        return;
                    }
                }
            }
        }
Exemple #4
0
//public override void OnCombat(WoW.Classes.ObjectManager.WowUnit unit)
//{}

        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            var Focus     = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Focus);
            var IsCasting = ObjectManager.LocalPlayer.IsCasting;
            var Pet       = ObjectManager.Pet;

            if (TARGET.Health >= 1 && ME.InCombat)
            { //Combat Check
                ///////////////////////////Survival////////////////////////
                if (ME.HasAuraById((int)Auras.SurvivalCheck))
                { //Spec Check
///Pet Controls

                    if (!WoW.Internals.ObjectManager.Pet.IsValid ||
                        WoW.Internals.ObjectManager.Pet.IsDead)
                    {
                        PleaseBringMyPetBack();
                    }


                    if (Pet.HealthPercent < 80 && !Pet.HasAuraById((int)Auras.MendPet) && AI.Controllers.Spell.CanCast((int)Spells.MendPet) && Pet.IsAlive)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.MendPet);
                        return;
                    }

                    if (ME.HasAuraById((int)Auras.T162P) && AI.Controllers.Spell.CanCast((int)Spells.RapidFire))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RapidFire);
                        return;
                    }
                    //A Murder Of Crows
                    if (AI.Controllers.Spell.CanCast((int)Spells.AMurderOfCrows))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.AMurderOfCrows);
                        return;
                    }
                    //Serpent Sting
                    if (!TARGET.HasAuraById((int)Auras.SerpentSting) && AI.Controllers.Spell.CanCast((int)Spells.SerpentSting))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SerpentSting);
                        return;
                    }

                    //Arcane Shot Capp
                    if (Focus >= 90 && AI.Controllers.Spell.CanCast((int)Spells.ArcaneShot))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ArcaneShot);
                        return;
                    }


                    //Explosive Shot
                    if (ME.HasAuraById((int)Auras.ES) && AI.Controllers.Spell.CanCast((int)Spells.ExplosiveShot) ||
                        Focus >= 25 && AI.Controllers.Spell.CanCast((int)Spells.ExplosiveShot))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ExplosiveShot);
                        return;
                    }
                    //Glaive Toss
                    if (Focus >= 15 && AI.Controllers.Spell.CanCast((int)Spells.GlaiveToss))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.GlaiveToss);
                        return;
                    }
                    //KillShot
                    if (TARGET.HealthPercent < 20 && AI.Controllers.Spell.CanCast((int)Spells.KillShot))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.KillShot);
                        return;
                    }
                    //Black Arrow
                    if (Focus >= 35 && AI.Controllers.Spell.CanCast((int)Spells.BlackArrow))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BlackArrow);
                        return;
                    }
                    //Arcane Shot
                    if (AI.Controllers.Spell.CanCast((int)Spells.ArcaneShot) && Focus >= 40)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ArcaneShot);
                        return;
                    }

                    //CobraShot
                    if (Focus <= 60 && AI.Controllers.Spell.CanCast((int)Spells.CobraShot))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.CobraShot);
                        return;
                    }
                } //End of Spec Check
            }     //Combat Check
        }         //End AoE Code
Exemple #5
0
//public override void OnCombat(WoW.Classes.ObjectManager.WowUnit unit)
//{
//}
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            var MyChi     = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.MonkChi);
            var MyEnergy  = ObjectManager.LocalPlayer.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.Energy);
            var IsCasting = ObjectManager.LocalPlayer.IsCasting;

            if (TARGET.Health >= 1 && ME.InCombat)
            {
                ////////////////////////////////////////////////////Brewmaster///////////////////////////////////
                /////////////////////////////////////////////////////////////////////////////////////////////////
                if (ME.HasAuraById((int)Auras.TankCheck))
                {
                    //Healing & Survival



                    if (ME.HealthPercent <= 95 && MyChi >= 3 && AI.Controllers.Spell.CanCast((int)Spells.Guard) && ME.HasAuraById((int)Auras.PG) && !ME.HasAuraById((int)Auras.Guard))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Guard);
                        return;
                    }


                    if (ME.HealthPercent <= 99 && AI.Controllers.Spell.CanCast((int)Spells.ZP) && !ME.HasAuraById((int)Auras.ZP))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ZP);
                        return;
                    }
                    else
                    if (AI.Controllers.Spell.CanCast((int)Spells.ChiWave))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ChiWave);
                        return;
                    }


                    if (ME.HealthPercent <= 80 && MyChi < 4 && AI.Controllers.Spell.CanCast((int)Spells.ExpelHarm))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ExpelHarm);
                        return;
                    }


                    if (MyChi <= 1 && MyEnergy <= 30 && AI.Controllers.Spell.CanCast((int)Spells.ChiBrew))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ChiBrew);
                        return;
                    }
                    //Defensive

                    if (MyChi >= 1 && ME.HasAuraById((int)Auras.StagM) || ME.HasAuraById((int)Auras.StagH) ||
                        MyChi >= 1 && ME.HasAuraById((int)Auras.StagL) && ME.Auras.Where(x => x.SpellId == (int)Auras.StagL && x.TimeLeft <= 8000).Any() ||
                        ME.HealthPercent <= 80 && MyChi >= 1 && ME.HasAuraById((int)Auras.StagL) && ME.Auras.Where(x => x.SpellId == (int)Auras.StagL && x.TimeLeft <= 8000).Any())
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PureBrew);
                        return;
                    }

                    if (ME.Auras.Where(x => x.SpellId == (int)Auras.ElusiveBrew && x.StackCount >= 10).Any() &&
                        AI.Controllers.Spell.CanCast((int)Spells.ElusiveBrew) && !ME.HasAuraById((int)Auras.Elusive))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ElusiveBrew);
                        return;
                    }

                    if (ME.HealthPercent <= 94 && AI.Controllers.Spell.CanCast((int)Spells.Guard) && ME.HasAuraById((int)Auras.PG) && !ME.HasAuraById((int)Auras.Guard))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Guard);
                        return;
                    }



                    //Rotation!!!

                    if (MyChi < 3 && AI.Controllers.Spell.CanCast((int)Spells.KegSmash))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.KegSmash);
                        return;
                    }

                    if (AI.Controllers.Spell.CanCast((int)Spells.BOK) && !ME.HasAuraById((int)Auras.Shuffle) ||
                        AI.Controllers.Spell.CanCast((int)Spells.BOK) && ME.Auras.Where(x => x.SpellId == (int)Auras.Shuffle && x.TimeLeft < 12000).Any())
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BOK);
                        return;
                    }

                    if (AI.Controllers.Spell.CanCast((int)Spells.TigerPalm) && ME.Auras.Where(x => x.SpellId == (int)Auras.TP && x.TimeLeft < 3000).Any() ||
                        AI.Controllers.Spell.CanCast((int)Spells.TigerPalm) && !ME.HasAuraById((int)Auras.TP))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerPalm);
                        return;
                    }



                    if (MyChi < 4 && AI.Controllers.Spell.CanCast((int)Spells.Jab))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Jab);
                        return;
                    }
                    if (AI.Controllers.Spell.CanCast((int)Spells.BOK) && MyChi > 2)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BOK);
                        return;
                    }

                    if (AI.Controllers.Spell.CanCast((int)Spells.TigerPalm))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerPalm);
                        return;
                    }
                }


                //////////////////////////////////////////////////FistWeaving/////////////////////////////////////////
                //////////////////////////////////////////////////////////////////////////////////////////////////////

                if (ME.HasAuraById((int)Auras.HealingCheck))
                {
                    if (!IsCasting)
                    {
                        //Chi Capping Code
                        if (MyChi >= 4 && AI.Controllers.Spell.CanCast((int)Spells.BOK) && ME.HasAuraById((int)Auras.MM))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BOK);
                            return;
                        }
                        if (MyChi >= 4 && AI.Controllers.Spell.CanCast((int)Spells.Uplift) && ME.HasAuraById((int)Auras.RM) && ME.HealthPercent <= 70)
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Uplift);
                            return;
                        }

                        //Mana Tea Code.
                        if (ME.Auras.Where(x => x.SpellId == (int)Auras.ManaTea && x.StackCount >= 2).Any() && ME.HasAuraById((int)Auras.GlyphofMT) &&
                            AI.Controllers.Spell.CanCast((int)Spells.ManaTea) && ObjectManager.LocalPlayer.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 90 ||
                            ME.HasAuraById((int)Auras.ManaTea) && ObjectManager.LocalPlayer.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 10)
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ManaTea);
                            return;
                        }

                        if (ME.Auras.Where(x => x.SpellId == (int)Auras.ManaTea && x.StackCount >= 5).Any() &&
                            AI.Controllers.Spell.CanCast((int)Spells.ManaTea) && ObjectManager.LocalPlayer.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 80 ||
                            ME.HasAuraById((int)Auras.ManaTea) && ObjectManager.LocalPlayer.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 10)
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ManaTea);
                            return;
                        }

                        if (AI.Controllers.Spell.CanCast((int)Spells.Renew))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Renew);
                            return;
                        }
                        if (AI.Controllers.Spell.CanCast((int)Spells.ChiWave))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ChiWave);
                            return;
                        }

                        if (ME.Auras.Where(x => x.SpellId == (int)Auras.VM && x.StackCount >= 5).Any() &&
                            AI.Controllers.Spell.CanCast((int)Spells.SurgingMist))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SurgingMist);
                            return;
                        }

                        if (!ME.HasAuraById((int)Auras.SZ) && AI.Controllers.Spell.CanCast((int)Spells.BOK) && MyChi >= 2 && ME.HasAuraById((int)Auras.MM))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BOK);
                            return;
                        }
                        if (!ME.HasAuraById((int)Auras.TP) && AI.Controllers.Spell.CanCast((int)Spells.TigerPalm) && ME.HasAuraById((int)Auras.MM) ||
                            ME.HasAuraById((int)Auras.MM) && AI.Controllers.Spell.CanCast((int)Spells.TigerPalm) && MyChi > 1)
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerPalm);
                            return;
                        }

                        if (!ME.HasAuraById((int)Auras.MM) && AI.Controllers.Spell.CanCast((int)Spells.Jab))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Jab);
                            return;
                        }

                        if (TARGET.Position.Distance3DFromPlayer > 10 && AI.Controllers.Spell.CanCast((int)Spells.CJL))
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.CJL);
                            return;
                        }
                    }
                }
            }
        }