Bad Boy JH
2010-09-17 08:55:41
This will improve the Walk To Tile, It basically checks all tiles in the area Randomness around The Centre tile, and returns a random tile, that is on the Minimap, unable to test speed as hooks are outdated
I will be inspired from time to time to think of something, exuse me if its already in, Im not really scripting atm.
Function RandomTile(CentreTile: TTile; Randomness: Integer): TTile;
var
X, Y: Integer;
Tiles: Array of TTile;
begin
For X := - Randomness to Randomness do
For Y := - Randomness to Randomness do
if TileOnMM(Tile(CentreTile.x + X, CentreTile.y)) then
begin
SetLength(Tiles, Length(Tiles) + 1);
Tiles[High(Tiles)] := (Tile(CentreTile.x + X, CentreTile.y));
end;
Result := Tiles[Random(Length(Tiles))];
end;I will be inspired from time to time to think of something, exuse me if its already in, Im not really scripting atm.