Problema resolvido!
Para alguém que tenha vindo para este tópico com o mesmo problema...
globalsave.lua
local timetoss = 10 --minutes
function onTimer(interval)
return prepareShutdown(math.abs(math.ceil(timetoss)))
end
function prepareShutdown(minutes)
if(minutes <= 0) then
addEvent(close, 1*1000)
addEvent(global, 10*1000)
return false
end
if(minutes == 1) then
doBroadcastMessage("Server is going down in " .. minutes .. " minute, please log out now!")
elseif(minutes <= 3) then
doBroadcastMessage("Server is going down in " .. minutes .. " minutes, please log out.")
else
doBroadcastMessage("Server is going down in " .. minutes .. " minutes.")
end
shutdownEvent = addEvent(prepareShutdown, 60000, minutes - 1)
return true
end
function close()
doSetGameState(GAMESTATE_CLOSED)
end
function global()
doSetGameState(GAMESTATE_SHUTDOWN)
end
Depois corrigir o game.cpp seguindo este tutorial...
Removendo Erro Shutdown Console 0.3.6 - Criado por Alexy Brocanello