Beispiel #1
0
        public static void Flee()
        {
            Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);

            var random = new Random().Next(500);

            if (SpellHandler.LastMove + 200 + random < Environment.TickCount && MenuHandler.Config.Item("streamMouse").GetValue <bool>())
            {
                SpellHandler.LastMove = Environment.TickCount;
                SmoothMouse.doMouseClick();
            }

            if (SH.Spells[SpellSlot.E].IsReady() && CH.LastQ + 250 < Environment.TickCount &&
                MenuHandler.GetMenuBool("EFlee"))
            {
                SH.CastE(Game.CursorPos);
            }

            if ((!SH.Spells[SpellSlot.Q].IsReady() || CH.LastE + 250 >= Environment.TickCount ||
                 !MenuHandler.GetMenuBool("QFlee")))
            {
                return;
            }

            if ((MenuHandler.Config.Item("Ward Mechanic").GetValue <bool>() && CheckHandler.QCount == 2))
            {
                return;
            }

            SH.CastQ();
        }
Beispiel #2
0
        public static void CastR2(Obj_AI_Base target)
        {
            var r2 = new Spell(SpellSlot.R, 900);

            r2.SetSkillshot(0.25f, 45, 1200, false, SkillshotType.SkillshotCone);
            SmoothMouse.addMouseEvent(target.Position);
            r2.Cast(target);
        }
Beispiel #3
0
 public static void CastFlash(Vector3 pos)
 {
     if (!SummonerDictionary[SummonerSpell.Flash].IsReady())
     {
         return;
     }
     SmoothMouse.addMouseEvent(pos);
     Player.Spellbook.CastSpell(SummonerDictionary[SummonerSpell.Flash], pos);
 }
Beispiel #4
0
 private static void Flash()
 {
     if (!S.SummonerDictionary[SpellHandler.SummonerSpell.Flash].IsReady() || !FlashPos.IsValid())
     {
         Queue.Remove("Flash");
         return;
     }
     SmoothMouse.addMouseEvent(FlashPos);
     SpellHandler.CastFlash(FlashPos);
 }
Beispiel #5
0
 private static void Aa()
 {
     if (StateHandler.Target == null || StateHandler.Target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(Player) + 100 || CheckHandler.MidAa)
     {
         Remove("AA");
         return;
     }
     Player.IssueOrder(GameObjectOrder.AttackUnit, StateHandler.Target);
     SmoothMouse.addMouseEvent(Game.CursorPos, true);
 }
Beispiel #6
0
        public static void CastIgnite(Obj_AI_Hero target)
        {
            if (!SummonerDictionary[SummonerSpell.Ignite].IsReady())
            {
                return;
            }

            SmoothMouse.addMouseEvent(target.Position);
            Player.Spellbook.CastSpell(SummonerDictionary[SummonerSpell.Ignite], target);
        }
Beispiel #7
0
        public static void Jump()
        {
            if (CheckHandler.QCount != 2)
            {
                SpellHandler.CastQ();
                return;
            }

            if (InitJump && SelectedPos != null && !Jumping)
            {
                Jumping = true;
                if (!SpellHandler.Spells[SpellSlot.E].IsReady())
                {
                    SmoothMouse.addMouseEvent(SelectedPos.DirectionPos, true);
                    ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, SelectedPos.DirectionPos);
                    Utility.DelayAction.Add(
                        100 + Game.Ping / 2,
                        () => { SmoothMouse.addMouseEvent(SelectedPos.JumpPos, true); ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, SelectedPos.JumpPos); });
                    Utility.DelayAction.Add(
                        300 + Game.Ping / 2, () =>
                    {
                        SpellHandler.CastQ();
                        Jumping = false;
                    });
                }
                else
                {
                    SmoothMouse.addMouseEvent(SelectedPos.DirectionPos);
                    ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, SelectedPos.DirectionPos);
                    Utility.DelayAction.Add(100 + Game.Ping / 2, () => { SpellHandler.CastE(SelectedPos.JumpPos); });
                    Utility.DelayAction.Add(
                        200 + Game.Ping / 2, () =>
                    {
                        SpellHandler.CastQ();
                        Jumping = false;
                    });
                }

                InitJump = false;
            }

            if (InitJump || Jumping)
            {
                return;
            }

            SelectedPos = null;
            foreach (var jumpPos in AllJumpPos.Where(jumpPos => ObjectManager.Player.Distance(jumpPos.JumpPos) < 80))
            {
                SelectedPos = jumpPos;
                InitJump    = true;
                break;
            }
        }
Beispiel #8
0
        public static void CastE(Vector3 pos)
        {
            if (!Spells[SpellSlot.E].IsReady())
            {
                return;
            }

            SmoothMouse.addMouseEvent(pos);

            Spells[SpellSlot.E].Cast(pos);
        }
Beispiel #9
0
 public static void CastQ(Obj_AI_Base target = null)
 {
     if (!Spells[SpellSlot.Q].IsReady())
     {
         return;
     }
     if (target != null)
     {
         SmoothMouse.addMouseEvent(target.Position);
     }
     Spells[SpellSlot.Q].Cast(target != null ? target.Position : Game.CursorPos, true);
 }
Beispiel #10
0
        private static void Qr()
        {
            if (!S.Spells[SpellSlot.Q].IsReady() || C.RState)
            {
                Queue.Remove("R");
                return;
            }

            if (S.Spells[SpellSlot.R].IsReady())
            {
                S.CastR();
                SmoothMouse.addMouseEvent(Player.Position.Extend(Game.CursorPos, 300), false);
            }
        }
Beispiel #11
0
        private static void Game_OnGameStart()
        {
            if (ObjectManager.Player.ChampionName != "Riven")
            {
                return;
            }

            MenuHandler.InitMenu();
            CheckHandler.Init();
            Player         = ObjectManager.Player;
            Game.OnUpdate += Game_OnGameUpdate;
            Game.OnUpdate += eventArgs => StateHandler.Tick();
            Obj_AI_Base.OnProcessSpellCast += CheckHandler.Obj_AI_Hero_OnProcessSpellCast;
            Obj_AI_Base.OnProcessSpellCast += AutoE.autoE;
            Drawing.OnDraw += DrawHandler.Draw;
            JumpHandler.Load();
            SmoothMouse.start();
        }
Beispiel #12
0
        private static void Qq()
        {
            if (!CheckHandler.MidAa)
            {
                return;
            }

            if (!S.Spells[SpellSlot.Q].IsReady())
            {
                Queue.Remove("Q");
                return;
            }

            if (S.Spells[SpellSlot.Q].IsReady())
            {
                S.CastQ(StateHandler.Target);
                SmoothMouse.addMouseEvent(Player.Position.Extend(Game.CursorPos, 300));
            }
        }
Beispiel #13
0
        private static void Qe()
        {
            if (!CheckHandler.MidAa)
            {
                return;
            }

            if (!S.Spells[SpellSlot.E].IsReady() || !EPos.IsValid())
            {
                Queue.Remove("E");
                return;
            }

            if (S.Spells[SpellSlot.E].IsReady())
            {
                S.CastE(StateHandler.Target.IsValidTarget() ? StateHandler.Target.Position : EPos);
                SmoothMouse.addMouseEvent(StateHandler.Target.IsValidTarget() ? StateHandler.Target.Position : EPos, false);
            }
        }
Beispiel #14
0
        public static void AnimCancel(Obj_AI_Base target)
        {
            if (!CheckHandler.CanMove || MenuHandler.Config.Item("flee").GetValue <KeyBind>().Active ||
                MenuHandler.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None)
            {
                return;
            }

            var pos2 = Player.Position.Extend(Game.CursorPos, 400);

            if (target.IsValidTarget())
            {
                pos2 = Player.Position.Extend(target.ServerPosition, 540);
                SmoothMouse.addMouseEvent(pos2, true);
            }


            Player.IssueOrder(GameObjectOrder.MoveTo, pos2);
        }
Beispiel #15
0
        private static void Qw()
        {
            if (!CheckHandler.MidAa)
            {
                return;
            }

            if (!S.Spells[SpellSlot.W].IsReady())
            {
                Queue.Remove("W");
                return;
            }

            if (S.Spells[SpellSlot.W].IsReady())
            {
                S.CastW(StateHandler.Target);
                SmoothMouse.addMouseEvent(Game.CursorPos);
            }
        }
Beispiel #16
0
        private static void Qr2()
        {
            if (!S.Spells[SpellSlot.R].IsReady() || R2Target == null)
            {
                Queue.Remove("R2");
                return;
            }

            if (!S.Spells[SpellSlot.R].IsReady() || !C.RState || !R2Target.IsValidTarget())
            {
                return;
            }

            var r2 = new Spell(SpellSlot.R, 900);

            r2.SetSkillshot(0.25f, 45, 1200, false, SkillshotType.SkillshotCone);
            r2.Cast(R2Target);

            SmoothMouse.addMouseEvent(R2Target.Position, false);
        }
Beispiel #17
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            if (MenuHandler.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None && MenuHandler.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo && MenuHandler.Config.Item("streamMouse").GetValue <bool>())
            {
                var random = new Random().Next(500);
                if (SpellHandler.LastMove + 200 + random < Environment.TickCount && CheckHandler.CanMove)
                {
                    SpellHandler.LastMove = Environment.TickCount;
                    SmoothMouse.doMouseClick();
                }
            }
            if (Queuer.Queue.Count > 0)
            {
                Queuer.DoQueue();
            }

            if (MenuHandler.Config.Item("logPos").GetValue <bool>())
            {
                JumpHandler.AddPos();
                MenuHandler.Config.Item("logPos").SetValue(false);
            }

            if (MenuHandler.Config.Item("printPos").GetValue <bool>())
            {
                JumpHandler.PrintToConsole();
                MenuHandler.Config.Item("printPos").SetValue(false);
            }

            if (MenuHandler.Config.Item("clearCurrent").GetValue <bool>())
            {
                JumpHandler.ClearCurrent();
                MenuHandler.Config.Item("clearCurrent").SetValue(false);
            }

            if (MenuHandler.Config.Item("clearPrevious").GetValue <bool>())
            {
                JumpHandler.ClearPrevious();
                MenuHandler.Config.Item("clearPrevious").SetValue(false);
            }

            CheckHandler.Checks();
            var config = MenuHandler.Config;


            if (MenuHandler.GetMenuBool("keepQAlive") && SH.Spells[SpellSlot.Q].IsReady() && CheckHandler.QCount >= 1 &&
                Environment.TickCount - CheckHandler.LastQ > 3650 && !Player.IsRecalling())
            {
                SH.CastQ();
            }
            if (config.Item("jungleCombo").GetValue <KeyBind>().Active)
            {
                StateHandler.JungleFarm();
            }
            if (config.Item("harass").GetValue <KeyBind>().Active)
            {
                StateHandler.Harass();
            }
            else if (config.Item("normalCombo").GetValue <KeyBind>().Active)
            {
                StateHandler.MainCombo();
            }

            else if (config.Item("burstCombo").GetValue <KeyBind>().Active)
            {
                StateHandler.BurstCombo();
            }
            else if (config.Item("waveClear").GetValue <KeyBind>().Active)
            {
                StateHandler.Laneclear();
            }
            else if (config.Item("lastHit").GetValue <KeyBind>().Active)
            {
                StateHandler.LastHit();
            }
            else if (config.Item("flee").GetValue <KeyBind>().Active)
            {
                StateHandler.Flee();
            }
            else
            {
                MenuHandler.Orbwalker.SetAttack(true);
                MenuHandler.Orbwalker.SetMovement(true);
                SmoothMouse.queuePos.Clear();
                Utility.DelayAction.Add(
                    2000, () =>
                {
                    if (
                        !(config.Item("flee").GetValue <KeyBind>().Active ||
                          config.Item("lastHit").GetValue <KeyBind>().Active ||
                          config.Item("waveClear").GetValue <KeyBind>().Active ||
                          config.Item("burstCombo").GetValue <KeyBind>().Active ||
                          config.Item("normalCombo").GetValue <KeyBind>().Active ||
                          config.Item("jungleCombo").GetValue <KeyBind>().Active))
                    {
                        Queuer.Queue = new List <string>();
                    }
                });
            }
        }
Beispiel #18
0
        public static void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            var spell = args.SData;

            if (!sender.IsMe)
            {
                return;
            }

            if (spell.Name == "ItemTiamatCleave")
            {
                LastTiamat = Environment.TickCount;
            }

            if (!MidQ && spell.Name.Contains("RivenBasicAttack"))
            {
                LastAa           = Environment.TickCount;
                LastTiamatCancel = Environment.TickCount + (int)ObjectManager.Player.AttackCastDelay;
                LastPassive      = Environment.TickCount;
                if (PassiveStacks >= 1)
                {
                    PassiveStacks = PassiveStacks - 1;
                }

                MidAa   = true;
                CanMove = false;
                CanAa   = false;
                SmoothMouse.addMouseEvent(args.Target.Position, true);
            }

            if (spell.Name.Contains("RivenTriCleave"))
            {
                Queuer.Remove("Q");
                LastQ            = Environment.TickCount;
                LastPassive      = Environment.TickCount;
                LastECancelSpell = Environment.TickCount + 50;
                if (PassiveStacks <= 2)
                {
                    PassiveStacks = PassiveStacks + 1;
                }

                if (QCount <= 1)
                {
                    LastQ2 = Environment.TickCount;
                    QCount = QCount + 1;
                }
                else if (QCount == 2)
                {
                    QCount = 0;
                }

                Utility.DelayAction.Add(350, Orbwalking.ResetAutoAttackTimer);
                Utility.DelayAction.Add(40, () => SH.AnimCancel(StateHandler.Target));

                MidQ           = true;
                CanMove        = false;
                CanQ           = false;
                FullComboState = 0;
                BurstFinished  = true;
            }

            if (spell.Name.Contains("RivenMartyr"))
            {
                Queuer.Remove("W");
                Utility.DelayAction.Add(40, () => SH.AnimCancel(StateHandler.Target));
                LastW            = Environment.TickCount;
                LastPassive      = Environment.TickCount;
                LastECancelSpell = Environment.TickCount + 50;
                LastTiamatCancel = Environment.TickCount + (int)ObjectManager.Player.AttackCastDelay;
                if (LastPassive <= 2)
                {
                    PassiveStacks = PassiveStacks + 1;
                }

                MidW           = true;
                CanW           = false;
                FullComboState = 2;
            }

            if (spell.Name.Contains("RivenFeint"))
            {
                Queuer.Remove("E");
                Queuer.EPos      = new Vector3();
                LastE            = Environment.TickCount;
                PassiveStacks    = Environment.TickCount;
                LastTiamatCancel = Environment.TickCount + 50;
                if (LastPassive <= 2)
                {
                    PassiveStacks = PassiveStacks + 1;
                }

                MidE = true;
                CanE = false;
            }

            if (spell.Name.Contains("RivenFengShuiEngine"))
            {
                RState = true;
                Queuer.Remove("R");
                LastFr           = Environment.TickCount;
                LastPassive      = Environment.TickCount;
                LastECancelSpell = Environment.TickCount + 50;
                if (PassiveStacks <= 2)
                {
                    PassiveStacks = PassiveStacks + 1;
                }

                FullComboState = 1;
            }

            if (spell.Name.Contains("rivenizunablade"))
            {
                RState = false;
                Queuer.Remove("R2");
                Queuer.R2Target = null;
                LastPassive     = Environment.TickCount;
                if (PassiveStacks <= 2)
                {
                    PassiveStacks = PassiveStacks + 1;
                }

                LastR2         = Environment.TickCount;
                CanSr          = false;
                FullComboState = 3;
            }
        }