Ir para conteúdo
  • 0

Problema Com Script Auto-Save Servidor 9.60


Pergunta

bom galera seguinte percebi que o meu servidor não está salvando com o script auto-save aparece a mensagem que vai salvar etc so que no distro aparece assim:

 

Saving Server...

SAVE: Complete in 0 seconds using bynary house stourage.

 

 

agora quando eu uso o comando /save o servidor salva perfeitamente

 

 

Saving Server...

SAVE: Complete in 4.147 seconds using bynary house stourage.

 

meu servidor é versão 9.60 tfs 3.7

 

 

script do auto-save

 

local config = {
broadcast = {120, 30},
shallow = "no",
delay = 120,
events = 30
}

config.shallow = getBooleanFromString(config.shallow)

local function executeSave(seconds)
if(isInArray(config.broadcast, seconds)) then
local text = ""
if(not config.shallow) then
text = "[Auto-Save]:"
else
text = "{"
end

text = text .. " Radbr Server vai salvar dados em  " .. seconds .. " segundos, na hora do save o serve pode travar por alguns segundos!"
doBroadcastMessage(text)
end

if(seconds > 0) then
addEvent(executeSave, config.events * 1000, seconds - config.events)
else
doSaveServer(config.shallow)
end
end

function onThink(interval, lastExecution, thinkInterval)
if(table.maxn(config.broadcast) == 0) then
doSaveServer(config.shallow)
else
executeSave(config.delay)
end

return true
end

 

Talkaction Save :

 


local savingEvent = 0

function onSay(cid, words, param, channel)
if(isNumber(param) == TRUE) then
stopEvent(savingEvent)
save(tonumber(param) * 60 * 1000)
else
doSaveServer()
end
return TRUE
end

function save(delay)
doSaveServer()
if(delay > 0) then
savingEvent = addEvent(save, delay, delay)
end
end

 

ajuda ae galera

 

problema resolvido achei um systema de save aki no xtibia que funcionou perfeitamente o script é este

 


local function salveServer()
doSaveServer()
broadcastMessage("[AUTO MESSAGE]: Servidor salvo, próximo daqui 2 horas.", 22)
end


function onThink(interval, lastExecution, thinkInterval)
addEvent(salveServer, 5 * 1000)
broadcastMessage("[AUTO MESSAGE]: Servidor irá salvar daqui 5 segundos vá para algum local seguro.", 22)
return true
end

 

Creditos do Script : Skymagnum

 

duvida sanada podem fechar o topico

Editado por KennyxD
Link para o comentário
https://xtibia.com/forum/topic/196645-problema-com-script-auto-save-servidor-960/
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

×
×
  • Criar Novo...