Difference between revisions of "LUA:Zone"

Line 6: Line 6:
 
|Param2 = Spawn
 
|Param2 = Spawn
 
|Param2Desc = is the spawn pointer of the spawn you wish to zone
 
|Param2Desc = is the spawn pointer of the spawn you wish to zone
 +
|OptionalParam1 = float
 +
|OptionalParam1Desc = is X of location
 +
|OptionalParam2 = float
 +
|OptionalParam2Desc = is Y of location
 
|OptionalParam3 = float
 
|OptionalParam3 = float
|Param3Desc = is X of location
+
|OptionalParam3Desc = is Z of location
 
|OptionalParam4 = float
 
|OptionalParam4 = float
|Param4Desc = is Y of location
+
|OptionalParam4Desc = is Heading of location
|OptionalParam5 = float
 
|Param5Desc = is Z of location
 
|OptionalParam6 = float
 
|Param6Desc = is Heading of location
 
 
|Example =
 
|Example =
 +
 
<pre>
 
<pre>
 +
Example 1
 
function hailed(NPC, Player)
 
function hailed(NPC, Player)
 
     Zone(GetZone(184), Player, 9.65, 17.21, -68.72, 184)
 
     Zone(GetZone(184), Player, 9.65, 17.21, -68.72, 184)
 
end
 
end
 
</pre>
 
</pre>
|-
 
|-
 
 
<pre>
 
<pre>
 +
Example 2
 
function hailed(NPC, Player)
 
function hailed(NPC, Player)
 
     Zone(GetZone(184), Player)
 
     Zone(GetZone(184), Player)
Line 28: Line 29:
 
</pre>
 
</pre>
 
|ExampleDesc =1. When the NPC is hailed it will zone the player to zone 184 at the list coordinates
 
|ExampleDesc =1. When the NPC is hailed it will zone the player to zone 184 at the list coordinates
 +
<br>
 
2. When the NPC is hailed it will zone the player to zones default coordinates
 
2. When the NPC is hailed it will zone the player to zones default coordinates
 
|Notes =  
 
|Notes =  
 
}}
 
}}

Revision as of 12:16, 8 February 2022


LUA:AllFunctions - Zone

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


Zone Spawn to another location the the game.

Syntax

Zone(param1, param2, [opt param1], [opt param2], [opt param3], [opt param4])

Parameters

Required - param1 (Zone name), param2 (Spawn)
param1 name of the zone you wish to sned spawn to
param2 is the spawn pointer of the spawn you wish to zone
Optional - opt param1 (float), opt param2 (float), opt param3 (float), opt param4 (float)
opt param1 is X of location
opt param2 is Y of location
opt param3 is Z of location
opt param4 is Heading of location

Example

Example 1
function hailed(NPC, Player)
    Zone(GetZone(184), Player, 9.65, 17.21, -68.72, 184)
end
Example 2
function hailed(NPC, Player)
    Zone(GetZone(184), Player)
end

1. When the NPC is hailed it will zone the player to zone 184 at the list coordinates
2. When the NPC is hailed it will zone the player to zones default coordinates