ServUO Version
Publish Unknown
Ultima Expansion
Time Of Legends
Hi everyone! I'm in the process of setting up a solo shard for personal use. I was wondering if there's any way I can set up ServUO to automatically make a save when a player (me) logs out via the UO client, thus bypassing the need to shutdown the server from console. Any help would be appreciated if this is possible. Thank you!
 
PlayerMobile.OnLogout would be the best place to add this kind of mod: https://github.com/ServUO/ServUO/blob/master/Scripts/Mobiles/PlayerMobile.cs#L1544

Execute AutoSave.Save() then Core.Kill() as needed, preferably using a time delay:
C#:
Timer.DelayCall( TimeSpan.FromSeconds( 3.0 ), () =>
{
    AutoSave.Save();
    Core.Kill(false);
});

If your account is the only one that will ever exist, you don't need to worry about handling for if it is actually your character logging out, and whether or not there are others still online.
 
PlayerMobile.OnLogout would be the best place to add this kind of mod: https://github.com/ServUO/ServUO/blob/master/Scripts/Mobiles/PlayerMobile.cs#L1544

Execute AutoSave.Save() then Core.Kill() as needed, preferably using a time delay:
C#:
Timer.DelayCall( TimeSpan.FromSeconds( 3.0 ), () =>
{
    AutoSave.Save();
    Core.Kill(false);
});

If your account is the only one that will ever exist, you don't need to worry about handling for if it is actually your character logging out, and whether or not there are others still online.

Thank you! That helps a lot.
 
Back