At work right now so I'll try and explain the basic Commands.
Tile Init ; Initiates tile info (thats all I really know)
Tile Cnt (X) (Y) ; Returns the number of tiles on that X Y cordinate as #Tilecnt
Tile Get (X) (Y) (Index) ; Index is just the Number for the tile 1 to #Tilecnt
From there you have all your #Tile Variables that you can use to distinguish tiles from one another. When setting Up a radius there are multiple Methods you can use. Below is a simple Sub That I just pulled out my....... That will just locate a tile with a keyword within a radius you specify. Would look great for looking for something Like Dirt for filling plant bowls.
Gosub Locate_Tile 2 Tree
if #result
display YAY You found a TREE!!!!
Sub Locate_Tile
; Sub Locate_Tile (Radius) (Key Word)
set %Lower_X #charposx - %1
set %Upper_X #charposx + %1
set %Lower_Y #charposy - %1
set %Upper_Y #charposy + %1
Tile Init
For %X_Cord %Lower_X %Upper_X
{
For %Y_Cord %Lower_Y %Upper_Y
{
Tile cnt %X_Cord %Y_Cord
for %Index 1 #Tilecnt
{
Tile Get %X_Cord %Y_Cord %Index
if %2 in #tilename
Return #true
}
}
}
Return #false