Witam
Mam problem, otoz na moim serwerze co jakis czas wystepuje crash, ktorego wina jest save albo clean.
Co moze byc przyczyna ?
Prosze o pomoc
Uzywam TFS 0.4, Tibia 8.6, mapka ~40mb
clean.lua
save.lua
Mam problem, otoz na moim serwerze co jakis czas wystepuje crash, ktorego wina jest save albo clean.
Co moze byc przyczyna ?
Prosze o pomoc
Uzywam TFS 0.4, Tibia 8.6, mapka ~40mb
clean.lua
Code:
function executeClean()
doCleanMap()
doBroadcastMessage("Game map cleaned, next clean in 2 hours.")
return true
end
function onThink(interval, lastExecution, thinkInterval)
doBroadcastMessage("Game map cleaning within 30 seconds, please pick up your items!")
addEvent(executeClean, 30000)
return true
end
Code:
local config = {
broadcast = {120},
shallow = "yes",
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 = "s"
else
text = "S"
end
text = text .. "erver save within " .. seconds .. " seconds!"
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