The moveToZone native AI script function moves the current group from one zone to another. The group will path-find to the destination zone.
()moveToZone(from: s, to: s)
npc_zone.npc_zone.Zone names are the full alias names of npc_zone nodes from the World Editor primitive tree. In practice, you should obtain them dynamically from the zone lookup functions rather than hardcoding them:
These functions return zone name strings that can be passed directly as parameters.
// Move from current zone to a nearby zone with "rest" flags
($fromZone)getZoneWithFlags("food", "start", "");
($toZone)getNeighbourZoneWithFlags($fromZone, "rest", "start", "");
if ($fromZone != "" && $toZone != "")
{
()moveToZone($fromZone, $toZone);
}
Source: ryzom/server/src/ai_service/nf_grp_npc.cpp (moveToZone_ss_)