internal static void Handle()
 {
     if (!Calls.IsFacing(ObjectManager.TargetObject.Pos))
     {
         Calls.TurnCharacter(ObjectManager.TargetObject.Pos);
     }
     if (HandleMovement)
     {
         if (ObjectManager.PlayerObject.isChanneling == 0 && !ObjectManager.IsCasting)
         {
             float disToTarget = ObjectManager.TargetObject.Pos.differenceToPlayer();
             if (disToTarget > BotTemplate.Engines.Data.fightRange)
             {
                 Ingame.moveForward();
             }
             else
             {
                 if (disToTarget > 0.8)
                 {
                     Calls.StopRunning();
                 }
                 else
                 {
                     if (!Calls.MovementIsOnly((uint)Offsets.movementFlags.Back))
                     {
                         Ingame.moveBackwards();
                     }
                 }
             }
         }
     }
 }
Example #2
0
        public override void Run()
        {
            if (MasterContainer.firstBool == false)
            {
                Calls.StopRunning();
                MasterContainer.firstBool = true;
                MasterContainer.someBool  = true;
            }
            else
            {
                if (Calls.MovementIsOnly((uint)Offsets.movementFlags.None) && MasterContainer.someBool == true)
                {
                    MasterContainer.secondBool = true;
                    MasterContainer.someBool   = false;
                }

                if (MasterContainer.secondBool == true)
                {
                    Ingame.moveBackwards();
                    moveBackTimer.Reset();
                    MasterContainer.thirdBool  = true;
                    MasterContainer.secondBool = false;
                }

                if (moveBackTimer.IsReady() && MasterContainer.thirdBool == true)
                {
                    Ingame.moveBackwards();
                    MasterContainer.thirdBool  = false;
                    MasterContainer.fourthBool = true;
                    ChooseRandom(out strafeStart, out strafeStop);
                    Calls.DoString(strafeStart);
                    strafeTimer.Reset();
                }

                if (MasterContainer.fourthBool == true && strafeTimer.IsReady())
                {
                    Calls.DoString(strafeStop);
                    MasterContainer.fifthBool  = true;
                    MasterContainer.fourthBool = false;
                }
            }

            if (MasterContainer.fifthBool == true)
            {
                MasterContainer.IsStuck = false;
                Calls.StopRunning();
                ResetBools();
            }

            //if (jumpTimer.IsReady())
            //{
            //    Ingame.Jump();
            //}
        }
Example #3
0
 protected void MoveBack()
 {
     Ingame.moveBackwards();
 }