WoR_PRC8/_module/nss/rhun_onpc_rest.nss
Jaysyn904 b5e28e52f4 Initial commit
Initial commit [1.18]
2025-04-03 11:49:34 -04:00

26 lines
850 B
Plaintext

//#include "persist_loc"
void main()
{
object oPC = GetLastPCRested();
//SavPlayer(oPC); //:: Handled by PRC
//Added to save 40% of the time to reduce lag - Grug 23-Arp-2004
//Another chanced save is in clientexit script
ExecuteScript("x2_mod_def_rest", OBJECT_SELF);
if (d10()<=4)
{
ExportAllCharacters();
// ===== This is code for fixing shifters =====
object oPCSF = GetFirstPC();
while ( GetIsObjectValid(oPCSF) ) // Loop through all the Players
{
if ( GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPCSF)) )
DelayCommand(0.1, ExecuteScript("ws_saveall_sub", oPCSF));
// We HAVE to use DelayCommand here or else properties will not carry over no matter what you do.
oPCSF = GetNextPC();
} // while
}
}