Exemple #1
0
        private void CheckLaneClearExtra()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                return;
            }

            if (GetTarget != null && GetTarget.Distance(me) > me.GetAutoAttackRange() && GetTarget.Distance(me) <= Spells.E.Range &&
                Prediction.Health.GetPrediction(GetTarget, Spells.E.CastDelay + (int)(Orbwalker.AttackDelay * 1000)) > 0 &&
                Orbwalker.CanAutoAttack && !Spells.W.IsReady() && !Spells.Hydra.IsReady() && !Spells.Tiamat.IsReady() && RivenMenu.IsEnabled("E"))
            {
                Spells.ForceE(GetTarget.Position.To2D());
            }

            bool couldQ = Spells.Q.IsReady() && RivenMenu.IsEnabled("Q");
            bool couldW = RivenMenu.IsEnabled("W") && Spells.W.IsReady();
            bool couldH = RivenMenu.IsEnabled("H") && (Spells.Hydra.IsReady() || Spells.Tiamat.IsReady());
            bool couldE = Spells.E.IsReady() && RivenMenu.IsEnabled("E");

            if (couldW || couldH)
            {
                var minRadius = Spells.W.IsReady() ? Spells.W.Range : Spells.Hydra.Range;
                var location  = Farming.GetBestFarmLocation(minRadius, couldE ? Spells.E.Range : 0);
                if (location.HasValue)
                {
                    Spells.ForceE(location.Value);
                    if (couldH)
                    {
                        Spells.ForceItem();
                    }

                    ClearTick1 = Environment.TickCount;
                    ClearBool1 = true;
                    if (!couldH) /*skip to faster w usage*/
                    {
                        ClearTick1 -= 250;
                    }
                }
            }

            if (Environment.TickCount - ClearTick1 >= 250 && ClearBool1)
            {
                if (couldW)
                {
                    Spells.ForceW();
                }
                ClearBool1 = false;
            }

            if (Farming.CanKillMinionWithQ() && couldQ)
            {
                var min = Farming.GetQKillableMinion();
                if (!me.IsInAutoAttackRange(min))
                {
                    Spells.ForceQ(min.Position.To2D());
                }
            }

            //if (Farming.GetMinionsInQ() > 1)
            //    Spells.ForceQ();
        }