26 lines
850 B
Plaintext
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
|
||
|
}
|
||
|
}
|