Esempio n. 1
0
        public override void Execute()
        {
            if (!Smite.IsReady() || !(Config.SmiteEnabled || Config.SmiteEnabledToggle))
            {
                return;
            }

            AIHeroClient target = TargetSelector.GetTarget(570, DamageType.Magical);

            if (target.IsValidTarget(570) && target.Health < Damages.SmiteDmgHero(target) && Eclipse.Menus.KillStealMenu.GetCheckBoxValue("sks") && SpellManager.Smite.IsReady())
            {
                Smite.Cast(target);
            }

            if (Config.SmiteEnemies && SpellManager.HasChillingSmite() && Smite.Handle.Ammo > Config.KeepSmiteNumber)
            {
                var enemy = EntityManager.Heroes.Enemies.FirstOrDefault(e => e.IsValidTarget(Smite.Range) && e.TotalShieldHealth() < Damages.SmiteDmgHero(e));
                if (enemy != null)
                {
                    Debug.WriteChat("Casting Smite on {0}, who has {1}HP", enemy.ChampionName, string.Format("{0}", (int)enemy.Health));
                    Smite.Cast(enemy);
                    return;
                }
            }
            var monsters =
                EntityManager.MinionsAndMonsters.GetJungleMonsters(_PlayerPos, Smite.Range)
                .Where(e => e.IsValidTarget() && Util.MonstersNames.Contains(e.BaseSkinName) && e.Health < Damages.SmiteDmgMonster(e));

            foreach (var m in monsters)
            {
                if (Config.MainMenu["vSmite" + m.BaseSkinName].Cast <CheckBox>().CurrentValue)
                {
                    Smite.Cast(m);
                    Debug.WriteChat("Casting Smite on {0}, who has {1}HP", m.Name, string.Format("{0}", (int)m.Health));
                    return;
                }
            }
        }
Esempio n. 2
0
        public override void Execute()
        {
            if (!Smite.IsReady() || !(Config.SmiteEnabled || Config.SmiteEnabledToggle))
            {
                return;
            }
            if (Config.SmiteEnemies && Smite.Name.Equals("s5_summonersmiteplayerganker"))
            {
                var enemy = EntityManager.Heroes.Enemies.FirstOrDefault(e => Smite.IsInRange(e) && !e.IsDead && e.Health > 0 && !e.IsInvulnerable && e.IsVisible && e.TotalShieldHealth() < Damages.SmiteDmgHero(e));
                if (enemy != null)
                {
                    Debug.WriteChat("Casting Smite on {0}, who has {1}HP", enemy.ChampionName, string.Format("{0}", (int)enemy.Health));
                    Smite.Cast(enemy);
                    return;
                }
            }
            var monsters =
                EntityManager.MinionsAndMonsters.GetJungleMonsters(_PlayerPos, Smite.Range)
                .Where(e => !e.IsDead && e.Health > 0 && Util.MonstersNames.Contains(e.BaseSkinName) && !e.IsInvulnerable && e.IsVisible && e.Health < Damages.SmiteDmgMonster(e));

            foreach (var m in monsters)
            {
                if (Config.MainMenu["vSmite" + m.BaseSkinName].Cast <CheckBox>().CurrentValue)
                {
                    Debug.WriteChat("Casting Smite on {0}, who has {1}HP", m.Name, string.Format("{0}", (int)m.Health));
                    Smite.Cast(m);
                    return;
                }
            }
        }
Esempio n. 3
0
        public override void Execute()
        {
            // KillSteal
            if (Settings.KsQ || (Settings.KsSmite && SpellManager.HasChillingSmite()) || (Settings.KsIgnite && HasIgnite) && Environment.TickCount - lastKSTime > 500)
            {
                var enemies = EntityManager.Heroes.Enemies.Where(e => e.IsValidTarget(600));
                if (Settings.KsQ && Q.IsReady() && PlayerMana >= SettingsMana.MinQMana)
                {
                    var target = enemies.FirstOrDefault(e => Q.IsInRange(e) && e.TotalShieldHealth() < Damages.QDamage(e) && !e.HasBuffOfType(BuffType.SpellImmunity) && !e.HasBuffOfType(BuffType.SpellShield));
                    if (target != null)
                    {
                        lastKSTime = Environment.TickCount;
                        Q.Cast(target);
                        Debug.Write("Casting Q in KS on {0} who has {1}HP.", target.ChampionName, target.Health.ToString());
                        return;
                    }
                }
                if (Settings.KsIgnite && HasIgnite && Ignite.IsReady())
                {
                    var target = enemies.FirstOrDefault(e => W.IsInRange(e) && e.TotalShieldHealth() < Damages.IgniteDmg(e));
                    if (target != null)
                    {
                        lastKSTime = Environment.TickCount;
                        Ignite.Cast(target);
                        Debug.Write("Casting Ignite in KS on {0} who has {1}HP.", target.ChampionName, target.Health.ToString());
                        return;
                    }
                }
                if (Settings.KsSmite && SpellManager.HasChillingSmite() && Smite.IsReady())
                {
                    var target = enemies.FirstOrDefault(e => W.IsInRange(e) && e.TotalShieldHealth() < Damages.SmiteDmgHero(e));
                    if (target != null)
                    {
                        lastKSTime = Environment.TickCount;
                        Ignite.Cast(target);
                        Debug.Write("Casting Smite in KS on {0} who has {1}HP.", target.ChampionName, target.Health.ToString());
                        return;
                    }
                }
            }
            // Auto Q Harass
            if (SettingsHarass.UseAutoQ && Q.IsReady() && PlayerMana >= SettingsHarass.MinAutoQMana && !_Player.IsRecalling() && !PlayerIsUnderEnemyTurret() /* Don't harass under enemy turrets */ && !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) /* Don't Harass in Combo, it can mess it up */)
            {
                var enemies = EntityManager.Heroes.Enemies.Where(
                    e => e.IsValidTarget(Q.Range)).OrderBy(e => _Player.Distance(e));
                foreach (var enemy in enemies)
                {
                    if (
                        VodkaWarwick.Config.ModesMenu.MenuModes["blacklist" + enemy.ChampionName].Cast <CheckBox>()
                        .CurrentValue)
                    {
                        continue;
                    }
                    Q.Cast(enemy);
                    Debug.WriteChat("Casting Q in Auto Harass, Target: {0}", enemy.ChampionName);
                    break;
                }
            }

            // Potion manager
            if (Settings.Potion && !Player.Instance.IsInShopRange() && Player.Instance.HealthPercent <= Settings.potionMinHP && !(Player.Instance.HasBuff("RegenerationPotion") || Player.Instance.HasBuff("ItemCrystalFlaskJungle") || Player.Instance.HasBuff("ItemMiniRegenPotion") || Player.Instance.HasBuff("ItemCrystalFlask") || Player.Instance.HasBuff("ItemDarkCrystalFlask")))
            {
                if (Item.HasItem(HealthPotion.Id) && Item.CanUseItem(HealthPotion.Id))
                {
                    Debug.WriteChat("Using HealthPotion because below {0}% HP - have {1}% HP", String.Format("{0}", Settings.potionMinHP), String.Format("{0:##.##}", Player.Instance.HealthPercent));
                    HealthPotion.Cast();
                    return;
                }
                if (Item.HasItem(HuntersPotion.Id) && Item.CanUseItem(HuntersPotion.Id))
                {
                    Debug.WriteChat("Using HuntersPotion because below {0}% HP - have {1}% HP", String.Format("{0}", Settings.potionMinHP), String.Format("{0:##.##}", Player.Instance.HealthPercent));
                    HuntersPotion.Cast();
                    return;
                }
                if (Item.HasItem(TotalBiscuit.Id) && Item.CanUseItem(TotalBiscuit.Id))
                {
                    Debug.WriteChat("Using TotalBiscuitOfRejuvenation because below {0}% HP - have {1}% HP", String.Format("{0}", Settings.potionMinHP), String.Format("{0:##.##}", Player.Instance.HealthPercent));
                    TotalBiscuit.Cast();
                    return;
                }
                if (Item.HasItem(RefillablePotion.Id) && Item.CanUseItem(RefillablePotion.Id))
                {
                    Debug.WriteChat("Using RefillablePotion because below {0}% HP - have {1}% HP", String.Format("{0}", Settings.potionMinHP), String.Format("{0:##.##}", Player.Instance.HealthPercent));
                    RefillablePotion.Cast();
                    return;
                }
                if (Item.HasItem(CorruptingPotion.Id) && Item.CanUseItem(CorruptingPotion.Id))
                {
                    Debug.WriteChat("Using CorruptingPotion because below {0}% HP - have {1}% HP", String.Format("{0}", Settings.potionMinHP), String.Format("{0:##.##}", Player.Instance.HealthPercent));
                    CorruptingPotion.Cast();
                    return;
                }
            }
            if (Settings.Potion && !Player.Instance.IsInShopRange() && Player.Instance.ManaPercent <= Settings.potionMinMP && !(Player.Instance.HasBuff("RegenerationPotion") || Player.Instance.HasBuff("ItemMiniRegenPotion") || Player.Instance.HasBuff("ItemCrystalFlask") || Player.Instance.HasBuff("ItemDarkCrystalFlask")))
            {
                if (Item.HasItem(CorruptingPotion.Id) && Item.CanUseItem(CorruptingPotion.Id))
                {
                    Debug.WriteChat("Using CorruptingPotion because below {0}% MP - have {1}% MP", String.Format("{0}", Settings.potionMinMP), String.Format("{0:##.##}", Player.Instance.ManaPercent));
                    CorruptingPotion.Cast();
                }
                if (Item.HasItem(HuntersPotion.Id) && Item.CanUseItem(HuntersPotion.Id))
                {
                    Debug.WriteChat("Using HuntersPotion because below {0}% HP - have {1}% HP", String.Format("{0}", Settings.potionMinHP), String.Format("{0:##.##}", Player.Instance.HealthPercent));
                    HuntersPotion.Cast();
                    return;
                }
            }
        }