Code:
;-----------------------------------------------------------------
;--------------------------NMY------------------------------------
sub chase()
If uo.getglobal('chase')=='On' then
uo.setglobal ('chase',0)
uo.print(' !!! -= Chase Terminated =- !!! ')
uo.exec('Terminate chase')
else
uo.setglobal('chase','On')
uo.print(' !!! -= Chasing =- !!! ')
endif
VAR target
target = uo.getserial('lasttarget')
while not uo.dead() and target<>"" and uo.getdistance(target)
if UO.GetDistance(target)>-1 then
uo.say('')
Chaser(target)
endif
wend
uo.setglobal('chase',0)
uo.print(' !!! -= Chasing ended =- !!! ')
end sub
;-----------------------------------------------------------------
sub Chaser(Target)
VAR dx, dy
While 1
If Target<>"" and not uo.dead() Then
dx=UO.GetX(Target)-UO.GetX()
dy=UO.GetY(Target)-UO.GetY()
If UO.GetDistance(Target)<0 Then
return
Endif
else
Return
Endif
If dx<>0 AND dy<>0 Then
If dx>0 AND dy>0 Then
UO.Press(40) ; DownArrow
Endif
If dx>0 AND dy<0 Then
UO.Press(39) ; RightArrow
Endif
If dx<0 AND dy>0 Then
UO.Press(37) ; LeftArrow
Endif
If dx<0 AND dy<0 Then
UO.Press(38) ; UpArrow
Endif
Endif
If dx<>0 AND dy==0 Then
If dx>0 Then
UO.Press(34) ; PgDown
Endif
If dx<0 Then
UO.Press(36) ; Home key
Endif
Endif
If dx==0 AND dy<>0 Then
If dy>0 Then
UO.Press(35) ; End
Endif
If dy<0 Then
UO.Press(33) ; PgUp
Endif
Endif
Wend
end sub
бегает, причём оч. даже быстро