I noticed that isMoving would return False when using agility obstacles, your destination would return as your current position and most of the walk on obstacles registered no animation.
I wrote a procedure to wait- checking every 2 game ticks (1200 ms) if you have moved to a new tile, breaking if you have not.
Simba Code:
procedure waitWhileMoving;
var
tim : Timer;
lastTile : TTile;
finished : Boolean;
Player: TReflectLocalPlayer;
begin
player.create; //Take this and the player declaration out if you've already created your player.
tim.start;
repeat
if tim.timeElapsed > 20000 then
break;
lastTile := player.GetTile;
wait(1200); // 600ms is 1 game tick, so this corresponds to two in game ticks.
if (player.GetTile.X = lastTile.X) and (player.GetTile.Y = lastTile.Y) then
finished := True;
until(finished);
end;
I imagine an isMoving function would look something like this (Although the wait involved would make it unsuitable for a few tasks)
Simba Code:
function isMoving(ticks : Integer) : Boolean;
var
lastTile : TTile;
Player: TReflectLocalPlayer;
begin
result := True;
player.create; //Take this and the player declaration out if you've already created your player.
lastTile := player.GetTile;
wait(ticks * 600); // 600ms is 1 game tick.
if (player.GetTile.X = lastTile.X) and (player.GetTile.Y = lastTile.Y) then
result := False;
end;