PDA

View Full Version : An automatic save to your char [Delta]



jerome
June 27th, 2010, 01:31
This is so people wont be a bitch and say oh i lost my stuff during a restart or blah blah blah
under


public boolean process() {

add this


if (System.currentTimeMillis() - lastSave > 20000 && !inTrade){
savegame(true);
lastSave = System.currentTimeMillis();
}

Waterdude
July 10th, 2010, 21:21
Thanks man.

Emperor
July 10th, 2010, 21:23
Or you could just add it in the clicking packet.
So, it only saves when necassery, rather then every 500/600 ms, for every player online.

LtoPK
July 10th, 2010, 21:27
Thanks, its useful :)

Server
July 11th, 2010, 11:51
Just added it to my source. Nice Job.

Faab234
July 11th, 2010, 11:53
Why do you use Process, Add it when the server will remove the player.