示例#1
0
        public double GetDamageAfterTime(Obj_AI_Base target, BuffInstance buff, float time)
        {
            var damage         = GetdTotalBuffDamage(target, buff);
            var nextStackCount = 1 * Math.Max(1, time);

            if (Stacks != Time && Stacks < Time)
            {
                if (buff.EndTime - buff.StartTime - Time + time > CombatHelper.GetBuffTime(buff))
                {
                    nextStackCount = 1;
                }
                else
                {
                    nextStackCount = 0;
                }
            }
            if (buff.Name == "tristanaechargesound" && buff.Count >= 3)
            {
                nextStackCount = 1;
            }
            return(damage / Stacks * nextStackCount);
        }
示例#2
0
 public static bool isDangerousSpell(string spellName,
                                     Obj_AI_Hero target,
                                     Obj_AI_Hero sender,
                                     Vector3 end,
                                     float spellRange,
                                     bool highDmg = true)
 {
     if (spellName == "CurseofTheSadMummy")
     {
         if (player.Distance(sender.Position) <= 600f)
         {
             return(true);
         }
     }
     if (CombatHelper.IsFacing(target, player.Position) &&
         (spellName == "EnchantedCrystalArrow" || spellName == "rivenizunablade" ||
          spellName == "EzrealTrueshotBarrage" || spellName == "JinxR" || spellName == "sejuaniglacialprison"))
     {
         if (player.Distance(sender.Position) <= spellRange - 60)
         {
             return(true);
         }
     }
     if (spellName == "InfernalGuardian" || spellName == "UFSlash" ||
         (spellName == "RivenW" && player.HealthPercent < 25))
     {
         if (player.Distance(end) <= 270f)
         {
             return(true);
         }
     }
     if (spellName == "BlindMonkRKick" || spellName == "SyndraR" || spellName == "VeigarPrimordialBurst" ||
         spellName == "AlZaharNetherGrasp" || spellName == "LissandraR")
     {
         if (target.IsMe)
         {
             return(true);
         }
     }
     if (spellName == "TristanaR" || spellName == "ViR")
     {
         if (target.IsMe || player.Distance(target.Position) <= 100f)
         {
             return(true);
         }
     }
     if (spellName == "GalioIdolOfDurand")
     {
         if (player.Distance(sender.Position) <= 600f)
         {
             return(true);
         }
     }
     if (target != null && target.IsMe)
     {
         if (CombatHelper.isTargetedCC(spellName, highDmg) && spellName != "NasusW" && spellName != "ZedUlt")
         {
             return(true);
         }
     }
     return(false);
 }
示例#3
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);
            }
        }
示例#4
0
 /// <summary>
 ///     Orbwalk a target while moving to Position.
 /// </summary>
 public static void Orbwalk(AttackableUnit target,
                            Vector3 position,
                            float extraWindup         = 90,
                            float holdAreaRadius      = 0,
                            bool useFixedDistance     = true,
                            bool randomizeMinDistance = true,
                            bool autoWindup           = false,
                            bool meleePrediction      = true,
                            bool movement             = true)
 {
     try
     {
         if (autoWindup)
         {
             extraWindup = 25 + Game.Ping * (1.4f + Player.AttackCastDelay * 2);
         }
         if (target.IsValidTarget() && CanAttack())
         {
             DisableNextAttack = false;
             FireBeforeAttack(target);
             if (!DisableNextAttack)
             {
                 if (!NoCancelChamps.Contains(Player.ChampionName))
                 {
                     LastAATick = Utils.GameTimeTickCount + Game.Ping + 100 -
                                  (int)(ObjectManager.Player.AttackCastDelay * 1000f);
                     _missileLaunched = false;
                 }
                 Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                 _lastTarget = target;
                 return;
             }
         }
         if (!movement)
         {
             return;
         }
         if (CanMove(extraWindup))
         {
             if (player.IsMelee() && meleePrediction && target != null &&
                 target.Position.Distance(player.Position) < GetAutoAttackRange(player, target) &&
                 target is Obj_AI_Hero && Game.CursorPos.Distance(target.Position) < 450)
             {
                 Obj_AI_Hero tar        = (Obj_AI_Hero)target;
                 var         prediction = AutoAttack.GetPrediction((Obj_AI_Base)target);
                 var         pos        = prediction.UnitPosition;
                 if (player.Distance(target) > target.BoundingRadius &&
                     !CombatHelper.IsFacing((Obj_AI_Base)target, player.Position, 120f) && tar.IsMoving)
                 {
                     AutoAttack.Delay = player.BasicAttack.SpellCastTime;
                     AutoAttack.Speed = player.BasicAttack.MissileSpeed;
                     MoveTo(pos, holdAreaRadius, false, useFixedDistance, randomizeMinDistance);
                 }
             }
             else
             {
                 MoveTo(position, holdAreaRadius, false, useFixedDistance, randomizeMinDistance);
             }
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e.ToString());
     }
 }
示例#5
0
        private void Game_OnUpdate(EventArgs args)
        {
            float time = System.Environment.TickCount;

            foreach (Positions enemyInfo in Enemies.Where(x => x.Player.IsVisible && !x.Player.IsDead && !player.IsDead)
                     )
            {
                enemyInfo.LastSeen = time;
                var prediction = Prediction.GetPrediction(enemyInfo.Player, 4);
                if (prediction != null)
                {
                    enemyInfo.predictedpos = prediction.UnitPosition;
                }
            }
            if (!configMenu.Item("UseR").GetValue <bool>() || !R.IsReady() || !enabled)
            {
                return;
            }
            foreach (Positions enemy in
                     Enemies.Where(
                         x =>
                         x.Player.IsValid <AIHeroClient>() && !x.Player.IsDead &&
                         !configMenu.Item(x.Player.ChampionName + "DontUltRandomUlt").GetValue <bool>() &&
                         x.RecallData.Recall.Status == Packet.S2C.Teleport.Status.Start &&
                         x.RecallData.Recall.Type == Packet.S2C.Teleport.Type.Recall)
                     .OrderBy(x => x.RecallData.GetRecallTime()))
            {
                if (!checkdmg(enemy.Player))
                {
                    continue;
                }
                var dist = (Math.Abs(enemy.LastSeen - enemy.RecallData.RecallStartTime) / 1000 * enemy.Player.MoveSpeed) -
                           enemy.Player.MoveSpeed / 3;
                var     line = getpos(enemy, dist);
                Vector3 pos  = line;
                if (enemy.Player.IsVisible)
                {
                    pos = enemy.Player.Position;
                }
                else
                {
                    var trueDist = Math.Abs(enemy.LastSeen - enemy.RecallData.RecallStartTime) / 1000 *
                                   enemy.Player.MoveSpeed;

                    if (dist > 1500)
                    {
                        return;
                    }
                    pos =
                        CombatHelper.PointsAroundTheTarget(enemy.Player.Position, trueDist)
                        .Where(
                            p =>
                            !p.IsWall() && line.Distance(p) < dist &&
                            Environment.Map.GetPath(enemy.Player, p) < trueDist)
                        .OrderByDescending(p => NavMesh.IsWallOfGrass(p, 10))
                        .ThenBy(p => line.Distance(p))
                        .FirstOrDefault();
                }
                if (pos != null)
                {
                    kill(enemy, new Vector3(pos.X, pos.Y, 0));
                }
            }
        }
示例#6
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);
            }
        }