Okay Im using this...
If _GetX($handle, $pBase) = Round($XCoord) and _Gety($handle, $pBase) = Round($yCoord) and _Getz($handle, $pBase) = Round($zCoord)Then
_Move($handle, $XCoord, $YCoord, $ZCoord)
Endif
It never does the _Move Function...
Okay Im using this...
If _GetX($handle, $pBase) = Round($XCoord) and _Gety($handle, $pBase) = Round($yCoord) and _Getz($handle, $pBase) = Round($zCoord)Then
_Move($handle, $XCoord, $YCoord, $ZCoord)
Endif
It never does the _Move Function...
Take your x y coords, take the desired x y coords, apply some Magic (simple maths) to calculate the distance to them, if within x distance, gowhatever()
Somet like that?Code:$myx = _GetX($handle, $pBase) $myy = _Gety($handle, $pBase) $desiredx = $XCoord $desiredy = $YCoord If $myx - $desiredx = 1 Then If $myy - $desiredy = 1 Then _Move($handle, $XCoord, $YCoord, $ZCoord) EndIf EndIf
Func _WoWDistance($cordx, $cordy, $ProPID)
$posx = _MEMORYREAD($PTRPLAYERX, $HPROCESS, "float")
$posy = _MEMORYREAD($PTRPLAYERY, $HPROCESS, "float")
$dis = Sqrt(($cordx - $posx) ^ 2 + ($cordy - $posy) ^ 2)
Return $dis
EndFunc ;==>_WoWDistance
Func _WoWDistance([x coord you want to go], [y coord you want to go], $ProPID)
$posx = [read your own x coord from mem]
$posy = [read your own y coord from mem]
$dis = Sqrt(($cordx - $posx) ^ 2 + ($cordy - $posy) ^ 2) <- magic maths applied
Return $dis <-- returns the distance between your position and your desired position.
EndFunc ;==>_WoWDistance
then it is a simple matter to keep calculating this distance while moving...and if the distance is smaller than [x amount] then moveOn()...
dim $myDistanceToNextWaypoint = _WoWDistance($waypointcoord1X, $waypointcoord1Y)
Last edited by arthanos2; 09-23-2009 at 07:25 PM.
do
move()
$randomdistance = _WoWDistance($toX, $toY)
until $randomdistance < 5
next
nvm... I did it like this:
$desiredcoords = _WoWDistance($XCoord, $YCoord)
If $desiredcoords < 5 Then
_Move($handle, $XCoord, $YCoord, $ZCoord)
endif