You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:ZoneScripts"
John adams (talk | contribs) |
|||
| Line 1: | Line 1: | ||
| − | == | + | Zone scripts are used for events within the zone, there are 6 events that will make a call to the zone script, dawn, dusk, enter location, init zone, leave location, and player entry. |
| − | + | ||
| + | == Dawn == | ||
| + | Dawn is called when the game time passes dawn time, which is set in rules | ||
| + | |||
| + | <pre> | ||
| + | function dawn(Zone, Spawn) | ||
| + | end | ||
| + | </pre> | ||
| + | == Dusk == | ||
| + | Dusk is called when the game time passes dusk time, which is set in rules | ||
| + | |||
| + | <pre> | ||
| + | function dusk(Zone, Spawn) | ||
| + | end | ||
| + | </pre> | ||
| + | == Enter Location == | ||
| + | Enter Location is called when the player enters a new grid, the new grid id is passes as the third parameter | ||
| + | |||
| + | <pre> | ||
| + | function enter_location(Zone, Spawn, int32) | ||
| + | end | ||
| + | </pre> | ||
| + | == Init Zone Script == | ||
| + | Init Zone Script is called when the zone first starts up, this is where you would set up any proximity functions | ||
| + | |||
| + | <pre> | ||
| + | function init_zone_script(Zone) | ||
| + | end | ||
| + | </pre> | ||
| + | == Leave Location == | ||
| + | Leave Location is called when the player leaves a grid, the grid id that the player is leaving is passed as the third parameter | ||
| + | |||
| + | <pre> | ||
| + | function leave_location(Zone, Spawn, int32) | ||
| + | end | ||
| + | </pre> | ||
| + | == Player Entry == | ||
| + | Player Entry is called when a players enters the zone | ||
| + | |||
| + | <pre> | ||
| + | function player_entry(Zone, Spawn) | ||
| + | end | ||
| + | </pre> | ||
[[LUA|Back to LUA]] | [[LUA|Back to LUA]] | ||
Revision as of 22:00, 27 December 2013
Zone scripts are used for events within the zone, there are 6 events that will make a call to the zone script, dawn, dusk, enter location, init zone, leave location, and player entry.
Dawn
Dawn is called when the game time passes dawn time, which is set in rules
function dawn(Zone, Spawn) end
Dusk
Dusk is called when the game time passes dusk time, which is set in rules
function dusk(Zone, Spawn) end
Enter Location
Enter Location is called when the player enters a new grid, the new grid id is passes as the third parameter
function enter_location(Zone, Spawn, int32) end
Init Zone Script
Init Zone Script is called when the zone first starts up, this is where you would set up any proximity functions
function init_zone_script(Zone) end
Leave Location
Leave Location is called when the player leaves a grid, the grid id that the player is leaving is passed as the third parameter
function leave_location(Zone, Spawn, int32) end
Player Entry
Player Entry is called when a players enters the zone
function player_entry(Zone, Spawn) end