SHARE
TWEET

Untitled

a guest Aug 20th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Func _findNextCamp($posPlayer, $arrCampsX, $arrCampsY)
  2.  
  3.     Local $posCurrent
  4.     Local $posShortest
  5.     Local $iDistanceCurrent = 1
  6.     Local $iDistanceShortest = 1
  7.  
  8.     For $i = 0 To UBound($arrCampsX) - 1
  9.         $posCurrent = _buildPoint($arrCampsX[$i], $arrCampsY[$i])
  10.         $iDistanceCurrent = _calculatePointDistance($posPlayer, $posCurrent)
  11.         _tt("Current Distance: " &$iDistanceCurrent)
  12.         Sleep(1000)
  13.         If Int($iDistanceShortest) >= Int($iDistanceCurrent) Then
  14.             $iDistanceShortest = $iDistanceCurrent
  15.             $posShortest = $posCurrent
  16.             _tt("Distance Updated")
  17.             Sleep(1000)
  18.         EndIf
  19.     Next
  20.  
  21.     Return $posShortest
  22. EndFunc   ;==>_findNextCamp
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top