It would help if we had an exact example of what you are trying to accomplish. Ie, here is a sample Zone Script from our server, that displays text when you enter a specific area:
Code: Select all
--[[
Script Name : ZoneScripts/QueensColony.lua
Script Purpose : Location Pop-ups
Script Author : John Adams
Script Date : 2009.05.07
Script Notes : Sample ZoneScript
--]]
function init_zone_script(Zone)
SetLocationProximityFunction(Zone, 70, -4.25, 168.5, 30, "SunsetMeadow")
SetLocationProximityFunction(Zone, 175, -3, 135, 30, "SunsetMeadow")
SetLocationProximityFunction(Zone, 203, -3.3, 144.5, 30, "SunsetMeadow")
end
function SunsetMeadow(Zone, Player)
SendPopUpMessage(Player, "Sunset Meadow", 255, 255, 0)
end
Basically, in the Sunset Meadow area, if a player crosses the threshhold of any of the 3 entrances, the text "Sunset Meadow" will appear on their screen in Yellow.
Put the file into a folder under EQ2World.exe (ie., ./ZoneScripts/Test.lua)
Then go to the `zones` table and add "ZoneScripts/Test.lua" to the zone record's `lua_script` field.
There are five (5) places to add scripts: Items, Spawns, Spells, Quests and Zones. More to come.