コード例 #1
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;
            }
        }
コード例 #2
0
ファイル: JumpHandler.cs プロジェクト: ramonstro2323/FARepo
        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;
            }
        }