Пример #1
0
        private static void OnCombo()
        {
            var enemiesq = EntityManager.Heroes.Enemies.OrderByDescending
                               (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= Q.Range);
            var enemiesr = EntityManager.Heroes.Enemies.OrderByDescending
                               (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= R.Range);
            var enemiesw = EntityManager.Heroes.Enemies.OrderByDescending
                               (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= W.Range);
            var enemies = EntityManager.Heroes.Enemies.OrderByDescending
                              (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= E.Range);
            var target = TargetSelector.GetTarget(1900, DamageType.Magical);


            if (R.IsReady() && target.IsValidTarget(R.Range) && !target.IsInvulnerable && target.CountEnemiesInRange(R.Range) <= OwlsticksMenu.ComboR2())
            {
                foreach (var ultenemies in enemiesr)
                {
                    var useR = OwlsticksMenu.MyCombo["combo.r"
                                                     + ultenemies.ChampionName].Cast <CheckBox>().CurrentValue;
                    if (useR)
                    {
                        R.Cast(ultenemies.Position);
                    }
                }
            }

            if (E.IsReady() && target.IsValidTarget(E.Range))
            {
                foreach (var eenemies in enemies)
                {
                    var useE = OwlsticksMenu.MyCombo["combo.e"
                                                     + eenemies.ChampionName].Cast <CheckBox>().CurrentValue;
                    if (useE)
                    {
                        E.Cast(eenemies);
                    }
                }
            }

            if (Q.IsReady() && target.IsValidTarget(Q.Range))
            {
                foreach (var qenemies in enemiesq)
                {
                    var useQ = OwlsticksMenu.MyCombo["combo.Q"
                                                     + qenemies.ChampionName].Cast <CheckBox>().CurrentValue;
                    if (useQ)
                    {
                        Q.Cast(qenemies);
                    }
                }
            }

            if (W.IsReady() && target.IsValidTarget(W.Range))
            {
                foreach (var healenemies in enemiesw)
                {
                    var useW = OwlsticksMenu.MyCombo["combo.w"
                                                     + healenemies.ChampionName].Cast <CheckBox>().CurrentValue;

                    if (useW)
                    {
                        W.Cast(healenemies);
                    }
                }
            }

            if ((ObjectManager.Player.CountEnemiesInRange(ObjectManager.Player.AttackRange) >=
                 OwlsticksMenu.YoumusEnemies() || Player.HealthPercent >= OwlsticksMenu.ItemsYoumuShp()) &&
                MyActivator.Youmus.IsReady() && OwlsticksMenu.Youmus() && MyActivator.Youmus.IsOwned())
            {
                MyActivator.Youmus.Cast();
                return;
            }
            if (Player.HealthPercent <= OwlsticksMenu.BilgewaterHp() && OwlsticksMenu.Bilgewater() &&
                MyActivator.Bilgewater.IsReady() && MyActivator.Bilgewater.IsOwned())
            {
                MyActivator.Bilgewater.Cast(target);
                return;
            }

            if (Player.HealthPercent <= OwlsticksMenu.BotrkHp() && OwlsticksMenu.Botrk() && MyActivator.Botrk.IsReady() &&
                MyActivator.Botrk.IsOwned())
            {
                MyActivator.Botrk.Cast(target);
            }

            if (Player.HealthPercent <= OwlsticksMenu.ZhonyaHP() && OwlsticksMenu.Zhonya() &&
                Player.CountEnemiesInRange(800) >= OwlsticksMenu.ZhonyaEnemies() && MyActivator.Zhonya.IsReady() && MyActivator.Zhonya.IsOwned())
            {
                MyActivator.Zhonya.Cast();
            }
        }