Пример #1
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick() ||
                TargetInterruptManager.Tick() ||
                (DateTime.Now - LastEclipseCheck > TimeSpan.FromSeconds(eclipseCheckTime) &&
                 CheckForEclipseProcs()) ||
                (WowInterface.ObjectManager.Player.ManaPercentage < 30 &&
                 CastSpellIfPossible(innervateSpell, 0)) ||
                (WowInterface.ObjectManager.Player.HealthPercentage < 70 &&
                 CastSpellIfPossible(barkskinSpell, 0, true)) ||
                (LunarEclipse &&
                 CastSpellIfPossible(starfireSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                (SolarEclipse &&
                 CastSpellIfPossible(wrathSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                (WowInterface.ObjectManager.WowObjects.OfType <WowUnit>().Where(e => !e.IsInCombat && WowInterface.ObjectManager.Player.Position.GetDistance(e.Position) < 35).Count() < 4 &&
                 CastSpellIfPossible(starfallSpell, WowInterface.ObjectManager.TargetGuid, true)))
            {
                return;
            }

            if (CastSpellIfPossible(forceOfNatureSpell, 0, true))
            {
                WowInterface.HookManager.ClickOnTerrain(WowInterface.ObjectManager.Player.Position);
            }
        }
Пример #2
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (!WowInterface.ObjectManager.Player.IsAutoAttacking)
            {
                WowInterface.HookManager.StartAutoAttack();
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick() ||
                TargetInterruptManager.Tick() ||
                (WowInterface.ObjectManager.Player.HealthPercentage < 60 &&
                 CastSpellIfPossibleDk(iceboundFortitudeSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                CastSpellIfPossibleDk(bloodStrikeSpell, WowInterface.ObjectManager.TargetGuid, false, true) ||
                CastSpellIfPossibleDk(scourgeStrikeSpell, WowInterface.ObjectManager.TargetGuid, false, false, true, true) ||
                CastSpellIfPossibleDk(deathCoilSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                CastSpellIfPossibleDk(summonGargoyleSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                (WowInterface.ObjectManager.Player.Runeenergy > 60 &&
                 CastSpellIfPossibleDk(runeStrikeSpell, WowInterface.ObjectManager.TargetGuid)))
            {
                return;
            }
        }
Пример #3
0
 public override void OutOfCombatExecute()
 {
     if (MyAuraManager.Tick())
     {
         return;
     }
 }
Пример #4
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick() ||
                TargetInterruptManager.Tick())
            {
                return;
            }

            if (WowInterface.ObjectManager.Target != null)
            {
                if ((WowInterface.ObjectManager.Player.HealthPercentage < 16 &&
                     CastSpellIfPossible(iceBlockSpell, 0)) ||
                    (WowInterface.ObjectManager.Player.ManaPercentage < 40 &&
                     CastSpellIfPossible(evocationSpell, 0, true)) ||
                    CastSpellIfPossible(mirrorImageSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                    (MyAuraManager.Buffs.Contains(missileBarrageSpell.ToLower()) && CastSpellIfPossible(arcaneMissilesSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                    CastSpellIfPossible(arcaneBarrageSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                    CastSpellIfPossible(arcaneBlastSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                    CastSpellIfPossible(fireballSpell, WowInterface.ObjectManager.TargetGuid, true))
                {
                    return;
                }
            }
        }
Пример #5
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (!WowInterface.ObjectManager.Player.IsAutoAttacking)
            {
                WowInterface.HookManager.StartAutoAttack();
                AmeisenLogger.Instance.Log(Displayname, $"Started Auto-Attacking", LogLevel.Verbose);
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick() ||
                TargetInterruptManager.Tick() ||
                (WowInterface.ObjectManager.Player.HealthPercentage < 60 &&
                 CastSpellIfPossibleDk(iceboundFortitudeSpell, 0, true)) ||
                CastSpellIfPossibleDk(unbreakableArmorSpell, 0, false, false, true) ||
                CastSpellIfPossibleDk(obliterateSpell, WowInterface.ObjectManager.TargetGuid, false, false, true, true) ||
                CastSpellIfPossibleDk(bloodStrikeSpell, WowInterface.ObjectManager.TargetGuid, false, true) ||
                CastSpellIfPossibleDk(deathCoilSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                (WowInterface.ObjectManager.Player.Runeenergy > 60 &&
                 CastSpellIfPossibleDk(runeStrikeSpell, WowInterface.ObjectManager.TargetGuid)))
            {
                return;
            }
        }
Пример #6
0
 public override void OutOfCombatExecute()
 {
     if (MyAuraManager.Tick() ||
         GroupAuraManager.Tick() ||
         NeedToHealSomeone())
     {
         return;
     }
 }
Пример #7
0
 public override void OutOfCombatExecute()
 {
     if (MyAuraManager.Tick() ||
         (DateTime.Now - LastDeadPartymembersCheck > TimeSpan.FromSeconds(deadPartymembersCheckTime) &&
          HandleDeadPartymembers(ancestralSpiritSpell)))
     {
         return;
     }
 }
Пример #8
0
        public override void OutOfCombatExecute()
        {
            if (MyAuraManager.Tick() ||
                PetManager.Tick())
            {
                return;
            }

            DisengagePrepared = false;
        }
Пример #9
0
 public override void OutOfCombatExecute()
 {
     if (MyAuraManager.Tick() ||
         GroupAuraManager.Tick() ||
         NeedToHealSomeone() ||
         (DateTime.Now - LastDeadPartymembersCheck > TimeSpan.FromSeconds(deadPartymembersCheckTime) &&
          HandleDeadPartymembers(resurrectionSpell)))
     {
         return;
     }
 }
Пример #10
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (NeedToHealSomeone(out List <WowPlayer> playersThatNeedHealing))
            {
                HandleTargetSelection(playersThatNeedHealing);
                WowInterface.ObjectManager.UpdateObject(WowInterface.ObjectManager.Player);

                if (WowInterface.ObjectManager.Target != null)
                {
                    if (WowInterface.ObjectManager.Target.HealthPercentage < 25 &&
                        CastSpellIfPossible(earthShieldSpell, 0, true))
                    {
                        return;
                    }

                    if (playersThatNeedHealing.Count > 4 &&
                        CastSpellIfPossible(chainHealSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }

                    if (playersThatNeedHealing.Count > 6 &&
                        (CastSpellIfPossible(naturesSwiftnessSpell, 0, true) ||
                         CastSpellIfPossible(tidalForceSpell, WowInterface.ObjectManager.TargetGuid, true)))
                    {
                        return;
                    }

                    double healthDifference = WowInterface.ObjectManager.Target.MaxHealth - WowInterface.ObjectManager.Target.Health;
                    List <KeyValuePair <int, string> > spellsToTry = SpellUsageHealDict.Where(e => e.Key <= healthDifference).ToList();

                    foreach (KeyValuePair <int, string> keyValuePair in spellsToTry.OrderByDescending(e => e.Value))
                    {
                        if (CastSpellIfPossible(keyValuePair.Value, WowInterface.ObjectManager.TargetGuid, true))
                        {
                            return;
                        }
                    }
                }
                else
                {
                    if (MyAuraManager.Tick())
                    {
                        return;
                    }
                }
            }
        }
Пример #11
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick() ||
                WowInterface.ObjectManager.Player.ManaPercentage < 20 &&
                WowInterface.ObjectManager.Player.HealthPercentage > 60 &&
                CastSpellIfPossible(lifeTapSpell, 0) ||
                (WowInterface.ObjectManager.Player.HealthPercentage < 80 &&
                 CastSpellIfPossible(deathCoilSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                (WowInterface.ObjectManager.Player.HealthPercentage < 50 &&
                 CastSpellIfPossible(drainLifeSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                (DateTime.Now - LastDamageBuffCheck > TimeSpan.FromSeconds(damageBuffCheckTime) &&
                 HandleDamageBuffing()) ||
                CastSpellIfPossible(metamorphosisSpell, 0) ||
                (WowInterface.ObjectManager.Pet != null && CastSpellIfPossible(demonicEmpowermentSpell, 0)))
            {
                return;
            }

            if (WowInterface.ObjectManager.Target != null)
            {
                if (WowInterface.ObjectManager.Target.GetType() == typeof(WowPlayer))
                {
                    if (DateTime.Now - LastFearAttempt > TimeSpan.FromSeconds(fearAttemptDelay) &&
                        ((WowInterface.ObjectManager.Player.Position.GetDistance(WowInterface.ObjectManager.Target.Position) < 6 &&
                          CastSpellIfPossible(howlOfTerrorSpell, 0, true)) ||
                         (WowInterface.ObjectManager.Player.Position.GetDistance(WowInterface.ObjectManager.Target.Position) < 12 &&
                          CastSpellIfPossible(fearSpell, WowInterface.ObjectManager.TargetGuid, true))))
                    {
                        LastFearAttempt = DateTime.Now;
                        return;
                    }
                }

                if (!WowInterface.ObjectManager.Player.IsCasting &&
                    WowInterface.CharacterManager.Inventory.Items.Count(e => e.Name.Equals("Soul Shard", StringComparison.OrdinalIgnoreCase)) < 5 &&
                    WowInterface.ObjectManager.Target.HealthPercentage < 8 &&
                    CastSpellIfPossible(drainSoulSpell, WowInterface.ObjectManager.TargetGuid, true))
                {
                    return;
                }
            }

            if (CastSpellIfPossible(incinerateSpell, WowInterface.ObjectManager.TargetGuid, true))
            {
                return;
            }
        }
Пример #12
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting ||
                WowInterface.ObjectManager.TargetGuid == WowInterface.ObjectManager.PlayerGuid)
            {
                return;
            }

            if (!WowInterface.ObjectManager.Player.IsAutoAttacking)
            {
                WowInterface.HookManager.StartAutoAttack();
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick() ||
                TargetInterruptManager.Tick())
            {
                return;
            }

            if (WowInterface.ObjectManager.Target != null)
            {
                double distanceToTarget = WowInterface.ObjectManager.Target.Position.GetDistance(WowInterface.ObjectManager.Player.Position);

                if (distanceToTarget > 3)
                {
                    if (CastSpellIfPossible(chargeSpell, WowInterface.ObjectManager.Target.Guid, true) ||
                        CastSpellIfPossible(interceptSpell, WowInterface.ObjectManager.Target.Guid, true))
                    {
                        return;
                    }
                }
                else
                {
                    if ((WowInterface.ObjectManager.Target.HealthPercentage < 20 || WowInterface.ObjectManager.Target.HasBuffByName("Sudden Death")) &&
                        CastSpellIfPossible(executeSpell, WowInterface.ObjectManager.Target.Guid, true))
                    {
                        return;
                    }

                    if ((WowInterface.ObjectManager.WowObjects.OfType <WowUnit>().Where(e => WowInterface.ObjectManager.Target.Position.GetDistance(e.Position) < 16).Count() > 2 && CastSpellIfPossible(bladestormSpell, 0, true)) ||
                        CastSpellIfPossible(overpowerSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                        CastSpellIfPossible(mortalStrikeSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                        CastSpellIfPossible(heroicStrikeSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }
                }
            }
        }
Пример #13
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick() ||
                TargetInterruptManager.Tick())
            {
                return;
            }

            if (WowInterface.ObjectManager.Player.HealthPercentage < 30 &&
                WowInterface.ObjectManager.Target.Type == WowObjectType.Player &&
                CastSpellIfPossible(hexSpell, WowInterface.ObjectManager.TargetGuid, true))
            {
                HexedTarget = true;
                return;
            }

            if (WowInterface.ObjectManager.Player.HealthPercentage < 60 &&
                CastSpellIfPossible(healingWaveSpell, WowInterface.ObjectManager.PlayerGuid, true))
            {
                return;
            }

            if (WowInterface.ObjectManager.Target != null)
            {
                if ((WowInterface.ObjectManager.Target.Position.GetDistance(WowInterface.ObjectManager.Player.Position) < 6 &&
                     CastSpellIfPossible(thunderstormSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                    (WowInterface.ObjectManager.Target.MaxHealth > 10000000 &&
                     WowInterface.ObjectManager.Target.HealthPercentage < 25 &&
                     CastSpellIfPossible(heroismSpell, 0)) ||
                    CastSpellIfPossible(lavaBurstSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                    CastSpellIfPossible(elementalMasterySpell, 0))
                {
                    return;
                }

                if ((WowInterface.ObjectManager.WowObjects.OfType <WowUnit>().Where(e => WowInterface.ObjectManager.Target.Position.GetDistance(e.Position) < 16).Count() > 2 && CastSpellIfPossible(chainLightningSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                    CastSpellIfPossible(lightningBoltSpell, WowInterface.ObjectManager.TargetGuid, true))
                {
                    return;
                }
            }
        }
Пример #14
0
        public override void OutOfCombatExecute()
        {
            if (MyAuraManager.Tick() ||
                NeedToHealSomeone() ||
                (DateTime.Now - LastDeadPartymembersCheck > TimeSpan.FromSeconds(deadPartymembersCheckTime) &&
                 HandleDeadPartymembers(ancestralSpiritSpell)))
            {
                return;
            }

            if (CheckForWeaponEnchantment(EquipmentSlot.INVSLOT_MAINHAND, earthlivingBuff, earthlivingWeaponSpell))
            {
                return;
            }
        }
Пример #15
0
        public override void OutOfCombatExecute()
        {
            if (MyAuraManager.Tick() ||
                DateTime.Now - LastDeadPartymembersCheck > TimeSpan.FromSeconds(deadPartymembersCheckTime) &&
                HandleDeadPartymembers(ancestralSpiritSpell))
            {
                return;
            }

            if (CheckForWeaponEnchantment(EquipmentSlot.INVSLOT_MAINHAND, flametongueBuff, flametongueWeaponSpell))
            {
                return;
            }

            if (HexedTarget)
            {
                HexedTarget = false;
            }
        }
Пример #16
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (!WowInterface.ObjectManager.Player.IsAutoAttacking)
            {
                WowInterface.HookManager.StartAutoAttack();
            }

            if (MyAuraManager.Tick() ||
                TargetInterruptManager.Tick() ||
                (MyAuraManager.Buffs.Contains(sealOfVengeanceSpell.ToLower()) &&
                 CastSpellIfPossible(judgementOfLightSpell, 0)) ||
                (WowInterface.ObjectManager.Player.HealthPercentage < 20 &&
                 CastSpellIfPossible(layOnHandsSpell, WowInterface.ObjectManager.PlayerGuid)) ||
                (WowInterface.ObjectManager.Player.HealthPercentage < 60 &&
                 CastSpellIfPossible(holyLightSpell, WowInterface.ObjectManager.PlayerGuid, true)) ||
                CastSpellIfPossible(avengingWrathSpell, 0, true) ||
                (WowInterface.ObjectManager.Player.ManaPercentage < 80 &&
                 CastSpellIfPossible(divinePleaSpell, 0, true)))
            {
                return;
            }

            if (WowInterface.ObjectManager.Target != null)
            {
                if ((WowInterface.ObjectManager.Player.HealthPercentage < 20 &&
                     CastSpellIfPossible(hammerOfWrathSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                    CastSpellIfPossible(crusaderStrikeSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                    CastSpellIfPossible(divineStormSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                    CastSpellIfPossible(consecrationSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                    CastSpellIfPossible(exorcismSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                    CastSpellIfPossible(holyWrathSpell, WowInterface.ObjectManager.TargetGuid, true))
                {
                    return;
                }
            }
        }
Пример #17
0
        public override void ExecuteCC()
        {
            if (!WowInterface.ObjectManager.Player.IsAutoAttacking && AutoAttackEvent.Run())
            {
                WowInterface.HookManager.StartAutoAttack(WowInterface.ObjectManager.Target);
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick() ||
                TargetInterruptManager.Tick() ||
                (WowInterface.ObjectManager.Player.HealthPercentage < 60 &&
                 CastSpellIfPossibleDk(iceboundFortitudeSpell, 0, true)) ||
                CastSpellIfPossibleDk(unbreakableArmorSpell, 0, false, false, true) ||
                CastSpellIfPossibleDk(obliterateSpell, WowInterface.ObjectManager.TargetGuid, false, false, true, true) ||
                CastSpellIfPossibleDk(bloodStrikeSpell, WowInterface.ObjectManager.TargetGuid, false, true) ||
                CastSpellIfPossibleDk(deathCoilSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                (WowInterface.ObjectManager.Player.Runeenergy > 60 &&
                 CastSpellIfPossibleDk(runeStrikeSpell, WowInterface.ObjectManager.TargetGuid)))
            {
                return;
            }
        }
Пример #18
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick())
            {
                return;
            }

            if (WowInterface.ObjectManager.Player.ManaPercentage < 30 &&
                CastSpellIfPossible(hymnOfHopeSpell, 0))
            {
                return;
            }

            if (WowInterface.ObjectManager.Player.ManaPercentage < 90 &&
                CastSpellIfPossible(shadowfiendSpell, WowInterface.ObjectManager.TargetGuid))
            {
                return;
            }

            if (WowInterface.ObjectManager.Player.HealthPercentage < 70 &&
                CastSpellIfPossible(flashHealSpell, WowInterface.ObjectManager.TargetGuid))
            {
                return;
            }

            if (!WowInterface.ObjectManager.Player.IsCasting &&
                CastSpellIfPossible(mindFlaySpell, WowInterface.ObjectManager.TargetGuid, true))
            {
                return;
            }
        }
Пример #19
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (!WowInterface.ObjectManager.Player.IsAutoAttacking)
            {
                WowInterface.HookManager.StartAutoAttack();
            }

            if (MyAuraManager.Tick() ||
                TargetInterruptManager.Tick() ||
                (WowInterface.ObjectManager.Player.HealthPercentage < 20 &&
                 CastSpellIfPossibleRogue(cloakOfShadowsSpell, 0, true)))
            {
                return;
            }

            if (WowInterface.ObjectManager.Target != null)
            {
                if ((WowInterface.ObjectManager.Target.Position.GetDistance(WowInterface.ObjectManager.Player.Position) > 16 &&
                     CastSpellIfPossibleRogue(sprintSpell, 0, true)))
                {
                    return;
                }
            }

            if (CastSpellIfPossibleRogue(eviscerateSpell, WowInterface.ObjectManager.TargetGuid, true, true, 5) ||
                CastSpellIfPossibleRogue(mutilateSpell, WowInterface.ObjectManager.TargetGuid, true))
            {
                return;
            }
        }
Пример #20
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (NeedToHealSomeone(out List <WowPlayer> playersThatNeedHealing))
            {
                HandleTargetSelection(playersThatNeedHealing);
                WowInterface.ObjectManager.UpdateObject(WowInterface.ObjectManager.Player);

                WowUnit target = WowInterface.ObjectManager.Target;
                if (target != null)
                {
                    WowInterface.ObjectManager.UpdateObject(target);

                    if (playersThatNeedHealing.Count > 4 &&
                        CastSpellIfPossible(prayerOfHealingSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }

                    if (target.Guid != WowInterface.ObjectManager.PlayerGuid &&
                        target.HealthPercentage < 70 &&
                        WowInterface.ObjectManager.Player.HealthPercentage < 70 &&
                        CastSpellIfPossible(bindingHealSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }

                    if (WowInterface.ObjectManager.Player.ManaPercentage < 50 &&
                        CastSpellIfPossible(hymnOfHopeSpell, 0))
                    {
                        return;
                    }

                    if (WowInterface.ObjectManager.Player.HealthPercentage < 20 &&
                        CastSpellIfPossible(desperatePrayerSpell, 0))
                    {
                        return;
                    }

                    List <string> targetBuffs = WowInterface.HookManager.GetAuras(WowLuaUnit.Target);

                    if ((target.HealthPercentage < 85 &&
                         !targetBuffs.Any(e => e.Equals(weakenedSoulSpell, StringComparison.OrdinalIgnoreCase)) &&
                         !targetBuffs.Any(e => e.Equals(powerWordShieldSpell, StringComparison.OrdinalIgnoreCase)) &&
                         CastSpellIfPossible(powerWordShieldSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                        (target.HealthPercentage < 80 &&
                         !targetBuffs.Any(e => e.Equals(renewSpell, StringComparison.OrdinalIgnoreCase)) &&
                         CastSpellIfPossible(renewSpell, WowInterface.ObjectManager.TargetGuid, true)))
                    {
                        return;
                    }

                    double healthDifference = target.MaxHealth - target.Health;
                    List <KeyValuePair <int, string> > spellsToTry = SpellUsageHealDict.Where(e => e.Key <= healthDifference).ToList();

                    foreach (KeyValuePair <int, string> keyValuePair in spellsToTry.OrderByDescending(e => e.Value))
                    {
                        if (CastSpellIfPossible(keyValuePair.Value, WowInterface.ObjectManager.TargetGuid, true))
                        {
                            return;
                        }
                    }
                }
                else
                {
                    if (MyAuraManager.Tick())
                    {
                        return;
                    }
                }
            }
        }
Пример #21
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting ||
                WowInterface.ObjectManager.TargetGuid == WowInterface.ObjectManager.PlayerGuid)
            {
                return;
            }

            if (!WowInterface.ObjectManager.Player.IsAutoAttacking)
            {
                WowInterface.HookManager.StartAutoAttack();
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick() ||
                TargetInterruptManager.Tick() ||
                PetManager.Tick())
            {
                return;
            }

            WowUnit target = (WowUnit)WowInterface.ObjectManager.WowObjects.FirstOrDefault(e => e.Guid == WowInterface.ObjectManager.TargetGuid);

            if (target != null)
            {
                double distanceToTarget = target.Position.GetDistance(WowInterface.ObjectManager.Player.Position);

                if (WowInterface.ObjectManager.Player.HealthPercentage < 15 &&
                    CastSpellIfPossible(feignDeathSpell, 0))
                {
                    return;
                }

                if (distanceToTarget < 3)
                {
                    if (CastSpellIfPossible(frostTrapSpell, 0, true))
                    {
                        InFrostTrapCombo  = true;
                        DisengagePrepared = true;
                        return;
                    }

                    if (WowInterface.ObjectManager.Player.HealthPercentage < 30 &&
                        CastSpellIfPossible(deterrenceSpell, 0, true))
                    {
                        return;
                    }

                    if (CastSpellIfPossible(raptorStrikeSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                        CastSpellIfPossible(mongooseBiteSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }
                }
                else
                {
                    if (DisengagePrepared &&
                        CastSpellIfPossible(concussiveShotSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        DisengagePrepared = false;
                        return;
                    }

                    if (InFrostTrapCombo &&
                        CastSpellIfPossible(disengageSpell, 0, true))
                    {
                        InFrostTrapCombo = false;
                        return;
                    }

                    if (target.HealthPercentage < 20 &&
                        CastSpellIfPossible(killShotSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }

                    CastSpellIfPossible(killCommandSpell, WowInterface.ObjectManager.TargetGuid, true);
                    CastSpellIfPossible(rapidFireSpell, WowInterface.ObjectManager.TargetGuid);

                    if ((WowInterface.ObjectManager.WowObjects.OfType <WowUnit>().Where(e => target.Position.GetDistance(e.Position) < 16).Count() > 2 && CastSpellIfPossible(multiShotSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                        CastSpellIfPossible(chimeraShotSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                        CastSpellIfPossible(aimedShotSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                        CastSpellIfPossible(arcaneShotSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                        CastSpellIfPossible(steadyShotSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }
                }
            }
        }
Пример #22
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (WowInterface.ObjectManager.Player.ManaPercentage < 30 &&
                CastSpellIfPossible(innervateSpell, WowInterface.ObjectManager.PlayerGuid, true))
            {
                return;
            }

            if (NeedToHealSomeone(out List <WowPlayer> playersThatNeedHealing))
            {
                HandleTargetSelection(playersThatNeedHealing);
                WowInterface.ObjectManager.UpdateObject(WowInterface.ObjectManager.Player);

                if (playersThatNeedHealing.Count > 4 &&
                    CastSpellIfPossible(tranquilitySpell, 0, true))
                {
                    return;
                }

                WowUnit target = WowInterface.ObjectManager.Target;
                if (target != null)
                {
                    WowInterface.ObjectManager.UpdateObject(target);
                    List <string> targetBuffs = WowInterface.ObjectManager.Player.Auras.Select(e => e.Name).ToList();

                    if ((target.HealthPercentage < 15 &&
                         CastSpellIfPossible(naturesSwiftnessSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                        (target.HealthPercentage < 90 &&
                         !targetBuffs.Any(e => e.Equals(rejuvenationSpell, StringComparison.OrdinalIgnoreCase)) &&
                         CastSpellIfPossible(rejuvenationSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                        (target.HealthPercentage < 85 &&
                         !targetBuffs.Any(e => e.Equals(wildGrowthSpell, StringComparison.OrdinalIgnoreCase)) &&
                         CastSpellIfPossible(wildGrowthSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                        (target.HealthPercentage < 85 &&
                         !targetBuffs.Any(e => e.Equals(lifebloomSpell, StringComparison.OrdinalIgnoreCase)) &&
                         CastSpellIfPossible(reviveSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                        (target.HealthPercentage < 70 &&
                         (targetBuffs.Any(e => e.Equals(regrowthSpell, StringComparison.OrdinalIgnoreCase)) ||
                          targetBuffs.Any(e => e.Equals(rejuvenationSpell, StringComparison.OrdinalIgnoreCase)) &&
                          CastSpellIfPossible(swiftmendSpell, WowInterface.ObjectManager.TargetGuid, true))))
                    {
                        return;
                    }

                    double healthDifference = target.MaxHealth - target.Health;
                    List <KeyValuePair <int, string> > spellsToTry = SpellUsageHealDict.Where(e => e.Key <= healthDifference).ToList();

                    foreach (KeyValuePair <int, string> keyValuePair in spellsToTry.OrderByDescending(e => e.Value))
                    {
                        if (CastSpellIfPossible(keyValuePair.Value, WowInterface.ObjectManager.TargetGuid, true))
                        {
                            break;
                        }
                    }
                }
            }
            else
            {
                if (MyAuraManager.Tick())
                {
                    return;
                }
            }
        }
Пример #23
0
 public override void OutOfCombatExecute()
 {
     MyAuraManager.Tick();
 }
Пример #24
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (WowInterface.ObjectManager.Player.ManaPercentage < 80 &&
                CastSpellIfPossible(divinePleaSpell, WowInterface.ObjectManager.PlayerGuid, true))
            {
                return;
            }

            if (NeedToHealSomeone(out List <WowPlayer> playersThatNeedHealing))
            {
                HandleTargetSelection(playersThatNeedHealing);
                WowInterface.ObjectManager.UpdateObject(WowInterface.ObjectManager.Player);

                if (WowInterface.ObjectManager.Target != null)
                {
                    WowInterface.ObjectManager.UpdateObject(WowInterface.ObjectManager.Target);

                    if (WowInterface.ObjectManager.Target.HealthPercentage < 12 &&
                        CastSpellIfPossible(layOnHandsSpell, 0))
                    {
                        return;
                    }

                    if (WowInterface.ObjectManager.Target.HealthPercentage < 50)
                    {
                        CastSpellIfPossible(divineFavorSpell, WowInterface.ObjectManager.TargetGuid, true);
                    }

                    if (WowInterface.ObjectManager.Player.ManaPercentage < 50 &&
                        WowInterface.ObjectManager.Player.ManaPercentage > 20)
                    {
                        CastSpellIfPossible(divineIlluminationSpell, 0, true);
                    }

                    double healthDifference = WowInterface.ObjectManager.Target.MaxHealth - WowInterface.ObjectManager.Target.Health;
                    List <KeyValuePair <int, string> > spellsToTry = SpellUsageHealDict.Where(e => e.Key <= healthDifference).ToList();

                    foreach (KeyValuePair <int, string> keyValuePair in spellsToTry.OrderByDescending(e => e.Value))
                    {
                        if (CastSpellIfPossible(keyValuePair.Value, WowInterface.ObjectManager.TargetGuid, true))
                        {
                            break;
                        }
                    }
                }
            }
            else
            {
                if (MyAuraManager.Tick())
                {
                    return;
                }

                WowInterface.ObjectManager.UpdateObject(WowInterface.ObjectManager.Player);
                WowInterface.ObjectManager.UpdateObject(WowInterface.ObjectManager.Target);

                // basic auto attack defending
                if (WowInterface.ObjectManager.TargetGuid == 0 || WowInterface.HookManager.GetUnitReaction(WowInterface.ObjectManager.Player, WowInterface.ObjectManager.Target) == WowUnitReaction.Friendly)
                {
                    IEnumerable <WowUnit> nearEnemies = WowInterface.ObjectManager.GetNearEnemies <WowUnit>(WowInterface.ObjectManager.Player.Position, 10).Where(e => e.IsInCombat);

                    if (nearEnemies.Count() > 0)
                    {
                        WowUnit target = nearEnemies.FirstOrDefault();
                        if (target != null)
                        {
                            WowInterface.HookManager.TargetGuid(target.Guid);
                            WowInterface.MovementEngine.Reset();
                        }
                    }
                }
                else
                {
                    if (WowInterface.ObjectManager.Target.Position.GetDistance(WowInterface.ObjectManager.Player.Position) > 4)
                    {
                        WowInterface.MovementEngine.SetState(MovementEngineState.Moving, WowInterface.ObjectManager.Target.Position);
                        WowInterface.MovementEngine.Execute();
                    }
                    else
                    {
                        WowInterface.HookManager.StartAutoAttack();

                        if (!BotMath.IsFacing(WowInterface.ObjectManager.Player.Position, WowInterface.ObjectManager.Player.Rotation, WowInterface.ObjectManager.Target.Position))
                        {
                            WowInterface.HookManager.FacePosition(WowInterface.ObjectManager.Player, WowInterface.ObjectManager.Target.Position);
                        }
                    }
                }
            }
        }
Пример #25
0
        public override void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (WowInterface.ObjectManager.Player.IsCasting)
            {
                return;
            }

            if (NeedToHealSomeone(out List <WowPlayer> playersThatNeedHealing))
            {
                HandleTargetSelection(playersThatNeedHealing);
                WowInterface.ObjectManager.UpdateObject(WowInterface.ObjectManager.Player);

                if (WowInterface.ObjectManager.Target != null)
                {
                    WowInterface.ObjectManager.UpdateObject(WowInterface.ObjectManager.Target);

                    if (WowInterface.ObjectManager.Target.HealthPercentage < 25 &&
                        CastSpellIfPossible(guardianSpiritSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }

                    if (playersThatNeedHealing.Count > 4 &&
                        CastSpellIfPossible(prayerOfHealingSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }

                    if (WowInterface.ObjectManager.Target.HealthPercentage < 70 &&
                        WowInterface.ObjectManager.Player.HealthPercentage < 70 &&
                        CastSpellIfPossible(bindingHealSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }

                    if (WowInterface.ObjectManager.Player.ManaPercentage < 50 &&
                        CastSpellIfPossible(hymnOfHopeSpell, 0))
                    {
                        return;
                    }

                    double healthDifference = WowInterface.ObjectManager.Target.MaxHealth - WowInterface.ObjectManager.Target.Health;
                    List <KeyValuePair <int, string> > spellsToTry = SpellUsageHealDict.Where(e => e.Key <= healthDifference).ToList();

                    foreach (KeyValuePair <int, string> keyValuePair in spellsToTry.OrderByDescending(e => e.Value))
                    {
                        if (CastSpellIfPossible(keyValuePair.Value, WowInterface.ObjectManager.TargetGuid, true))
                        {
                            return;
                        }
                    }
                }
                else
                {
                    if (MyAuraManager.Tick())
                    {
                        return;
                    }
                }
            }
        }
Пример #26
0
        public override void ExecuteCC()
        {
            if (!WowInterface.ObjectManager.Player.IsAutoAttacking && AutoAttackEvent.Run())
            {
                WowInterface.HookManager.StartAutoAttack(WowInterface.ObjectManager.Target);
            }

            if (MyAuraManager.Tick() ||
                TargetAuraManager.Tick() ||
                TargetInterruptManager.Tick() ||
                PetManager.Tick())
            {
                return;
            }

            if (WowInterface.ObjectManager.Target != null)
            {
                double distanceToTarget = WowInterface.ObjectManager.Target.Position.GetDistance(WowInterface.ObjectManager.Player.Position);

                if (WowInterface.ObjectManager.Player.HealthPercentage < 15 &&
                    CastSpellIfPossible(feignDeathSpell, 0))
                {
                    return;
                }

                if (distanceToTarget < 3)
                {
                    if (CastSpellIfPossible(frostTrapSpell, 0, true))
                    {
                        InFrostTrapCombo  = true;
                        DisengagePrepared = true;
                        return;
                    }

                    if (WowInterface.ObjectManager.Player.HealthPercentage < 30 &&
                        CastSpellIfPossible(deterrenceSpell, 0, true))
                    {
                        return;
                    }

                    if (CastSpellIfPossible(raptorStrikeSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                        CastSpellIfPossible(mongooseBiteSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }
                }
                else
                {
                    if (DisengagePrepared &&
                        CastSpellIfPossible(concussiveShotSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        DisengagePrepared = false;
                        return;
                    }

                    if (InFrostTrapCombo &&
                        CastSpellIfPossible(disengageSpell, 0, true))
                    {
                        InFrostTrapCombo = false;
                        return;
                    }

                    if (WowInterface.ObjectManager.Target.HealthPercentage < 20 &&
                        CastSpellIfPossible(killShotSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }

                    CastSpellIfPossible(killCommandSpell, WowInterface.ObjectManager.TargetGuid, true);
                    CastSpellIfPossible(rapidFireSpell, 0);

                    if ((WowInterface.ObjectManager.WowObjects.OfType <WowUnit>().Where(e => WowInterface.ObjectManager.Target.Position.GetDistance(e.Position) < 16).Count() > 2 && CastSpellIfPossible(multiShotSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                        CastSpellIfPossible(explosiveShotSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                        CastSpellIfPossible(aimedShotSpell, WowInterface.ObjectManager.TargetGuid, true) ||
                        CastSpellIfPossible(steadyShotSpell, WowInterface.ObjectManager.TargetGuid, true))
                    {
                        return;
                    }
                }
            }
        }