Progress Update:I've got Eq's "No walking on top of enemy sprites" thing working now as well as the random NPC spawn location thingy. Here's the code for anyone who wants to use it:
Locate an unoccupied space on the map. (ie: not a mountain, tree or water tile)
   NPCspawnlocation = RANDOM 49
   NPCspawntile$ = MID$ gridlayout$ NPCspawnlocation 1
   REPEAT
    IF NPCspawntile$ <> "0" THEN
     NPCspawnlocation = NPCspawnlocation + 1
     NPCspawntile$ = MID$ gridlayout$ NPCspawnlocation 1
    END IF
    IF NPCspawntile$ = "0" THEN EXIT REPEAT
   END REPEAT
After locating an appropriate spawn spot, determine what the NPC's grid coordinates are.
   XYcalculator = 0
   NPCgridX = 0
   NPCgridY = 1
   REPEAT
' Â Â This line is to prevent the "repeat glitch" where the first line in a repeat block isn't executed.
    XYcalculator = XYcalculator + 1
    NPCgridX = NPCgridX + 1
    IF NPCgridX = 8 THEN NPCgridY = NPCgridY + 1
    IF NPCgridX = 8 THEN NPCgridX = 1
    IF XYcalculator = NPCspawnlocation THEN EXIT REPEAT
   END REPEAT
Determine what the NPC's sprite coordinates are based off the grid coordinates.
   NPCspriteY = NPCgridY * 44
   NPCspriteY = NPCspriteY - 39
   NPCspriteX = NPCgridX * 44
   NPCspriteX = NPCspriteX - 39
   NPCmoveY = NPCgridY
   NPCmoveX = NPCgridX
EDIT:I've separated the routine to make it easier to understand. Quite nice to look at I think.
*sigh* ANOTHER EDIT:Crap, I've just realized that this isn't a true randomizer, as the odds for where NPC's spawn are heavily influenced by the amount of non traversable tiles on the grid. Oh well, it'll have to do until I work out how to code a true randomizer using arrays.
You know the drill by now:I've just figured it out. It's easy. It'll have to wait 'til tomorrow though as I'm up early for bowling practice, but rest assured that we shall be gaping in awe at a true random NPC positioner come tomorrow.