Code: Select all
sub move
;===============================================
; Script Name: Move to Something
; Author: MMorning
; Version: 2.3
; Client Tested with: 4.0.10b
; EUO version tested with: 1.42 (00A5)
; Shard OSI / FS: OSI / FS
; Revision Date: 05June03
; Public Release: 05June03
; Global Variables Used: N/A
; Purpose: move to something you want to get close to.
; param %1 ; -WC ; for world coords or ToObject ; to move an objetc
; %2 world coords X or item type
; %3 world coords Y or search_range
; %4 world coords z
; example: to move to an object:
; call movesub.txt move ToObject %item %search_range
; gosub move ToObject %item %search_range
; example: to move to world coords
; call movesub.txt move -WC x_coords y_coords z_coords
; gosub move -WC x_cords y_coords z_coords
;===============================================
deleteJournal
set %J_CantGetThere Can't_get_there
set %found_x -1
set %found_y -1
set %found_z -1
;
if %0 >= 3
{
if %1 = ToObject
{
finditem %2 G_ , %3
wait 1s
if #findkind <> -1
{
set %Found_X #findx
set %Found_y #findy
set %found_z #findz
}
}
if %1 = -wc
{
set %found_x %2
set %found_y %3
set %found_z #findz
if %0 >= 4
{
set %found_z %4
}
}
if %found_X >= 0
{
moveloop:
Set %J_Index #JINDEX
set %dx #charposx - %found_x abs
set %dy #charposy - %found_y abs
if %dx => 2 || %dy => 2 ||
{
event pathfind %found_X %found_y
wait 1s
for %find_loop %J_Index #jindex
{
Scanjournal %findloop
if %J_CantGetThere in #journal
return
}
goto moveloop
}
}
}
return
Как вызвать ету бегалку в уо? Для бегания к координатам