Ironworks Gaming Forum

Ironworks Gaming Forum (http://www.ironworksforum.com/forum/index.php)
-   NWN Mod: Escape from Undermountain (http://www.ironworksforum.com/forum/forumdisplay.php?f=17)
-   -   Here's something to help with losing char stuff on crashes. (http://www.ironworksforum.com/forum/showthread.php?t=38374)

robertthebard 09-06-2006 07:07 AM

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.

StigTC 09-06-2006 09:07 AM

That would be nice.
As a side question, if you press Escape and chose save character, does it save it server side as well or only client side?

Cloudbringer 09-06-2006 09:11 AM

I think it saves client side then. Not sure, though.

JrKASperov 09-06-2006 09:24 AM

Save character saves client side, and not even in the server vault.

robertthebard 09-06-2006 11:46 AM

That script will save to the server vault. We use the same one at my other server, and back when we were prone to a lot of crashes, it saved a lot of work.

Ziroc 09-10-2006 04:45 AM

Excellent! Thanks Rob! I will indeed install it!

So it'll save ALL chars online even if one person rests? (I hope so) [img]smile.gif[/img]

Ziroc 09-10-2006 05:19 AM

Done and installed.. let me know if it works ok, next crash.

robertthebard 09-10-2006 06:03 AM

If you uncomment out the save all chars, it will, but I'd leave it as is. It should just overwrite the existing, at least that's how it works on Fates, where we use it.

robertthebard 09-10-2006 09:27 AM

Seems to work great, but the server didn't crash while I was in. It's nice to see the Character Saved message though, after a rest.

Greything 09-11-2006 05:15 PM

I've had no difficulties with this system over the past few days and I'm not even sure if this is what is causing my current problem. Still, it's a convenient place to make this post

I just tried to log in and was invited to play a local character rather than one from the server vault. I suspect that this is something temporary but thought I ought to mention it just in case.


All times are GMT -4. The time now is 03:56 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved