• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua My server is not automatically saved / Serversave Error!

Mariuskens

Sword Art Online 2D-MMORPG
Joined
Nov 21, 2008
Messages
1,009
Reaction score
119
Location
Spain
GitHub
Olimpotibia
Hello everyone and I'm here again to ask for help.

In my server (IP: 4EverRl.no-ip.org) I have a problem that keeps me single server, meaning that I have to go in and do the command / save but my server don't save automatic..

I have looked the part of the tfs serversave 8.60 v5 and has everything well but will one globalevent?? I do not know why I need your help because each day I lose players.


Thank you respond and you tell me that I have to be premium advantages otland because I'm thinking.
 
Do you have any erros on console?
Well, try this
.

In data/globalevents/globalevents.xml write this
XML:
	<globalevent name="save" interval="1600000" event="script" value="save.lua"/>
in data/globalevents/scripts create a lua file called 'save.lua' and add this script
LUA:
local config = {
	broadcast = "no"
}

config.broadcast = getBooleanFromString(config.broadcast)
local function executeSave(seconds)
	if(seconds == 0) then
		doSaveServer()
		return true
	end

	if(seconds == 120 or seconds == 30) then
		doBroadcastMessage("Full server save within " .. seconds .. " seconds, please stay in safe place!")
	end

	seconds = seconds - 30
	if(seconds >= 0) then
		addEvent(executeSave, 30 * 1000, seconds)
	end
end

function onThink(interval, lastExecution, thinkInterval)
	if(not config.broadcast) then
		doSaveServer()
		return true
	end

	executeSave(120)
	return true
end

Regards,
H4CK3R
 
no no I get no errors in the console, voi to see if I can fix the script that I've been haver if we are lucky!

- - - Updated - - -

thnnnnnxxx goooodd!!!! +Repp

- - - Updated - - -

Annnd in config.lua need write command?*
 
Last edited:
LUA:
	saveGlobalStorage = true
	useHouseDataStorage = false
	storePlayerDirection = false

If you want global save so,
LUA:
	globalSaveEnabled = false
	globalSaveHour = 8
	shutdownAtGlobalSave = true
	cleanMapAtGlobalSave = false

Regards,
H4CK3R
 
Back
Top