You are viewing an old version of this page. Return to the latest version.
Version of 18:19, 11 September 2013 by I need to Update My Profile
No categories assigned
LUA:GetSpawnByGroupID
- Last edited 12 years ago by I need to Update My Profile
LUA Functions: GetSpawnByGroupID()
Gets a spawn in the given zone with the given group ID
Syntax
var = GetSpawnByGroupID(param1, param2)
Parameters
- Required - param1 (Zone), param2 (int32)
- param1 is the zone you want to look in for the given group
- param2 is the ID of the group you want
Usage
function hailed(NPC, Spawn)
local zone = GetZone(Spawn)
local Spawn2 = GetSpawnGroupByID(zone, 1234)
Attack(Spawn, Spawn2)
end
When the NPC is hailed it will make the spawn group with an ID of 1234 attack the player
Notes
Returns a spawn