Ir para conteúdo

Featured Replies

  • Respostas 6
  • Visualizações 2.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • veja Se funciona >> http://www.tibiaking.com/forum/topic/34006-globalevents-servesave-shutdownautom%C3%A1tico/

  • em globalevents:   local timetoss = 10 --minutes function onTime() return prepareShutdown(math.abs(math.ceil(timetoss))) end function prepareShutdown(minutes) if(minutes <= 0) then addEvent

  • ai esta linux.sh

Postado

em globalevents:

 

local timetoss = 10 --minutes


function onTime()
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
<globalevent name="shutdown" time="05:50" event="script" value="shutdown.lua"/>

 

em globalevents:

 

local timetoss = 10 --minutes


function onTime()
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
<globalevent name="shutdown" time="05:50" event="script" value="shutdown.lua"/>

 

 

 

e pra abrir sozinho coloque com auto restarte.

 

 

Postado

em globalevents:

 

local timetoss = 10 --minutes


function onTime()
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
<globalevent name="shutdown" time="05:50" event="script" value="shutdown.lua"/>

 

 

e pra abrir sozinho coloque com auto restarte.

 

Me ajudou também, curte o script.

REP+

Conlheça o projeto:

QtzGx2h.png

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo