예제 #1
0
        private static void JungleClear(AttackableUnit tar)
        {
            var target = tar as Obj_AI_Minion;

            if (target != null && target.IsValidTarget(400) && target.Health > Me.GetAutoAttackDamage(target, true) &&
                !target.Name.Contains("Plant"))
            {
                if (MenuInit.JungleClearItem && Riven.UseItem())
                {
                    return;
                }

                if (MenuInit.JungleClearQ && Q.IsReady() && target.IsValidTarget(400) && Riven.CastQ(target))
                {
                    return;
                }

                if (MenuInit.JungleClearW && W.IsReady() && target.IsValidTarget(W.Range) && W.Cast(true))
                {
                    return;
                }

                if (MenuInit.JungleClearE && E.IsReady() && target.IsValidTarget(400))
                {
                    E.Cast(Game.CursorPos, true);
                }
            }
        }
예제 #2
0
        private static void Harass(AttackableUnit tar)
        {
            AIHeroClient target = null;

            if (myTarget.IsValidTarget())
            {
                target = myTarget;
            }
            else if (tar is AIHeroClient)
            {
                target = (AIHeroClient)tar;
            }

            if (target != null && target.IsValidTarget())
            {
                if (MenuInit.HarassQ && Q.IsReady())
                {
                    if (MenuInit.HarassMode == 0)
                    {
                        if (qStack == 1)
                        {
                            Riven.CastQ(target);
                        }
                    }
                    else
                    {
                        Riven.CastQ(target);
                    }
                }
            }
        }
예제 #3
0
        private static void EQFlashBurst(AIHeroClient target)
        {
            if (Riven.UseItem())
            {
                return;
            }

            if (R.IsReady() && isRActive)
            {
                var rPred = R.GetPrediction(target, true);

                if (rPred.Hitchance >= HitChance.VeryHigh && R.Cast(rPred.CastPosition, true))
                {
                    return;
                }
            }

            if (Q.IsReady() && Riven.CastQ(target))
            {
                return;
            }

            if (W.IsReady() && target.IsValidTarget(W.Range) && W.Cast(true))
            {
                return;
            }

            if (E.IsReady())
            {
                E.Cast(target.Position, true);
            }
        }
예제 #4
0
        private static void OnGameLoad(EventArgs Args)
        {
            if (ObjectManager.Player.ChampionName != "Riven")
            {
                return;
            }

            Riven.LoadAssembly();
        }
예제 #5
0
        private static void EQFlashBurst(AIHeroClient target)
        {
            if (MenuInit.BurstDot && IgniteSlot != SpellSlot.Unknown && Ignite.IsReady() &&
                Ignite.Cast(target, true) == Spell.CastStates.SuccessfullyCasted)
            {
                return;
            }

            if (target.IsValidTarget(W.Range) && W.Cast(true))
            {
                return;
            }

            if (MenuInit.BurstFlash && FlashSlot != SpellSlot.Unknown && Flash.IsReady())
            {
                if (qStack < 2 && Utils.TickCount - lastQTime >= 850 && Q.Cast(Game.CursorPos, true))
                {
                    return;
                }

                if (qStack == 2 && E.IsReady() && R.IsReady() && !isRActive && W.IsReady() &&
                    target.IsValidTarget(E.Range + Flash.Range + Q.Range - 100))
                {
                    E.Cast(target.Position, true);
                    LeagueSharp.Common.Utility.DelayAction.Add(10 + Game.Ping, () => R.Cast(true));
                    LeagueSharp.Common.Utility.DelayAction.Add(50 + Game.Ping, () => Flash.Cast(target.Position, true));
                    LeagueSharp.Common.Utility.DelayAction.Add(61 + Game.Ping, () => Riven.UseItem());
                    LeagueSharp.Common.Utility.DelayAction.Add(62 + Game.Ping, () => Q.Cast(target.Position, true));
                    LeagueSharp.Common.Utility.DelayAction.Add(70 + Game.Ping, () => W.Cast(true));
                    LeagueSharp.Common.Utility.DelayAction.Add(71 + Game.Ping, () => R.Cast(target.Position, true));
                }
            }
            else if (target.IsValidTarget(E.Range + Q.Range + Q.Range + Q.Range))
            {
                if (qStack < 2 && Utils.TickCount - lastQTime >= 850 && Q.Cast(Game.CursorPos, true))
                {
                    return;
                }

                if (qStack == 2 && E.IsReady() && R.IsReady() && !isRActive && W.IsReady() &&
                    target.IsValidTarget(E.Range + Q.Range - 100))
                {
                    E.Cast(target.Position, true);
                    LeagueSharp.Common.Utility.DelayAction.Add(10 + Game.Ping, () => R.Cast(true));
                    LeagueSharp.Common.Utility.DelayAction.Add(50 + Game.Ping, () => Q.Cast(target.Position, true));
                    LeagueSharp.Common.Utility.DelayAction.Add(61 + Game.Ping, () => Riven.UseItem());
                    LeagueSharp.Common.Utility.DelayAction.Add(62 + Game.Ping, () => W.Cast(true));
                    LeagueSharp.Common.Utility.DelayAction.Add(70 + Game.Ping, () => R.Cast(target.Position, true));
                }
            }
        }
예제 #6
0
        private static void Combo(AttackableUnit tar)
        {
            AIHeroClient target = null;

            if (myTarget.IsValidTarget())
            {
                target = myTarget;
            }
            else if (tar is AIHeroClient)
            {
                target = (AIHeroClient)tar;
            }

            if (target != null && target.IsValidTarget(400))
            {
                if (MenuInit.ComboItem && Riven.UseItem())
                {
                    return;
                }

                if (MenuInit.ComboR2 != 3 && R.IsReady() && isRActive && qStack == 2 && Q.IsReady() && Riven.R2Logic(target))
                {
                    return;
                }

                if (Q.IsReady() && target.IsValidTarget(400))
                {
                    Riven.CastQ(target);
                    return;
                }

                if (MenuInit.ComboW && W.IsReady() && target.IsValidTarget(W.Range) && !Riven.HaveShield(target))
                {
                    W.Cast(true);
                    return;
                }

                if (MenuInit.ComboE && !Q.IsReady() && !W.IsReady() && E.IsReady() && target.IsValidTarget(400))
                {
                    E.Cast(target.Position, true);
                    return;
                }

                if (MenuInit.ComboR && R.IsReady() && !isRActive)
                {
                    Riven.R1Logic(target);
                }
            }
        }
예제 #7
0
        private static void Flee()
        {
            if (MenuInit.FleeW && W.IsReady() && HeroManager.Enemies.Any(
                    x => x.DistanceToPlayer() <= W.Range && !Riven.HaveShield(x)) && W.Cast(true))
            {
                return;
            }

            if (MenuInit.FleeE && E.IsReady() &&
                ((!Q.IsReady() && qStack == 0) || qStack == 2) &&
                E.Cast(Me.Position.Extend(Game.CursorPos, E.Range), true))
            {
                return;
            }

            if (MenuInit.FleeQ && Q.IsReady() && !Me.IsDashing())
            {
                Q.Cast(Me.Position.Extend(Game.CursorPos, 350f), true);
            }
        }
예제 #8
0
        private static void Combo(GameObjectProcessSpellCastEventArgs Args)
        {
            if (Args.SData == null)
            {
                return;
            }

            AIHeroClient target = null;

            target = myTarget.IsValidTarget() ? myTarget : TargetSelector.GetTarget(600f, TargetSelector.DamageType.Physical);

            if (target != null && target.IsValidTarget(600f))
            {
                if (Args.SData.Name == "RivenFeint")
                {
                    if (MenuInit.ComboR && R.IsReady() && !isRActive && target.IsValidTarget(600f))
                    {
                        Riven.R1Logic(target);
                    }
                }
            }
        }
예제 #9
0
        private static void EQFlashBurst(AIHeroClient target, GameObjectProcessSpellCastEventArgs Args)
        {
            if (Args.SData.Name == "RivenIzunaBlade" || Args.SData.Name.Contains("RivenWindslash"))
            {
                if (Q.IsReady() && target.IsValidTarget(400) && Q.Cast(target.Position, true))
                {
                    return;
                }
            }

            if (Args.SData.Name == "RivenMartyr")
            {
                if (MenuInit.ComboR && R.IsReady() && isRActive && R.Cast(target.Position, true))
                {
                    return;
                }

                if (Q.IsReady() && target.IsValidTarget(400) && Riven.CastQ(target))
                {
                    return;
                }
            }

            if (Args.SData.Name == "ItemTiamatCleave")
            {
                if (W.IsReady() && target.IsValidTarget(W.Range))
                {
                    W.Cast(true);
                    return;
                }

                if (Q.IsReady() && target.IsValidTarget(400))
                {
                    Riven.CastQ(target);
                }
            }
        }
예제 #10
0
        private static void LaneClear(AttackableUnit tar)
        {
            var target = tar as Obj_AI_Minion;

            if (target != null && target.IsValidTarget())
            {
                if (MenuInit.LaneClearItem && MinionManager.GetMinions(Me.Position, 400).Count >= 2 && Riven.UseItem())
                {
                    return;
                }

                if (MenuInit.LaneClearQ && Q.IsReady())
                {
                    var minions = MinionManager.GetMinions(target.Position, 400);

                    if (minions.Count >= 2)
                    {
                        var qFarm =
                            MinionManager.GetBestCircularFarmLocation(minions.Select(x => x.Position.To2D()).ToList(),
                                                                      Q.Width, Q.Range);

                        if (qFarm.MinionsHit >= 2)
                        {
                            Q.Cast(qFarm.Position, true);
                        }
                    }
                }
            }
        }
예제 #11
0
        private static void Combo(GameObjectProcessSpellCastEventArgs Args)
        {
            if (Args.SData == null)
            {
                return;
            }

            AIHeroClient target = null;

            if (myTarget.IsValidTarget())
            {
                target = myTarget;
            }
            else if (Args.Target is AIHeroClient)
            {
                target = (AIHeroClient)Args.Target;
            }

            if (target != null && target.IsValidTarget(400))
            {
                #region After Timat Logic

                if (Args.SData.Name == "ItemTiamatCleave")
                {
                    if (MenuInit.ComboW && W.IsReady() && target.IsValidTarget(W.Range))
                    {
                        W.Cast(true);
                        return;
                    }

                    if (Q.IsReady() && target.IsValidTarget(400) && Riven.CastQ(target))
                    {
                        return;
                    }
                }
                #endregion

                #region After W Logic

                if (Args.SData.Name == "RivenMartyr")
                {
                    if (MenuInit.ComboR && R.IsReady() && !isRActive && Riven.R1Logic(target))
                    {
                        return;
                    }

                    if (Q.IsReady() && target.IsValidTarget(400) && Riven.CastQ(target))
                    {
                        return;
                    }
                }
                #endregion

                #region After R Logic

                if (Args.SData.Name == "RivenFengShuiEngine")
                {
                    if (MenuInit.ComboW && W.IsReady() && target.IsValidTarget(W.Range))
                    {
                        W.Cast(true);
                        return;
                    }
                }
                #endregion

                #region After R1 Logic

                if (Args.SData.Name == "RivenIzunaBlade" || Args.SData.Name.Contains("RivenWindslash") && qStack == 2)
                {
                    if (Q.IsReady() && target.IsValidTarget(400))
                    {
                        Q.Cast(target.Position, true);
                    }
                }
                #endregion
            }
        }
예제 #12
0
        private static void Combo()
        {
            var target = myTarget.IsValidTarget()
                ? myTarget
                : TargetSelector.GetTarget(800f, TargetSelector.DamageType.Physical);

            if (target != null && target.IsValidTarget(800f))
            {
                if (MenuInit.ComboDot && IgniteSlot != SpellSlot.Unknown && Ignite.IsReady() &&
                    target.IsValidTarget(Ignite.Range) &&
                    (target.Health < DamageCalculate.GetComboDamage(target) ||
                     target.Health < DamageCalculate.GetIgniteDmage(target)) &&
                    Ignite.Cast(target, true) == Spell.CastStates.SuccessfullyCasted)
                {
                    return;
                }

                if (MenuInit.ComboYoumuu && Items.HasItem(3142) && Items.CanUseItem(3142) &&
                    target.IsValidTarget(580) && Items.UseItem(3142))
                {
                    return;
                }

                if (MenuInit.ComboR && R.IsReady() && !isRActive &&
                    target.Health <= DamageCalculate.GetComboDamage(target) &&
                    target.IsValidTarget(600f) && Riven.R1Logic(target))
                {
                    return;
                }

                if (MenuInit.ComboR2 != 3 && R.IsReady() && isRActive && Riven.R2Logic(target))
                {
                    return;
                }

                if (MenuInit.ComboQGap && Q.IsReady() && Utils.TickCount - lastQTime > 3600 && !Me.IsDashing() &&
                    target.IsValidTarget(480) && target.DistanceToPlayer() > Orbwalking.GetRealAutoAttackRange(Me))
                {
                    var pred = Prediction.GetPrediction(target, Q.Delay);

                    if (pred.UnitPosition != Vector3.Zero &&
                        (pred.UnitPosition.DistanceToPlayer() < target.DistanceToPlayer() ||
                         pred.UnitPosition.Distance(target.Position) <= target.DistanceToPlayer()) &&
                        Riven.CastQ(target))
                    {
                        return;
                    }
                }

                if (MenuInit.ComboEGap && E.IsReady() && target.IsValidTarget(600) &&
                    target.DistanceToPlayer() > Orbwalking.GetRealAutoAttackRange(Me) + 50)
                {
                    E.Cast(target.Position, true);
                }

                if (MenuInit.ComboWLogic && W.IsReady() && target.IsValidTarget(W.Range))
                {
                    if (!Q.IsReady() && qStack == 0 && W.Cast(true))
                    {
                        return;
                    }

                    if (!target.IsFacing(Me) && W.Cast(true))
                    {
                        return;
                    }

                    if (Q.IsReady() && qStack > 0 && W.Cast(true))
                    {
                        return;
                    }

                    if (Me.HasBuff("RivenFeint"))
                    {
                        W.Cast(true);
                    }
                }
            }
        }
예제 #13
0
        private static void Harass()
        {
            var target = myTarget ??
                         TargetSelector.GetTarget(E.Range + Me.BoundingRadius, TargetSelector.DamageType.Physical);

            if (target.IsValidTarget())
            {
                if (MenuInit.HarassMode == 0)
                {
                    if (E.IsReady() && MenuInit.HarassE && qStack == 2)
                    {
                        var pos = Me.Position + (Me.Position - target.Position).Normalized() * E.Range;

                        E.Cast(Me.Position.Extend(pos, E.Range), true);
                    }

                    if (Q.IsReady() && MenuInit.HarassQ && qStack == 2)
                    {
                        var pos = Me.Position + (Me.Position - target.Position).Normalized() * E.Range;

                        LeagueSharp.Common.Utility.DelayAction.Add(100, () => Q.Cast(Me.Position.Extend(pos, Q.Range), true));
                    }

                    if (W.IsReady() && MenuInit.HarassW && target.IsValidTarget(W.Range) && qStack == 1)
                    {
                        W.Cast(true);
                    }

                    if (Q.IsReady() && MenuInit.HarassQ)
                    {
                        if (qStack == 0)
                        {
                            Riven.CastQ(target);
                            Orbwalker.ForceTarget(target);
                        }

                        if (qStack == 1 && Utils.TickCount - lastQTime > 600)
                        {
                            Riven.CastQ(target);
                            Orbwalker.ForceTarget(target);
                        }
                    }
                }
                else
                {
                    if (E.IsReady() && MenuInit.HarassE &&
                        target.DistanceToPlayer() <= E.Range + (Q.IsReady() ? Q.Range : Me.AttackRange))
                    {
                        E.Cast(target.Position, true);
                    }

                    if (Q.IsReady() && MenuInit.HarassQ && target.IsValidTarget(Q.Range) && qStack == 0 &&
                        Utils.TickCount - lastQTime > 500)
                    {
                        Riven.CastQ(target);
                        Orbwalker.ForceTarget(target);
                    }

                    if (W.IsReady() && MenuInit.HarassW && target.IsValidTarget(W.Range) && (!Q.IsReady() || qStack == 1))
                    {
                        W.Cast(true);
                    }
                }
            }
        }