xLosT
Member
while too much on player, and will change the map server
therefore falls can not play on many players sqm, wanted
that x seconds before switching desired for a warning and Kikas
change the map
therefore falls can not play on many players sqm, wanted
that x seconds before switching desired for a warning and Kikas
change the map
<mod name="ChangeMap" version="1.0" author="Vodkart" contact="otserv.com" enabled="yes">
<config name="map_func"><![CDATA[
info = {
[0] = {x=692,y=848,z=7},
[1] = {x=413,y=804,z=7},
[2] = {x=517,y=603,z=7},
[3] = {x=552,y=226,z=7},
[3] = {x=197,y=731,z=7}
}
storage = 50555
]]></config>
<event type="login" name="Check Map" event="script"><![CDATA[
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="3200" event="script"><![CDATA[
domodlib('map_func')
function onThink(interval, lastExecution)
doBroadcastMessage('Proximo Mapa em 1h.')
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>
Last edited: