• 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!

Server Save EACH 1 HOUR PLX.

mikhael

New Member
Joined
Jul 24, 2007
Messages
31
Reaction score
0
I have a TFS version 1.0 and i need server save each 1 hour... my server save is that one:


Code:
<globalevent name="Server Save" time="13:10:00" script="serversave.lua"/>

Code:
local shutdownAtServerSave = false
local cleanMapAtServerSave = false

local function serverSave()
        if shutdownAtServerSave then
                Game.setGameState(GAME_STATE_SHUTDOWN)
    else
        Game.setGameState(GAME_STATE_NORMAL)
        end
        if cleanMapAtServerSave then
                cleanMap()
        end
        saveServer()
end

local function secondServerSaveWarning()
        broadcastMessage("Server is saving game in one minute. Please go to a safe place.", MESSAGE_STATUS_WARNING)
        addEvent(serverSave, 60000)
end

local function firstServerSaveWarning()
        broadcastMessage("Server is saving game in 3 minutes. Please go to a safe place.", MESSAGE_STATUS_WARNING)
        addEvent(secondServerSaveWarning, 120000)
end

function onTime(interval)
        broadcastMessage("Server is saving game in 5 minutes. Please go to a safe place.", MESSAGE_STATUS_WARNING)
        Game.setGameState(GAME_STATE_STARTUP)
        addEvent(firstServerSaveWarning, 120000)
        return not shutdownAtServerSave
end


CAN YOU HELP ME ?
 
Just add a new line:
Code:
<globalevent name="Server Save Hourly" interval="3600000" script="serversavehourly.lua"/>
and copy your serversave.lua into serversavehourly.lua
 
Just add a new line:
Code:
<globalevent name="Server Save Hourly" interval="3600000" script="serversavehourly.lua"/>
and copy your serversave.lua into serversavehourly.lua
Worst tip you could give him.
Use interval insted..
 
I told exactly that...
BTW you can have a server save daily with restart and clean, and another hourly only for saves

Ofc you can, but what you said "and copy your serversave.lua into serversavehourly.lua"
The thing is that there is no use the copy paste the script and use another instance to use it.
The best is ofc to have a daily save and hourly saves if that is what the user wishes. But what you said about using another script insted of 1 makes it (to me and probbly more users) a bad awnser.

No offence but this is whats beign done on the github project, that project won't come a long way with users training on it, thats why I wanted to create a private site for either donations or a closed one for the devs to get a better one.

So no... Maybe you diden't understand me correctly, but interval for the "same" script with 2 lines insted the best, as you diden't say.....
 
Back
Top