GetStandingHeight & CreateNpcFromTemplate [097 RC5]
Posted: Mon Oct 15, 2007 4:48 am
From docs
Using when who is on a boat at z -4, returns z -85 (a submarine dungeon).
CreateNpcFromTemplate() also creates NPCs in the submarine dungeon when I use it with the (map) sea z (-5), and creates NPCs on the ground (z 0) when used in an undermap tunnel (z -25) if subterrain location is blocked: it seems that CreateNpcFromTemplate() doesn't return "Not a valid location for an NPC!" when there is another valid layer in same x&y, even at very different z.
There's something wrong in latest core with standing layers detection: this function returns also lower z than startz.GetStandingHeight( x, y, startz, realm := _DEFAULT_REALM )
Gets the lowest z height value one could stand at x,y starting at "startz".
Using
Code: Select all
GetStandingHeight(who.x, who.y, who.z, who.realm)CreateNpcFromTemplate() also creates NPCs in the submarine dungeon when I use it with the (map) sea z (-5), and creates NPCs on the ground (z 0) when used in an undermap tunnel (z -25) if subterrain location is blocked: it seems that CreateNpcFromTemplate() doesn't return "Not a valid location for an NPC!" when there is another valid layer in same x&y, even at very different z.