I always encounter the issue of being stuck while handling ranged monsters. The bot will try to attack but stay's in the same spot then after some time it will be stuck and cannot use any skill. I want to create a macro to check it's position every 5 secs and if the position is the same 5-10 secs ago , it will do a manual move like north , east , south or west . I can use the $.pos
Code: Select all
automacro checkpos {
not location town1,town2,town3
location $lockmap <-- I have a macro the changes the lockmap via console conf
timeout 5
call movepos
}
macro movepos{
$oldpos = $.pos <-- I'm not preety sure how this line will respond , if it saves the current position every 5 secs
if ( $oldpos == $.pos) call move
}
macro move{
$dir = @rand (1,4)
if ($dir == 1) do north
if ($dir == 2) do south
if ($dir == 3) do east
if ($dir == 4) do west
}