There has been a thread about this.
During that thread, I wrote my own and it doesn't lag me:
function f_WalkPath(Path : TTileArray; Invert : Boolean): Boolean;
var
i, j, dest, currTile, m : Integer;
t : TTile;
p : TPoint;
moved, nextOnMM : Boolean;
begin
if (not LoggedIn) or R_FindRandoms then
Exit;
if Invert then
InvertPath(Path);
dest := High(Path);
Result := TileOnMS(Path[dest], 0);
if Result then
Exit;
for i := dest downto 0 do
begin
R_FindRandoms;
if TileOnMM(Path[i]) then
begin
currTile := i;
Break;
end else
currTile := -1;
Wait(10 + Random(50));
end;
if currTile = -1 then
begin
Write('None of the tiles in the path were found!');
Exit;
end;
for i := currTile to dest do
begin
R_FindRandoms;
moved := False;
Result := TileOnMS(Path[dest], 0);
if Result then
Break;
if not nextOnMM then
begin
for j := dest downto (currTile + 1) do
begin
R_FindRandoms;
if TileOnMM(Path[j]) then
begin
currTile := j;
Break;
end else
currTile := -1;
Wait(10 + Random(50));
end;
if currTile = -1 then
begin
Write('None of the tiles in the path were found!');
Exit;
end;
end;
t := RandomizeTile(Path[currTile], 1, 1);
p := TileToMM(t);
Mouse(p.x, p.y, 2, 2, True);
if not WaitToMove(500 + Random(500)) then
begin
MarkTime(m);
while TimeFromMark(m) <= 5000 do
begin
if R_FindRandoms then
begin
f_WalkPath(Path, Invert);
Exit;
end;
if WaitToMove(500 + Random(150)) then
begin
moved := True;
Break;
end;
Wait(10 + Random(50));
end;
if not moved then
Write('We didn''t move!');
end;
nextOnMM := False;
while (GetSpeed > 0) and (not nextOnMM) and (not Result) do
begin
Result := TileOnMS(Path[dest], 0);
R_FindRandoms;
for j := dest downto (currTile + 1) do
begin
R_FindRandoms;
if TileOnMM(Path[j]) then
begin
currTile := j;
nextOnMM := True;
Break;
end;
Wait(10 + Random(50));
end;
Wait(10 + Random(50));
end;
end;
Result := TileOnMS(Path[dest], 0);
if not Result then
Result := WalkToTile(Path[dest], 1, 0);
end;
If you use it, please credit accordingly.