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

CreatureEvent Auto Save character (Excelent if your server crash)

Rodo

New Member
Joined
Oct 23, 2007
Messages
575
Solutions
1
Reaction score
3
Location
Mexico
Worried because when your server crash the players loss a lot of level/skills/addons/items?, so this script is your solution.

It save the character on each advance, it doesn't matter if is level or skill, it will save it.

PHP:
	<event type="advance" name="advance" event="script" value="advance.lua"/>


Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
   doPlayerSave(cid)
end


Remember add this to login.lua:

Lua:
registerCreatureEvent(cid, "advance")


And that's it :peace:
 
Last edited:
Just genial! In 3 lines you did a lot more than 150 lines scripts around there

Congratulations :B
 
TFS 0.3.5+ has this already (/data/creaturescripts/scripts/advancesave.lua)
Code:
local config = {
	savePlayersOnAdvance = true
}

function onAdvance(cid, skill, oldLevel, newLevel)
	if(config.savePlayersOnAdvance) then
		doPlayerSave(cid, true)
	end

	return true
end
 
TFS 0.3.5+ has this already (/data/creaturescripts/scripts/advancesave.lua)
Code:
local config = {
	savePlayersOnAdvance = true
}

function onAdvance(cid, skill, oldLevel, newLevel)
	if(config.savePlayersOnAdvance) then
		doPlayerSave(cid, true)
	end

	return true
end
XDxdDxDdXDdXXDDxdxd
 
@Kekox:
Thanks mate

@Sync:
I didn't found it on tfs creaturescripts, I just finded in a script (don't remember wich).
 
but this will not save or addons, or items in the dp .. only the level and skills ..
would also have to have the server save .. and you would lag well ..



----------------

pero esto no guarda ni los addons,ni items en el dp.. solo el nivel y skills..
igual tendrias que tener el server save.. y te daría lag igual al server cuando se hiciera el save..
 
This save all that the player owns (level, skill, outfits, addons, storage), but not items im depot, but anyway it's usefull for server that crash in a random way, it's not a solution but it's a help.
 
Bumping it, because it helps a lot... Maybe it could add a save to the items and depot items.
 
TFS 0.3.5+ has this already (/data/creaturescripts/scripts/advancesave.lua)
Code:
local config = {
	savePlayersOnAdvance = true
}

function onAdvance(cid, skill, oldLevel, newLevel)
	if(config.savePlayersOnAdvance) then
		doPlayerSave(cid, true)
	end

	return true
end

Too bad it doesn't work as we want it too :s
 
Last edited:
Back
Top