You are looking at a material called zone

This works with roaming critters.

The setzone command places the zone material on an object while setting a zonename into the material's value.

If the object then calls roam, then it will only choose an exit if the room it links to is in the same zone.

see also:
read the command called setzone
read the command called roam

Scripting example:
//This causes an object to roam once every 10 or so ticks as long as it is alive;
##tickloc:runsub mayberoam;
##mayberoam:runsub roamaround/10;
##roamaround:
if $actor's health > 0 then roamaround2;
##roamaround2:
call "roam";
Code