SRL Archive - Bugs

WalkToTile


Bad Boy JH

2010-06-03 03:37:34

I think there is a bug in WalkToTile, that stops it from working, I was running this…

if not WalkToTile(TTA[i], 2, 10) then
begin
if TileOnMM(TTA[i]) then
begin
Writeln('Its on the minimap, dont know why it failed');
Exit;
end;
It returned on a coupleof occasions the Writeln above indicating that its not walking there, even if its on the minimap.

Edit:Is it possible this is due to something like randomness and the boardering tiles not being on the MM? if so, how about we add something like this..


For I := Randomness downto 0 do
begin
NewTile.x := RandomRange(TheTile.x - I, TheTile.x + I);
NewTile.y := RandomRange(TheTile.y - I, TheTile.y + I);
if TileOnMM(NewTile) then
Break;
end;

Drakan

2010-06-03 05:57:13

That's possible. I know WalkToTile works because I ran my script for two hours last night before it got stopped by a random. So I'll look into that. For now, your best bet is to make the next tiles in your path about 2/3 of the way to the end of your minimap so it leaves some room there.