708 B
708 B
Function: IsSpawnGroupAlive(zone, group_id)
Description:
Return's true if there is an alive spawn within the spawn group_id specified in the Zone.
Parameters:
zone
(Zone) - Zone object representingzone
.group_id
(uint32) - Integer valuegroup_id
.
Returns: Return's true if there is an alive spawn within the spawn group_id specified in the Zone. Otherwise false.
Example:
-- From SpawnScripts/ThunderingSteppes/AntelopeHerd1.lua
function SpawnCheck(NPC)
local zone = GetZone(NPC)
if IsSpawnGroupAlive(zone, GroupID) == true then
AddTimer(NPC, 6000, "SpawnCheck")
else
Despawn(GetSpawnByLocationID(zone, 133793500))
end