You are viewing an old version of this page. Return to the latest version.
Version of 11:31, 7 September 2013 by I need to Update My Profile
Difference between revisions of "LUA:AddSpawnIDAccess"
(Created page with "'''Explanation''' This function grants spawn access to a spawn, with every spawn in a zone with a certain spawn id. The third param (zone) is optional, if not set this function w...") |
|||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | {{LUAFunction | |
| − | This function grants | + | |Name = AddSpawnIDAccess |
| − | + | |Description = This function grants spawns access to all spawns with the specified spawn id | |
| − | + | |Param1 = Spawn | |
| − | + | |Param1Desc = is the spawn we want to give access to | |
| − | + | |Param2 = int32 | |
| − | + | |Param2Desc = is the spawn id we want to be accessed | |
| − | <pre>function hailed(NPC, Spawn) | + | |OptionalParam1 = Zone |
| + | |OptionalParam1Desc = is the zone in which we want to allow access to the spawn id | ||
| + | |Example = | ||
| + | <pre> | ||
| + | function hailed(NPC, Spawn) | ||
AddSpawnIDAccess(Spawn, 4700000) | AddSpawnIDAccess(Spawn, 4700000) | ||
end | end | ||
</pre> | </pre> | ||
| − | + | |ExampleDesc = 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. | |
| − | 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) |
| − | + | }} | |
| − | |||
| − | |||
| − | |||
| − | |||
Latest revision as of 12:14, 30 January 2021
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)