Function: SpawnByLocationID(zone, location_id)
Description:
Creates one randomly selected entry from the zone's spawn-location definition, using its placement and respawn metadata. Supports NPC, ground spawn, object, widget and sign entries. Construction owns the allocation through prespawn; canceled or omitted allocations do not publish. After creation, the function selects a loadable script in spawn-entry, spawn-location, then spawn-database order and calls spawn. The final script-selection pass uses the randomly selected entry. The operation owns a copied placement and its entry values across template and script callbacks.
Parameters:
zone(Zone) - Destination zone.location_id(uint32) - Nonzero spawn-location definition ID.
Returns: The created Spawn userdata, or no value (nil when assigned) for invalid arguments, unavailable definitions, cancellation, omission, an unsettled or cancelled persistent house receipt, or failed creation. A returned userdata value can later expire; it does not permanently own the actor.