Function: SpawnGroupByID(zone, group_id, custom_level)
Description:
Creates actors from the locations registered for a spawn group, randomly selecting one entry at each location. The first successfully created actor acts as the group leader. Construction owns each allocation through prespawn; canceled or omitted allocations do not publish. Each successful actor is assigned the group ID and an optional level, then a loadable script is selected in spawn-entry, spawn-location, then spawn-database order before its spawn callback.
Parameters:
zone(Zone) - Destination zone.group_id(uint32) - Spawn-group definition ID.custom_level(integer, optional; default 0) - Read into a 16-bit unsigned level; values 0 and 65535 leave the created actor's level unchanged. Other values set its level before thespawncallback.
Returns: A 1-based Lua table of successfully created Spawn userdata, or no value (nil when assigned) when the group is unavailable, a required location is unavailable or no actor was created. Earlier actors may already exist if a later location fails. Locations with unsettled or cancelled persistent house receipts are skipped; no successful entries returns no value. Entries remain weak userdata between calls.