BattleNet.ClientlessBot.MoveTo C# (CSharp) Method

MoveTo() public method

public MoveTo ( Coordinate target ) : void
target Coordinate
return void
        public void MoveTo(Coordinate target)
        {
            int time = Time();
            if (time - BotGameData.LastTeleport > 5)
            {
                SendPacket(0x5f, BitConverter.GetBytes((UInt16)target.X), BitConverter.GetBytes((UInt16)target.Y));
                BotGameData.LastTeleport = time;
                Thread.Sleep(120);
            }
            else
            {
                double distance = BotGameData.Me.Location.Distance(target);
                SendPacket(0x03, BitConverter.GetBytes((UInt16)target.X), BitConverter.GetBytes((UInt16)target.Y));
                Thread.Sleep((int)(distance * 80));
            }
            BotGameData.Me.Location = target;
        }

Same methods

ClientlessBot::MoveTo ( UInt16 x, UInt16 y ) : void