I needed these momentarily for comparing tiles, doubt it will be of any help but who knows.
findAreaTiles returns a list of the tiles in the given area.
findAreaTiles2 returns a list of tiles in the given area and the x/y coordinates of said tiles in the following format "tile,x,y".
Parameters:
NPC Code:
findAreaTiles(x,y,width,height);
findAreaTiles2(x,y,width,height);
PHP Code:
function findAreaTiles(tx,ty,tw,th){
for(temp.i=0; temp.i < (tw*th); temp.i++){
if(temp.q < tw){
temp.q = "0";
temp.j++;
} else temp.q++;
temp.tilearray.add(tiles[tx+temp.q,ty+temp.j]);
}
return temp.tilearray;
}
function findAreaTiles2(tx,ty,tw,th){
for(temp.i=0; temp.i < (tw*th); temp.i++){
if(temp.q < tw){
temp.q = "0";
temp.j++;
} else temp.q++;
temp.tilearray.add(tiles[tx+temp.q,ty+temp.j] @ "," @ tx+temp.q @ "," @ ty+temp.j);
}
return temp.tilearray;
}