示例#1
0
        public static void DoWallJump()
        {
            if (Riven.QCount != 2)
            {
                NotificationHandler.ShowWarningAlert("You need 2 Q's!");
                return;
            }

            var point = VectorHelper.GetFirstWallPoint(Riven.Player.ServerPosition, Game.CursorPos, 20);

            if (point == null)
            {
                NotificationHandler.ShowInfo("No spot to jump to!");
                return;
            }

            if (Riven.E.IsReady())
            {
                Riven.E.Cast((Vector2)point);
            }
            else
            {
                EloBuddy.Player.IssueOrder(
                    GameObjectOrder.MoveTo,
                    Riven.Player.ServerPosition.Extend((Vector3)point, Riven.Player.BoundingRadius + 20));
            }

            LeagueSharp.Common.Utility.DelayAction.Add(500, () => Riven.Q.Cast((Vector2)point));
        }
示例#2
0
        public static void OnGameUpdate(EventArgs args)
        {
            // Set the extra delay here to save time
            Riven.QDelay = Riven.Menu.Item("QExtraDelay").GetValue <Slider>().Value;

            NotificationHandler.Update();

            if (Riven.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
            {
                Riven.Orbwalker.SetOrbwalkingPoint(new Vector3());
            }

            if (Riven.Ignite.IsReady())
            {
                IgniteKillSecure();
            }
            if (Environment.TickCount - Riven.LastQ >= 4000 - Game.Ping / 2 - Riven.Q.Delay * 1000 && Riven.QCount != 0 &&
                !Riven.Player.IsRecalling() && Riven.GetBool("KeepQAlive"))
            {
                Riven.Q.Cast(Game.CursorPos);
                NotificationHandler.ShowInfo("Saved Q!");
            }

            switch (Riven.Orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                DoCombo();
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                DoCombo(false);
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                DoWaveClear();
                break;
            }

            if (Riven.Menu.Item("FleeActive").IsActive())
            {
                Flee();
            }
        }
示例#3
0
        private static void IgniteKillSecure()
        {
            var targets = ObjectManager.Get <AIHeroClient>().Where(x => x.IsValidTarget(Riven.Ignite.Range));

            var objAiHeroes = targets as AIHeroClient[] ?? targets.ToArray();

            if (Riven.GetBool("IgniteKillable"))
            {
                var bestTarget =
                    objAiHeroes.Where(
                        x => Riven.Player.GetSummonerSpellDamage(x, Damage.SummonerSpell.Ignite) > x.Health)
                    .OrderByDescending(x => x.Distance(Riven.Player))
                    .FirstOrDefault();

                if (bestTarget != null)
                {
                    Riven.Ignite.CastOnUnit(bestTarget);
                    NotificationHandler.ShowInfo("Ignited " + bestTarget.ChampionName + "!");
                }
            }

            if (Riven.GetBool("IgniteKS"))
            {
                var bestTarget =
                    objAiHeroes.Where(
                        x => Riven.Player.GetSummonerSpellDamage(x, Damage.SummonerSpell.Ignite) / 5 > x.Health)
                    .OrderByDescending(x => x.Distance(Riven.Player))
                    .FirstOrDefault();

                if (bestTarget != null)
                {
                    Riven.Ignite.CastOnUnit(bestTarget);
                    NotificationHandler.ShowInfo("Ignited " + bestTarget.ChampionName + "!");
                }
            }
        }
示例#4
0
        private static void DoCombo(bool useR = true)
        {
            var target = TargetSelector.GetTarget(Riven.EWRange, TargetSelector.DamageType.Physical);

            if (!target.IsValidTarget())
            {
                Riven.Orbwalker.SetOrbwalkingPoint(new Vector3());
                return;
            }

            Riven.LastTarget = target;

            if (Riven.GetBool("FollowTarget") && Orbwalking.CanMove(0))
            {
                Riven.Orbwalker.SetOrbwalkingPoint(
                    target.Distance(Riven.Player) < Orbwalking.GetRealAutoAttackRange(Riven.Player)
                        ? new Vector3()
                        : target.ServerPosition);
            }

            if (Ghostblade.IsReady())
            {
                Ghostblade.Cast();
            }

            if (Riven.RActivated && Riven.CanWindSlash && useR)
            {
                UseWindSlash(target);
            }

            // Use R logic
            if (CanHardEngage(target) && !Riven.RActivated && Riven.R.IsReady() &&
                target.HealthPercentage() > Riven.Menu.Item("UseRPercent").GetValue <Slider>().Value&& useR &&
                Riven.GetBool("UseR" + Riven.Orbwalker.ActiveMode))
            {
                NotificationHandler.ShowInfo("Using R!");

                // E -> R
                if (Riven.E.IsReady())
                {
                    var distE = Riven.Player.ServerPosition.Extend(target.Position, Riven.E.Range);

                    if (Riven.GetBool("DontEIntoWall") && distE.IsWall())
                    {
                        return;
                    }

                    Riven.E.Cast(target.ServerPosition);
                    Riven.R.Cast(Riven.Player);
                }
                // Q -> Q -> E -> R -> Q
                else if (Riven.QCount == 2 && Riven.Q.IsReady() && Riven.E.IsReady())
                {
                    Riven.E.Cast();
                    Riven.R.Cast(target);
                }
                // R -> W
                else if (Riven.W.IsReady() && ObjectManager.Get <AIHeroClient>().Any(x => x.IsValidTarget(Riven.W.Range)))
                {
                    Riven.R.Cast(Riven.Player);
                    Riven.W.Cast();
                }
                else if (Riven.GetBool("UseRIfCantCancel"))
                {
                    Riven.R.Cast(Riven.Player);
                }
                else
                {
                    NotificationHandler.ShowInfo("Could not use R! (CD)");
                }
            }

            if (target.Distance(Riven.Player) < Riven.EWRange &&
                (!Riven.Q.IsReady() || target.Distance(Riven.Player) > Riven.Q.Range) && Riven.E.IsReady() &&
                Riven.W.IsReady() && Riven.GetBool("UseE" + Riven.Orbwalker.ActiveMode) &&
                Riven.GetBool("UseW" + Riven.Orbwalker.ActiveMode))
            {
                var distE = Riven.Player.ServerPosition.Extend(target.Position, Riven.E.Range);

                if (Riven.GetBool("DontEIntoWall") && distE.IsWall())
                {
                    return;
                }

                Riven.E.Cast(target.Position);
                CastCircleThing();
                CastW();
            }
            else if ((Hydra.IsReady() || Tiamat.IsReady()) && Riven.W.IsReady() &&
                     Riven.GetBool("UseW" + Riven.Orbwalker.ActiveMode))
            {
                CastCircleThing();
                CastW();
            }
            else if (Riven.W.IsReady() && Riven.GetBool("UseW" + Riven.Orbwalker.ActiveMode))
            {
                CastW();
            }
            else if (Riven.E.IsReady() && Riven.GetBool("GapcloseE"))
            {
                if (target.Distance(Riven.Player) < Orbwalking.GetRealAutoAttackRange(Riven.Player) &&
                    Riven.GetBool("DontEInAARange"))
                {
                    return;
                }

                var distE = Riven.Player.ServerPosition.Extend(target.Position, Riven.E.Range);

                if (Riven.GetBool("DontEIntoWall") && distE.IsWall())
                {
                    return;
                }

                Riven.E.Cast(target.Position);
            }
            else if (Riven.Q.IsReady() && Environment.TickCount - Riven.LastQ >= 2000 &&
                     Riven.Player.Distance(target) > Riven.Q.Range && Riven.GetBool("GapcloseQ"))
            {
                Riven.Q.Cast(target.Position);
            }
        }