--Zone_change_delay = 5 --uncomment this line and change to desired seconds if needed(default = 5)
cities = S{"Ru'Lude Gardens","Upper Jeuno","Lower Jeuno","Port Jeuno","Port Windurst","Windurst Waters","Windurst Woods","Windurst Walls","Heavens Tower",
"Port San d'Oria","Northern San d'Oria","Southern San d'Oria","Chateau d'Oraguille","Port Bastok","Bastok Markets","Bastok Mines","Metalworks",
"Aht Urhgan Whitegate","Tavnazian Safehold","Nashmau","Selbina","Mhaura","Norg","Eastern Adoulin","Western Adoulin","Kazham"}
windower.raw_register_event('zone change', function (new_id,old_id)
local zones = gearswap.res.zones
local new_zone = zones[new_id].name
coroutine.schedule(gearswap.equip_sets:prepare('zone_change',nil,new_zone,zones[old_id].name,cities:contains(new_zone)),(Zone_change_delay or 5))
end)
function zone_change(new,old,city)
---------------------------------------
--new string The name of the new zone
--old string The name of the old zone
--city boolean true if new zone is a city
---------------------------------------
--change gear with
--equip(<setname>)
---------------------------------------
--example: rule (change gear on entering city)
--if city then
-- equip(sets.city)
--end
---------------------------------------
end