ID:138822
 
Code:
turf
Lair
icon='Lair.dmi'

Lair_Ground
icon_state="floor"

Lair_Wall
density=1
icon_state="wall"

Lair_Statue
density=1
icon_state="statue"

Lair_Grass
icon_state="grass"

Void
opacity=1
icon='Turf.dmi'

        LairPick()
for(var/turf/Lair/Lair_Statue/S in world)
if(istype(S,/turf/Lair/Lair_Statue))
if(!S.occupied)
S.occupied=1
src.loc=S.loc
break


Problem description:
Even though there are over 40 Lair_Statue in the world, the game keeps spawning me on a Lair_Grass. Wuttafuk?
1. Your istype() check is unnecessary, since it loops through only those types already.
2. You're setting your loc to S.loc, which is an /area since S is a turf. Moving to an area will set you in the bottom-left-most part of the area.
In response to Kaiochao
THe istype() was just there since I thought I may have done something wrong in the for(). >.<

Thanks, though, I knew it was something stupid like that.
In response to Shaoni
If you want a random spawn, i believe you could use pick()