• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

~MOD~Changemap

Rury

Member
Joined
Nov 25, 2012
Messages
74
Reaction score
7
Hello otland,

I need mod of change. Something like

Changemap in 2 minutes, next map Carlin.

Clearly this message is two minutes before map change.

And when change the map

Map has been changed, next map in 20 minutes.
 
MODS

ChangeMap.xml
Lua:
<?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>

If this works Rep++? :)
 
Back
Top