• 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!

Deaths and house cleaned at crash

Tarielle

New Member
Joined
Nov 4, 2007
Messages
214
Reaction score
0
Location
Sweden
Hi, when my server crashes then eveyone on the server that was online dies. And all the houses gets cleaned without sending the items to their depot... How can I avoid this?
 
What server are you using and is it XML or SQL? It helps to know what you are working with if we are going to diagnose your problem.
 
Do they die or are they reset back to their last login/server save.
Sounds to me like you need to install some sort of auto save script into your server. If you use newer TFS revisions you can do this easily.

First add a line in your talkactions.xml
Code:
<talkaction words="!save" script="save.lua"/>

Second copy/paste this into your favorite text editor and save as "save.lua" and put it into data/talkactions/scripts/ directory
Code:
local savingEvent = 0

function onSay(cid, words, param)
	if getPlayerAccess(cid) ~= 0 then
		if isNumber(param) == TRUE then
			stopEvent(savingEvent)
			save(tonumber(param) * 60 * 1000)
		else
			saveData()
		end
	end
end

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

That function comes with newer revisions of TFS so if you already have it all you need to say to execute it ingame is !save "30 which will save your game every 30 minutes.

Hope i helped you.
 
Back
Top