void main()
{
object oPlayer= GetLastPCRested();
if(GetLastRestEventType() == REST_EVENTTYPE_REST_FINISHED)
{
//ExportAllCharacters();
ExportSingleCharacter( oPlayer );
SendMessageToPC( oPlayer, "Character saved." );
}
}
Put this in the module onrest event, and it will overwrite the char file when the char rests in game. I know I've lost up to 6 hours of work by not logging out to save the char, mostly because I'm used to chars being saved on rest in my other server.
|