void main() { // WriteTimestampedLogEntry("Entering Module onPlayerRest: xx_cb_rest"); object oPC = GetLastPCRested(); ExportAllCharacters(); // Save persistent location SetLocalInt(oPC,"BypassLocation",1); SetCampaignLocation("PlayerData","Location",GetLocation(oPC),oPC); // Remove death variables DeleteLocalInt(oPC,"Dead"); DeleteCampaignVariable("PlayerData","Dead",oPC); SendMessageToPC(oPC,"Saving Your Inventory and Location..."); // WriteTimestampedLogEntry("Exiting Module onPlayerRest: xx_cb_rest"); }