kito2
www.masteria.net
Bored of global saves that freeze your ot from 8-160 seconds?
I know it sux, and here is the solution: an individual save for each player after each login...
How it works?
Quite easy, when you log in, it activates an event every 30-40 minutes (random) and then it saves the character, so, you will be always saving a player at each minute, and you won't need a global save...
You will just have to set a global save to the hours when you have less players than normal, ie: 6:00 AM? And there you will save houses, so this won't affect wars, quests, etc...
Thanks to Cybershot, if you want to rep, just rep him, not me.
I know it sux, and here is the solution: an individual save for each player after each login...
How it works?
Quite easy, when you log in, it activates an event every 30-40 minutes (random) and then it saves the character, so, you will be always saving a player at each minute, and you won't need a global save...
You will just have to set a global save to the hours when you have less players than normal, ie: 6:00 AM? And there you will save houses, so this won't affect wars, quests, etc...
---- on data/creaturescriptsftw where is the custom saveRepeat function, you can't exclude it ;x
this is how I would do it
Lua:function saveRepeat(cid) if not isPlayer(cid) then return true end doPlayerSave(cid) doPlayerSendTextMessage(cid,19, 'Your character\'s progress is saved.') doSendMagicEffect(getThingPos(cid), 11) save = addEvent(saveRepeat, math.random(30,43) *60*1000, cid) end function onLogin(cid) save = addEvent(saveRepeat, math.random(30,43)*60*1000, cid) return true end function onLogout(cid) stopEvent(save) return true end
no need to registerLua:<event type="login" name="saveOn" event="script" value="save.lua"/> <event type="logout" name="saveOff" event="script" value="save.lua"/>
Thanks to Cybershot, if you want to rep, just rep him, not me.
Last edited: