ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: camotbik on September 13, 2011, 02:13:49 AM
-
I woke up, and had this great idea in my mind. So I've made it and I'm looking for some testers.
;===========================================================
; Script Name: CAMOTbIK's Move
; Author: CAMOTbIK
; Version: 0.1 Alfa
; Client Tested with: 7.0.14.0
; EUO version tested with: 1.92
; Shard OSI / FS: FS WWW.RWUO.COM
; Revision Date: 2011/09/13
; Public Release: 2011/09/13
; Global Variables Used: None
; Purpose: Move using pathfind and on fail using move instead
;===========================================================
; Usage; Gosub move X Y Timeout(seconds)
;===========================================================
Sub Move
if #charposx <> %1 && #charposy <> %2
{
set %_pathfind_fail #false
set %_jindex #jindex
set %timer_move ( #sCnt + %3 )
event pathfind %1 %2
repeat
{
if #jindex >= %_jindex
{
scanjournal %_jindex
if can't_get_there in #journal
set %_pathfind_fail #true
set %_jindex %_jindex + 1
}
}
until #charposx = %1 && #charposy = %2 || #scnt > %timer_move || %_pathfind_fail = #true
if #charposx <> %1 && #charposy <> %2
move %1 %2 a %3 , s
}
return
-
nice..... i do the same/simular thing in my move subs... :)