Esempio n. 1
0
        private static void OnHarrass()
        {
            var enemiese = EntityManager.Heroes.Enemies.OrderByDescending
                               (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= R.Range);
            var enemiesq = EntityManager.Heroes.Enemies.OrderByDescending
                               (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= Q.Range);
            var target = TargetSelector.GetTarget(1900, DamageType.Magical);

            if (!target.IsValidTarget())
            {
                return;
            }

            if (E.IsReady() && target.IsValidTarget(E.Range))
            {
                foreach (var eenemies in enemiese)
                {
                    var useE = FappadredMenu.MyHarass["harass.E"
                                                      + eenemies.ChampionName].Cast <CheckBox>().CurrentValue;
                    if (useE)
                    {
                        E.Cast(eenemies);
                    }
                }
            }

            if (target.IsValidTarget(Q.Range) && Player.ManaPercent >= FappadredMenu.HarassQE())
            {
                foreach (var qenemies in enemiesq)
                {
                    var useQ = FappadredMenu.MyHarass["harass.Q"
                                                      + qenemies.ChampionName].Cast <CheckBox>().CurrentValue;
                    if (useQ)
                    {
                        Q.Cast(Game.CursorPos);
                    }
                }
            }
        }