예제 #1
0
        public override void OnFarm(Orbwalking.OrbwalkingMode mode)
        {
            if (!Menu.Item("QFarm").IsActive() || !Q.IsReady() || Q.HasManaCondition())
            {
                return;
            }

            var condition = mode == Orbwalking.OrbwalkingMode.LaneClear ? Menu.Item("QLC") : Menu.Item("QLH");

            if (condition == null || !condition.IsActive())
            {
                return;
            }

            var qMinions = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly);
            var killable = qMinions.FirstOrDefault(o => o.Health < Q.GetDamage(o));

            if (killable != null && !killable.CanAAKill() && Q.Cast(killable).IsCasted())
            {
                return;
            }

            var pixMinions = Pix.GetMinions();

            killable = pixMinions.FirstOrDefault(o => o.Health < Q.GetDamage(o));

            if (Pix.IsValid() && killable != null && !killable.CanAAKill() &&
                SpellManager.PixQ.Cast(killable).IsCasted())
            {
                return;
            }

            if (mode == Orbwalking.OrbwalkingMode.LastHit)
            {
                return;
            }

            var pos   = Q.GetLineFarmLocation(qMinions);
            var spell = Q;

            var pixPos = Pix.GetFarmLocation();

            if (Pix.IsValid() && pixPos.MinionsHit > pos.MinionsHit)
            {
                pos   = pixPos;
                spell = SpellManager.PixQ;
            }

            if (pos.MinionsHit > 2 && spell.Cast(pos.Position))
            {
            }
        }
예제 #2
0
파일: Lulu.cs 프로젝트: sadnecc/CHportcn
        public override void OnFarm()
        {
            if (!getKeyBindItem(qMenu, "QFarm") || !Q.IsReady() || Q.HasManaCondition())
            {
                return;
            }

            var condition = Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) ? getCheckBoxItem(qMenu, "QLC") : getCheckBoxItem(qMenu, "QLH");

            if (qMenu["QLC"] == null || qMenu["QLH"] == null || !condition)
            {
                return;
            }

            var qMinions = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly);
            var killable = qMinions.FirstOrDefault(o => o.Health < Q.GetDamage(o));

            if (killable != null && !killable.CanAAKill() && Q.Cast(killable).IsCasted())
            {
                return;
            }

            var pixMinions = Pix.GetMinions();

            killable = pixMinions.FirstOrDefault(o => o.Health < Q.GetDamage(o));

            if (Pix.IsValid() && killable != null && !killable.CanAAKill() &&
                SpellManager.PixQ.Cast(killable).IsCasted())
            {
                return;
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
            {
                return;
            }

            var pos   = Q.GetLineFarmLocation(qMinions);
            var spell = Q;

            var pixPos = Pix.GetFarmLocation();

            if (Pix.IsValid() && pixPos.MinionsHit > pos.MinionsHit)
            {
                pos   = pixPos;
                spell = SpellManager.PixQ;
            }

            if (pos.MinionsHit > 2 && spell.Cast(pos.Position))
            {
            }
        }