<?xml version="1.0" encoding="UTF-8"?>
<mod name="ChangeMap" version="1.0" author="Vodkart" contact="xtibia.com" enabled="yes">
<config name="map_func"><=!=[=C=D=A=T=A=[
info = {
[0] = {x=160,y=54,z=7},
[1] = {x=205,y=30,z=6},
[2] = {x=304,y=205,z=7},
[3] = {x=412,y=100,z=5},
[4] = {x=884,y=151,z=6},
[5] = {x=1102,y=1001,z=7}
}
storage = 50555
]=]=></config>
<event type="login" name="Check Map" event="script"><=!=[=C=D=A=T=A=[
domodlib('map_func')
function onLogin(cid)
if getGlobalStorageValue(storage) == -1 then
setGlobalStorageValue(storage,getGlobalStorageValue(storage)+1)
end
doTeleportThing(cid,info[getGlobalStorageValue(storage)])
return true
end
]=]=></event>
<globalevent name="ChangeMap" interval="3600" event="script"><=!=[=C=D=A=T=A=[
domodlib('map_func')
function onThink(interval, lastExecution)
doBroadcastMessage('The map will be changed again in 1 hour.')
if getGlobalStorageValue(storage) < #info then
setGlobalStorageValue(storage,getGlobalStorageValue(storage)+1)
else
setGlobalStorageValue(storage,getGlobalStorageValue(storage)-#info)
end
for _, pid in ipairs(getPlayersOnline()) do
doRemoveConditions(pid, true)
doTeleportThing(pid,info[getGlobalStorageValue(storage)])
end
return TRUE
end]=]=></globalevent>
</mod>