Пример #1
0
        public static void UseItems(AIHeroClient target, Menu config, float comboDmg = 0f, bool cleanseSpell = false)
        {
            return;

            if (config.Item("hyd").GetValue <bool>() && player.ChampionName != "Renekton")
            {
                castHydra(target);
            }
            if (config.Item("hyd").GetValue <bool>())
            {
                hydraTarget = target;
                useHydra    = true;
            }
            else
            {
                useHydra = false;
            }
            if (config.Item("ran").GetValue <bool>() && Items.HasItem(randuins.Id) && Items.CanUseItem(randuins.Id))
            {
                if (target != null && player.Distance(target) < randuins.Range &&
                    player.CountEnemiesInRange(randuins.Range) >= config.Item("ranmin").GetValue <Slider>().Value)
                {
                    Items.UseItem(randuins.Id);
                }
            }
            if (config.Item("odin").GetValue <bool>() && target != null && Items.HasItem(odins.Id) &&
                Items.CanUseItem(odins.Id))
            {
                var odinDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.OdingVeils);
                if (config.Item("odinonlyks").GetValue <bool>())
                {
                    if (odinDmg > target.Health)
                    {
                        odins.Cast(target);
                    }
                }
                else if (player.CountEnemiesInRange(odins.Range) >= config.Item("odinmin").GetValue <Slider>().Value ||
                         (Math.Max(comboDmg, odinDmg) > target.Health && player.HealthPercent < 30 &&
                          player.Distance(target) < odins.Range && !CombatHelper.CheckCriticalBuffs(target)))
                {
                    odins.Cast();
                }
            }
            if (target != null && config.Item("bil").GetValue <bool>() && Items.HasItem(bilgewater.Id) &&
                Items.CanUseItem(bilgewater.Id))
            {
                var bilDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.Bilgewater);
                if (config.Item("bilonlyks").GetValue <bool>())
                {
                    if (bilDmg > target.Health)
                    {
                        bilgewater.Cast(target);
                    }
                }
                else if ((player.Distance(target) > config.Item("bilminr").GetValue <Slider>().Value&&
                          IsHeRunAway(target) && (target.Health / target.MaxHealth * 100f) < 40 &&
                          target.Distance(player) > player.AttackRange) ||
                         (Math.Max(comboDmg, bilDmg) > target.Health && (player.Health / player.MaxHealth * 100f) < 50) ||
                         IsURF)
                {
                    bilgewater.Cast(target);
                }
            }
            if (target != null && config.Item("botr").GetValue <bool>() && Items.HasItem(botrk.Id) &&
                Items.CanUseItem(botrk.Id))
            {
                var botrDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.Botrk);
                if (config.Item("botronlyks").GetValue <bool>())
                {
                    if (botrDmg > target.Health)
                    {
                        botrk.Cast(target);
                    }
                }
                else if ((player.Distance(target) > config.Item("botrminr").GetValue <Slider>().Value&&
                          (player.Health / player.MaxHealth * 100f) <
                          config.Item("botrmyhealth").GetValue <Slider>().Value&&
                          (target.Health / target.MaxHealth * 100f) <
                          config.Item("botrenemyhealth").GetValue <Slider>().Value) ||
                         (IsHeRunAway(target) && (target.Health / target.MaxHealth * 100f) < 40 &&
                          target.Distance(player) > player.AttackRange) ||
                         (Math.Max(comboDmg, botrDmg) > target.Health && (player.Health / player.MaxHealth * 100f) < 50) ||
                         IsURF)
                {
                    botrk.Cast(target);
                }
            }
            if (target != null && config.Item("hex").GetValue <bool>() && Items.HasItem(hexgun.Id) &&
                Items.CanUseItem(hexgun.Id))
            {
                var hexDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.Hexgun);
                if (config.Item("hexonlyks").GetValue <bool>())
                {
                    if (hexDmg > target.Health)
                    {
                        hexgun.Cast(target);
                    }
                }
                else if ((player.Distance(target) > config.Item("hexminr").GetValue <Slider>().Value&&
                          IsHeRunAway(target) && (target.Health / target.MaxHealth * 100f) < 40 &&
                          target.Distance(player) > player.AttackRange) ||
                         (Math.Max(comboDmg, hexDmg) > target.Health && (player.Health / player.MaxHealth * 100f) < 50) ||
                         IsURF)
                {
                    hexgun.Cast(target);
                }
            }

            /*
             * if (config.Item("Muramana").GetValue<bool>() &&
             *  ((!MuramanaEnabled && config.Item("MuramanaMinmana").GetValue<Slider>().Value < player.ManaPercent) ||
             *   (MuramanaEnabled && config.Item("MuramanaMinmana").GetValue<Slider>().Value > player.ManaPercent)))
             * {
             *  if (Muramana.IsOwned() && Muramana.IsReady())
             *  {
             *      Muramana.Cast();
             *  }
             *  if (Muramana2.IsOwned() && Muramana2.IsReady())
             *  {
             *      Muramana2.Cast();
             *  }
             * }
             * MuramanaTime = System.Environment.TickCount;
             */
            if (config.Item("you").GetValue <bool>() && Items.HasItem(youmuu.Id) && Items.CanUseItem(youmuu.Id) &&
                target != null && player.Distance(target) < player.AttackRange + 50 && target.HealthPercent < 65)
            {
                youmuu.Cast();
            }

            if (Items.HasItem(frost.Id) && Items.CanUseItem(frost.Id) && target != null &&
                config.Item("frost").GetValue <bool>())
            {
                if ((config.Item("frostmin").GetValue <Slider>().Value <= player.CountEnemiesInRange(2000) ||
                     target.HealthPercent < 40) &&
                    (target.HealthPercent < 40 && config.Item("frostlow").GetValue <bool>() ||
                     !config.Item("frostlow").GetValue <bool>()))
                {
                    frost.Cast(target);
                }
            }

            if (config.Item("Zhonya").GetValue <bool>())
            {
                if (((config.Item("Zhonyadmg").GetValue <Slider>().Value / 100f * player.Health <=
                      Program.IncDamages.GetAllyData(player.NetworkId).DamageTaken ||
                      Program.IncDamages.GetAllyData(player.NetworkId).DamageTaken > player.Health) ||
                     (Danger() && player.HealthPercent < 30)) && player.IsValidTarget(10, false))
                {
                    if (Items.HasItem(Zhonya.Id) && Items.CanUseItem(Zhonya.Id))
                    {
                        Zhonya.Cast();
                        return;
                    }
                    if (Items.HasItem(Wooglet.Id) && Items.CanUseItem(Wooglet.Id))
                    {
                        Wooglet.Cast();
                        return;
                    }
                }
            }

            if (config.Item("Seraph").GetValue <bool>())
            {
                if (((config.Item("SeraphdmgHP").GetValue <Slider>().Value / 100f * player.Health <=
                      Program.IncDamages.GetAllyData(player.NetworkId).DamageTaken ||
                      Program.IncDamages.GetAllyData(player.NetworkId).DamageTaken > player.Health) ||
                     (config.Item("SeraphdmgSh").GetValue <Slider>().Value / 100f * (150 + player.Mana * 0.2f) <=
                      Program.IncDamages.GetAllyData(player.NetworkId).DamageTaken)) || Danger())
                {
                    if (Items.HasItem(Seraph.Id) && Items.CanUseItem(Seraph.Id))
                    {
                        Seraph.Cast();
                    }
                    if (Items.HasItem(SeraphDom.Id) && Items.CanUseItem(SeraphDom.Id))
                    {
                        SeraphDom.Cast();
                    }
                }
            }
            if (Items.HasItem(solari.Id) && Items.CanUseItem(solari.Id) && config.Item("solari").GetValue <bool>())
            {
                if ((config.Item("solariminally").GetValue <Slider>().Value <= player.CountAlliesInRange(solari.Range) &&
                     config.Item("solariminenemy").GetValue <Slider>().Value <= player.CountEnemiesInRange(solari.Range)) ||
                    ObjectManager.Get <AIHeroClient>()
                    .FirstOrDefault(
                        h => h.IsAlly && !h.IsDead && solari.IsInRange(h) && CombatHelper.CheckCriticalBuffs(h)) !=
                    null ||
                    (Program.IncDamages.IncomingDamagesAlly.Any(
                         a => a.Hero.HealthPercent < 50 && (a.DamageTaken > 150 || a.DamageTaken > a.Hero.Health))))
                {
                    solari.Cast();
                }
            }
            if (Items.HasItem(mountain.Id) && Items.CanUseItem(mountain.Id) && config.Item("mountain").GetValue <bool>())
            {
                if (config.Item("castonme").GetValue <bool>() &&
                    ((player.Health / player.MaxHealth * 100f) < config.Item("mountainmin").GetValue <Slider>().Value ||
                     Program.IncDamages.GetAllyData(player.NetworkId).DamageTaken > player.Health) &&
                    (player.CountEnemiesInRange(700f) > 0 || CombatHelper.CheckCriticalBuffs(player)))
                {
                    mountain.Cast(player);
                    return;
                }
                var targ =
                    ObjectManager.Get <AIHeroClient>()
                    .Where(
                        h =>
                        h.IsAlly && !h.IsMe && !h.IsDead && player.Distance(h) < mountain.Range &&
                        config.Item("mountainpriority" + h.ChampionName).GetValue <Slider>().Value > 0 &&
                        ((h.Health / h.MaxHealth * 100f) < config.Item("mountainmin").GetValue <Slider>().Value ||
                         Program.IncDamages.GetAllyData(h.NetworkId).DamageTaken > h.Health));
                if (targ != null)
                {
                    var finaltarg =
                        targ.OrderByDescending(
                            t => config.Item("mountainpriority" + t.ChampionName).GetValue <Slider>().Value)
                        .ThenBy(t => t.Health)
                        .FirstOrDefault();
                    if (finaltarg != null &&
                        (finaltarg.CountEnemiesInRange(700f) > 0 || finaltarg.UnderTurret(true) ||
                         CombatHelper.CheckCriticalBuffs(finaltarg)))
                    {
                        mountain.Cast(finaltarg);
                    }
                }
            }
            if (config.Item("protoBelt").GetValue <bool>() && target != null && player.Distance(target) < 750)
            {
                if (config.Item("protoBeltEHealth").GetValue <Slider>().Value > target.HealthPercent &&
                    (player.Distance(target) > 150 ||
                     player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target)))
                {
                    if (Items.HasItem(ProtoBelt.Id) && Items.CanUseItem(ProtoBelt.Id))
                    {
                        var pred = Prediction.GetPrediction(
                            target, 0.25f, 100, 2000,
                            new[]
                        {
                            CollisionableObjects.Heroes, CollisionableObjects.Minions, CollisionableObjects.Walls,
                            CollisionableObjects.YasuoWall
                        });
                        if (pred.Hitchance >= HitChance.High)
                        {
                            ProtoBelt.Cast(pred.CastPosition);
                        }
                    }
                }
            }
            if (config.Item("glp").GetValue <bool>() && target != null && player.Distance(target) < 650)
            {
                if (config.Item("glpEHealth").GetValue <Slider>().Value > target.HealthPercent)
                {
                    if (Items.HasItem(GLP.Id) && Items.CanUseItem(GLP.Id))
                    {
                        var pred = Prediction.GetPrediction(
                            target, 0.25f, 100, 1500,
                            new[] { CollisionableObjects.Heroes, CollisionableObjects.YasuoWall });
                        if (pred.Hitchance >= HitChance.High)
                        {
                            GLP.Cast(pred.CastPosition);
                        }
                    }
                }
            }
            if (config.Item("QSSEnabled").GetValue <bool>())
            {
                UseCleanse(config, cleanseSpell);
            }
        }
Пример #2
0
        public static void UseItems(Obj_AI_Hero target, Menu config, float comboDmg = 0f, bool cleanseSpell = false)
        {
            if (config.Item("hyd").GetValue <bool>() && player.BaseSkinName != "Renekton")
            {
                castHydra(target);
            }
            if (config.Item("ran").GetValue <bool>() && Items.HasItem(randuins.Id) && Items.CanUseItem(randuins.Id))
            {
                if (target != null && player.Distance(target) < randuins.Range &&
                    player.CountEnemiesInRange(randuins.Range) >= config.Item("ranmin").GetValue <Slider>().Value)
                {
                    Items.UseItem(randuins.Id);
                }
            }
            if (config.Item("odin").GetValue <bool>() && target != null && Items.HasItem(odins.Id) &&
                Items.CanUseItem(odins.Id))
            {
                var odinDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.OdingVeils);
                if (config.Item("odinonlyks").GetValue <bool>())
                {
                    if (odinDmg > target.Health)
                    {
                        odins.Cast(target);
                    }
                }
                else if (player.CountEnemiesInRange(odins.Range) >= config.Item("odinmin").GetValue <Slider>().Value ||
                         (Math.Max(comboDmg, odinDmg) > target.Health && player.HealthPercent < 30 && player.Distance(target) < odins.Range &&
                          !CombatHelper.CheckCriticalBuffs(target)))
                {
                    odins.Cast();
                }
            }
            if (target != null && config.Item("bil").GetValue <bool>() && Items.HasItem(bilgewater.Id) &&
                Items.CanUseItem(bilgewater.Id))
            {
                var bilDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.Bilgewater);
                if (config.Item("bilonlyks").GetValue <bool>())
                {
                    if (bilDmg > target.Health)
                    {
                        bilgewater.Cast(target);
                    }
                }
                else if ((player.Distance(target) > config.Item("bilminr").GetValue <Slider>().Value&&
                          IsHeRunAway(target) && (target.Health / target.MaxHealth * 100f) < 40 &&
                          target.Distance(player) > player.AttackRange) ||
                         (Math.Max(comboDmg, bilDmg) > target.Health && (player.Health / player.MaxHealth * 100f) < 50))
                {
                    bilgewater.Cast(target);
                }
            }
            if (target != null && config.Item("botr").GetValue <bool>() && Items.HasItem(botrk.Id) &&
                Items.CanUseItem(botrk.Id))
            {
                var botrDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.Botrk);
                if (config.Item("botronlyks").GetValue <bool>())
                {
                    if (botrDmg > target.Health)
                    {
                        botrk.Cast(target);
                    }
                }
                else if ((player.Distance(target) > config.Item("botrminr").GetValue <Slider>().Value&&
                          (player.Health / player.MaxHealth * 100f) <
                          config.Item("botrmyhealth").GetValue <Slider>().Value&&
                          (target.Health / target.MaxHealth * 100f) <
                          config.Item("botrenemyhealth").GetValue <Slider>().Value) ||
                         (IsHeRunAway(target) && (target.Health / target.MaxHealth * 100f) < 40 &&
                          target.Distance(player) > player.AttackRange) ||
                         (Math.Max(comboDmg, botrDmg) > target.Health && (player.Health / player.MaxHealth * 100f) < 50))
                {
                    botrk.Cast(target);
                }
            }
            if (target != null && config.Item("hex").GetValue <bool>() && Items.HasItem(hexgun.Id) &&
                Items.CanUseItem(hexgun.Id))
            {
                var hexDmg = Damage.GetItemDamage(player, target, Damage.DamageItems.Hexgun);
                if (config.Item("hexonlyks").GetValue <bool>())
                {
                    if (hexDmg > target.Health)
                    {
                        hexgun.Cast(target);
                    }
                }
                else if ((player.Distance(target) > config.Item("hexminr").GetValue <Slider>().Value&&
                          IsHeRunAway(target) && (target.Health / target.MaxHealth * 100f) < 40 &&
                          target.Distance(player) > player.AttackRange) ||
                         (Math.Max(comboDmg, hexDmg) > target.Health && (player.Health / player.MaxHealth * 100f) < 50))
                {
                    hexgun.Cast(target);
                }
            }
            if (config.Item("Muramana").GetValue <bool>() &&
                ((!MuramanaEnabled && config.Item("MuramanaMinmana").GetValue <Slider>().Value < player.ManaPercent) ||
                 (MuramanaEnabled && config.Item("MuramanaMinmana").GetValue <Slider>().Value > player.ManaPercent)))
            {
                if (Muramana.IsOwned() && Muramana.IsReady())
                {
                    Muramana.Cast();
                }
                if (Muramana2.IsOwned() && Muramana2.IsReady())
                {
                    Muramana2.Cast();
                }
            }
            MuramanaTime = System.Environment.TickCount;
            if (config.Item("you").GetValue <bool>() && Items.HasItem(youmuu.Id) && Items.CanUseItem(youmuu.Id) &&
                target != null && player.Distance(target) < player.AttackRange + 50 && target.HealthPercent < 65)
            {
                youmuu.Cast();
            }

            if (Items.HasItem(frost.Id) && Items.CanUseItem(frost.Id) && target != null &&
                config.Item("frost").GetValue <bool>())
            {
                if (player.Distance(target) < frost.Range &&
                    (config.Item("frostmin").GetValue <Slider>().Value <= target.CountEnemiesInRange(225f) &&
                     ((target.Health / target.MaxHealth * 100f) < 40 && config.Item("frostlow").GetValue <bool>() ||
                      !config.Item("frostlow").GetValue <bool>())))
                {
                    frost.Cast(target);
                }
            }
            if (Items.HasItem(solari.Id) && Items.CanUseItem(solari.Id) && config.Item("solari").GetValue <bool>())
            {
                if ((config.Item("solariminally").GetValue <Slider>().Value <= player.CountAlliesInRange(solari.Range) &&
                     config.Item("solariminenemy").GetValue <Slider>().Value <= player.CountEnemiesInRange(solari.Range)) ||
                    ObjectManager.Get <Obj_AI_Hero>()
                    .FirstOrDefault(
                        h => h.IsAlly && !h.IsDead && solari.IsInRange(h) && CombatHelper.CheckCriticalBuffs(h)) !=
                    null)
                {
                    solari.Cast();
                }
            }
            if (Items.HasItem(mountain.Id) && Items.CanUseItem(mountain.Id) && config.Item("mountain").GetValue <bool>())
            {
                if (config.Item("castonme").GetValue <bool>() &&
                    (player.Health / player.MaxHealth * 100f) < config.Item("mountainmin").GetValue <Slider>().Value&&
                    (player.CountEnemiesInRange(700f) > 0 || CombatHelper.CheckCriticalBuffs(player)))
                {
                    mountain.Cast(player);
                    return;
                }
                var targ =
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(
                        h =>
                        h.IsAlly && !h.IsMe && !h.IsDead && player.Distance(h) < mountain.Range &&
                        config.Item("mountainpriority" + h.ChampionName).GetValue <Slider>().Value > 0 &&
                        (h.Health / h.MaxHealth * 100f) < config.Item("mountainmin").GetValue <Slider>().Value);
                if (targ != null)
                {
                    var finaltarg =
                        targ.OrderByDescending(
                            t => config.Item("mountainpriority" + t.ChampionName).GetValue <Slider>().Value)
                        .ThenBy(t => t.Health)
                        .FirstOrDefault();
                    if (finaltarg != null &&
                        (finaltarg.CountEnemiesInRange(700f) > 0 || finaltarg.UnderTurret(true) ||
                         CombatHelper.CheckCriticalBuffs(finaltarg)))
                    {
                        mountain.Cast(finaltarg);
                    }
                }
            }
            if (config.Item("QSSEnabled").GetValue <bool>())
            {
                UseCleanse(config, cleanseSpell);
            }
        }