You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:ZoneScripts"
| 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. | 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. | ||
| − | + | {{Header|Dawn|BackgroundColor=3d78b4|FontColor=ffffff}} | |
Dawn is called when the game time passes dawn time, which is set in rules | Dawn is called when the game time passes dawn time, which is set in rules | ||
| Line 8: | Line 12: | ||
end | end | ||
</pre> | </pre> | ||
| − | + | {{Header|Dusk|BackgroundColor=3d78b4|FontColor=ffffff}} | |
Dusk is called when the game time passes dusk time, which is set in rules | Dusk is called when the game time passes dusk time, which is set in rules | ||
| Line 15: | Line 19: | ||
end | end | ||
</pre> | </pre> | ||
| − | + | {{Header|Enter Location|BackgroundColor=3d78b4|FontColor=ffffff}} | |
Enter Location is called when the player enters a new grid, the new grid id is passes as the third parameter | Enter Location is called when the player enters a new grid, the new grid id is passes as the third parameter | ||
| Line 22: | Line 26: | ||
end | end | ||
</pre> | </pre> | ||
| − | + | {{Header|Init Zone Script|BackgroundColor=3d78b4|FontColor=ffffff}} | |
Init Zone Script is called when the zone first starts up, this is where you would set up any proximity functions | Init Zone Script is called when the zone first starts up, this is where you would set up any proximity functions | ||
| Line 29: | Line 33: | ||
end | end | ||
</pre> | </pre> | ||
| − | + | {{Header|Leave Location|BackgroundColor=3d78b4|FontColor=ffffff}} | |
Leave Location is called when the player leaves a grid, the grid id that the player is leaving is passed as the third parameter | Leave Location is called when the player leaves a grid, the grid id that the player is leaving is passed as the third parameter | ||
| Line 36: | Line 40: | ||
end | end | ||
</pre> | </pre> | ||
| − | + | {{Header|Player Entry|BackgroundColor=3d78b4|FontColor=ffffff}} | |
Player Entry is called when a players enters the zone | Player Entry is called when a players enters the zone | ||
| Line 43: | Line 47: | ||
end | end | ||
</pre> | </pre> | ||
| − | |||
| − | |||
| − | |||
Revision as of 16:36, 14 June 2016
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