Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.57 KB | None | 0 0
  1. Func MoveTo($x, $y, $random = 50)
  2.     Local $iBlocked = 0
  3.  
  4.     $cbType = "float"
  5.  
  6.     MoveEx($x, $y, $random)
  7.     CmdCB($CA_GETCOORDS, -2)
  8.     Do
  9.         Sleep(1500)
  10.         $oldCoords = $cbVar
  11.         $cbType = "int"
  12.         CmdCB($CA_GETDEAD)
  13.         If $cbVar[0] = 1 Then Return
  14.         $cbType = "float"
  15.         CmdCB($CA_GETCOORDS, -2)
  16.         If $oldCoords[0] = $cbVar[0] AND $oldCoords[1] = $cbVar[1] Then
  17.             $iBlocked += 1
  18.  
  19.             Cmd($CA_ZoneMap, $MAP_TOPK)
  20.  
  21.             WaitForLoad()
  22.  
  23.             ExitLoop[2]
  24.  
  25.         EndIf
  26.     Until ComputeDistance($cbVar[0], $cbVar[1], $x, $y) < 250 OR $iBlocked > 15
  27.     ConsoleWrite($iBlocked&@CRLF)
  28. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement