예제 #1
0
파일: Riven.cs 프로젝트: tekintr/Elobuddy
 private void CheckJungleClearExtra()
 {
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) && GetTarget != null && GetTarget.Distance(me) <= 300 &&
         !EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, me.Position, 600).Any(x => x.Equals(GetTarget)))
     {
         if (!Orbwalker.CanAutoAttack && RivenMenu.IsEnabled("E") && GetTarget.Health < GetTarget.MaxHealth)
         {
             Spells.ForceE(Game.CursorPos.To2D());
         }
     }
 }
예제 #2
0
파일: Riven.cs 프로젝트: tekintr/Elobuddy
 private void CheckFlee()
 {
     if (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Flee && LastLeftClickPos.IsZero)
     {
         if (!Spells.E.IsReady())
         {
             Spells.ForceQ();
         }
         else
         {
             Spells.ForceE(Game.CursorPos.To2D());
         }
     }
 }
예제 #3
0
파일: Riven.cs 프로젝트: tekintr/Elobuddy
        private void CheckInstantSpells()
        {
            float facingAngle   = GetTarget.Direction.To2D().Perpendicular().AngleBetween(me.Direction.To2D().Perpendicular());
            bool  isRunningAway = facingAngle < 25;

            if (!RivenMenu.Combo["burstKey"].Cast <KeyBind>().CurrentValue&& Spells.E.IsReady() &&
                Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo && RivenMenu.Combo["EGap"].Cast <CheckBox>().CurrentValue)
            {
                if (Prediction.Position.PredictUnitPosition(GetTarget, Spells.E.CastDelay).Distance(me) < Spells.E.Range + me.GetAutoAttackRange() &&
                    GetTarget.Distance(me) > me.GetAutoAttackRange())
                {
                    Spells.ForceE(GetTarget.Position.To2D());
                }
            }
            else if (!RivenMenu.Combo["burstKey"].Cast <KeyBind>().CurrentValue&& Spells.Q.IsReady() && !Spells.E.IsReady() &&
                     Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo && RivenMenu.Combo["QGap"].Cast <CheckBox>().CurrentValue)
            {
                if (Farming.GetQCone().IsInside(Prediction.Position.PredictUnitPosition(GetTarget, Spells.Q.CastDelay)) &&
                    GetTarget.Distance(me) > me.GetAutoAttackRange() && isRunningAway)
                {
                    Spells.ForceQ(GetTarget.Position.To2D());
                }
            }
            else if (isRunningAway && RivenMenu.Combo["QGap"].Cast <CheckBox>().CurrentValue&&
                     RivenMenu.Combo["EGap"].Cast <CheckBox>().CurrentValue&&
                     Spells.Q.IsReady() && Spells.E.IsReady() &&
                     Prediction.Position.PredictUnitPosition(GetTarget, Spells.E.CastDelay).Distance(me) >
                     Spells.E.Range + me.GetAutoAttackRange() &&
                     Prediction.Position.PredictUnitPosition(GetTarget, Spells.E.CastDelay + Spells.Q.CastDelay)
                     .Distance(me) <= Spells.Q.Range + Spells.E.Range + me.GetAutoAttackRange())
            {
                Spells.ForceE(GetTarget.Position.To2D());
                Core.DelayAction(Spells.ForceQ, Spells.E.CastDelay);
            }

            bool laneClear = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, me.Position, 750).Any() &&
                             Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear);

            if (RivenMenu.Combo["InstaW"].Cast <CheckBox>().CurrentValue&& Spells.W.IsReady() && !laneClear)
            {
                var pred = Prediction.Position.PredictUnitPosition(GetTarget, Spells.W.CastDelay /*+ 250*/);
                if (pred.Distance(Player.Instance) <= Spells.W.Range)
                {
                    Spells.ForceItem();
                    Core.DelayAction(Spells.ForceW, 250);
                }
            }
        }
예제 #4
0
파일: Riven.cs 프로젝트: tekintr/Elobuddy
        private void DashOnOnDash(Obj_AI_Base sender, Dash.DashEventArgs dashEventArgs)
        {
            if (!sender.IsMe)
            {
                return;
            }

            var slot = !Spells.E.IsReady() ? SpellSlot.E : SpellSlot.Q;

            CastType currentCastType = CastType.NONE;

            if (slot == SpellSlot.Q)
            {
                LastQ           = Environment.TickCount;
                currentCastType = CastType.Q;
            }
            if (slot == SpellSlot.E)
            {
                currentCastType = CastType.E;
            }

            CastType?nextCast = RivenMenu.GetNextCastTyoe(currentCastType);

            if (nextCast == null || GetTarget == null)
            {
                return;
            }

            switch (nextCast)
            {
            case CastType.Q: Spells.ForceQ(GetTarget.Position.To2D()); break;

            case CastType.W: Spells.ForceW(); break;

            case CastType.E: Spells.ForceE(GetTarget.Position.To2D()); break;

            case CastType.R1: Spells.ForceR1(); break;

            case CastType.R2: TryR2Cast(); break;

            case CastType.H: Spells.ForceItem(); break;

            case CastType.F: Spells.ForceFlash(TargetSelector.SelectedTarget.Position.To2D()); break;
            }
        }
예제 #5
0
파일: Riven.cs 프로젝트: tekintr/Elobuddy
        private void OnSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            CastType currentCastType = CastType.NONE;

            if (args.SData.Name.Contains("BasicAttack"))
            {
                currentCastType = CastType.AA;

                if (ObjectManager.Get <Obj_AI_Turret>().Any(x => me.Distance(x) <= me.GetAutoAttackRange() + x.BoundingRadius + 200))
                {
                    Spells.ForceQ();
                }

                if (me.GetAutoAttackDamage(args.Target as Obj_AI_Base) >= (args.Target as Obj_AI_Base).Health)
                {
                    return;
                }
            }
            if (args.Slot == SpellSlot.W)
            {
                currentCastType = CastType.W;
            }
            if (args.SData.Name.Contains("RivenFengShuiEngine")) //firstR
            {
                currentCastType = CastType.R1;
                LastRTick       = Environment.TickCount;
            }
            if (args.SData.Name.Contains("RivenIzunaBlade")) //secondR
            {
                currentCastType = CastType.R2;
                RivenMenu.Combo["burstKey"].Cast <KeyBind>().CurrentValue = false;
            }
            if (args.SData.Name.Contains("ItemTiamatCleave"))
            {
                currentCastType = CastType.H;
            }
            if (args.SData.Name.ToLower().Contains("flash"))
            {
                currentCastType = CastType.F;
            }

            if (currentCastType == CastType.NONE)
            {
                return;
            }

            if (GetTarget == null)
            {
                return;
            }

            CastType?nextCast = RivenMenu.GetNextCastTyoe(currentCastType);

            if (nextCast == null)
            {
                return;
            }

            switch (nextCast)
            {
            case CastType.Q: Spells.ForceQ(GetTarget.Position.To2D()); break;

            case CastType.W: Spells.ForceW(); break;

            case CastType.E: Spells.ForceE(GetTarget.Position.To2D()); break;

            case CastType.R1: Spells.ForceR1(); break;

            case CastType.R2: TryR2Cast(); break;

            case CastType.H: Spells.ForceItem(); break;

            case CastType.F: Spells.ForceFlash(TargetSelector.SelectedTarget.Position.To2D()); break;
            }
        }
예제 #6
0
파일: Riven.cs 프로젝트: tekintr/Elobuddy
        private void CheckWallJumpSpots()
        {
            int qStacks = me.Buffs.FirstOrDefault(b => b.Name == "RivenTriCleave")?.Count ?? 0;

            if (!LastLeftClickPos.IsZero && (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Flee || TriggerWallJumpByDoubleClick) &&
                NearestPreMoveSpot.IsZero && NearestJumpSpot.IsZero)
            {
                var bestSpot = WallJumpData.WallJumpSpots.OrderBy(x => x.Key.Distance(LastLeftClickPos)).First();
                NearestJumpSpot = bestSpot.Key;
                JumpSpotEnd     = bestSpot.Value;

                float extraTurnRange = !Spells.E.IsReady() ? 150 : 0;
                var   preMove        = bestSpot.Value.Extend(bestSpot.Key, bestSpot.Key.Distance(bestSpot.Value) + extraTurnRange);
                NearestPreMoveSpot = preMove;

                WaitPrePos  = true;
                WaitMainPos = true;
            }

            if (WaitPrePos && !NearestPreMoveSpot.IsZero && me.Distance(NearestPreMoveSpot) > 80)
            {
                if (qStacks < 2 && me.Distance(NearestPreMoveSpot) > Spells.Q.Range)
                {
                    Spells.Q.Cast(me.Position);
                }
                Orbwalker.DisableMovement = true;
                Player.IssueOrder(GameObjectOrder.MoveTo, NearestPreMoveSpot.To3D());
            }
            else if (WaitPrePos && !NearestPreMoveSpot.IsZero && me.Distance(NearestPreMoveSpot) <= 80)
            {
                NearestPreMoveSpot = Vector2.Zero;
                WaitPrePos         = false;
            }

            if (!WaitPrePos && WaitMainPos && !NearestJumpSpot.IsZero && me.Distance(NearestJumpSpot) > 80)
            {
                Orbwalker.DisableMovement = true;
                Player.IssueOrder(GameObjectOrder.MoveTo, NearestJumpSpot.To3D());
            }
            else if (!WaitPrePos && WaitMainPos && !NearestJumpSpot.IsZero && me.Distance(NearestJumpSpot) <= 80)
            {
                Spells.ForceE(JumpSpotEnd);
                Orbwalker.DisableMovement = true;
                WaitMainPos   = false;
                CanQ3WallJump = true;
            }

            //if (CanQ3WallJump && qStacks == 2 && !Spells.E.IsReady())
            //Chat.Print(CanQ3WallJump && qStacks == 2 && !Spells.E.IsReady());
            else if (CanQ3WallJump)
            {
                if (qStacks < 2)
                {
                    Spells.Q.Cast(me.Position);
                }
                else
                {
                    Core.DelayAction(() => Spells.Q.Cast(me.Position), (int)(Spells.E.CastDelay + (float)Spells.E.Range / Spells.E.Speed * 1000f));
                }
            }

            if (CanQ3WallJump && qStacks == 0)
            {
                Orbwalker.DisableMovement = false;
                LastLeftClickPos          = Vector2.Zero;
                NearestJumpSpot           = Vector2.Zero;
                NearestPreMoveSpot        = Vector2.Zero;
                WaitPrePos    = false;
                WaitMainPos   = false;
                CanQ3WallJump = false;
                TriggerWallJumpByDoubleClick = false;
            }
        }
예제 #7
0
파일: Riven.cs 프로젝트: tekintr/Elobuddy
        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();
        }