No categories assigned

LUA:AddSpawnIDAccess

Revision as of 12:14, 30 January 2021 by Cynnar (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


LUA:AllFunctions - AddSpawnIDAccess

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


This function grants spawns access to all spawns with the specified spawn id

Syntax

AddSpawnIDAccess(param1, param2, [opt param1])

Parameters

Required - param1 (Spawn), param2 (int32)
param1 is the spawn we want to give access to
param2 is the spawn id we want to be accessed
Optional - opt param1 (Zone)
opt param1 is the zone in which we want to allow access to the spawn id

Example

function hailed(NPC, Spawn)
    AddSpawnIDAccess(Spawn, 4700000)
end

When this function is called, the Spawn that hailed NPC will be granted access to every spawn with the ID of 4700000 in their zone.

Notes

If the optional param1 (zone) is not set, this function will use the zone of param1 (Spawn)