Пример #1
0
        private static void OnLaneClear()
        {
            var count =
                EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Player.ServerPosition,
                                                                Player.AttackRange, false).Count();
            var source =
                EntityManager.MinionsAndMonsters.GetLaneMinions().OrderBy(a => a.MaxHealth).FirstOrDefault(a => a.IsValidTarget(Q.Range));

            if (count == 0)
            {
                return;
            }
            if (source == null)
            {
                return;
            }
            if (E.IsReady() && FappadredMenu.LcE() &&
                Player.ManaPercent >= FappadredMenu.LcM())
            {
                E.Cast(source);
            }
            if (W.IsReady() && FappadredMenu.LcW() &&
                Player.ManaPercent >= FappadredMenu.LcM() &&
                FappadredMenu.LcW1() <= count)
            {
                W.Cast();
            }
            if (Q.IsReady() && Player.ManaPercent >= FappadredMenu.LcM() &&
                FappadredMenu.LcQ1() <= count)
            {
                if (FappadredMenu.LcQ() && FappadredMenu.LcQ2() && source.IsValidTarget(Q.Range) &&
                    Player.GetSpellDamage(source, SpellSlot.Q) >= source.Health && !source.IsDead)
                {
                    Q.Cast(Game.CursorPos);
                }

                if (Q.IsReady() && FappadredMenu.LcQ() && !FappadredMenu.LcQ2() && source.IsValidTarget(Q.Range))
                {
                    Q.Cast(Game.CursorPos);
                }
            }
        }