void main() { int timekeeper = GetLocalInt(GetModule(), "loadtimer"); object PoA = (GetModule()); //This script works off a timekeeper which more or less advanced //every 6 seconds by the module heartbeat, so.... //3.38 hours after server has been started... if (timekeeper == 2300){ object oWarn = GetFirstPC(); while ((oWarn != OBJECT_INVALID)) { SendMessageToPC(oWarn, "Auto Restart Sequence Will Begin In Thirty Minutes!!!"); oWarn = GetNextPC(); } } if (timekeeper == 2450){ object oWarn = GetFirstPC(); while ((oWarn != OBJECT_INVALID)) { SendMessageToPC(oWarn, "Auto Restart Sequence Will Begin In FIFTEEN Minutes!!!"); oWarn = GetNextPC(); } } if (timekeeper == 2550){ object oWarn = GetFirstPC(); while ((oWarn != OBJECT_INVALID)) { SendMessageToPC(oWarn, "Auto Restart Sequence Will Begin In FIVE Minutes!!!"); oWarn = GetNextPC(); } } if (timekeeper == 2598){ object oWarn = GetFirstPC(); while ((oWarn != OBJECT_INVALID)) { location lVis = GetLocation(oWarn); SendMessageToPC(oWarn, "Auto Reload Sequence Active: Server will restart in one minute."); SendMessageToPC(oWarn, "You WILL have to reconnect."); SendMessageToPC(oWarn, "Saving all characters."); ExportAllCharacters(); ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_TIME_STOP), lVis, 5.0); ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), lVis, 200.0); oWarn = GetNextPC(); } } if (timekeeper == 2599){ object oWarn = GetFirstPC(); while ((oWarn != OBJECT_INVALID)) { location lVis = GetLocation(oWarn); SendMessageToPC(oWarn, "Auto Restart Sequence Active, you will have to reconnect."); ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_METEOR_SWARM), lVis, 5.0); oWarn = GetNextPC(); } } if (timekeeper == 2600){ object oWarn = GetFirstPC(); while ((oWarn != OBJECT_INVALID)) { location lVis = GetLocation(oWarn); SendMessageToPC(oWarn, "Auto Restart Sequence Active, you will have to reconnect."); SendMessageToPC(oWarn, "YOU WILL BE DISCONNECTED BUT YOU MAY RECONNECT SHORTLY."); ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_METEOR_SWARM), lVis, 5.0); oWarn = GetNextPC(); } } if (timekeeper == 2601){ object oWarn = GetFirstPC(); while ((oWarn != OBJECT_INVALID)) { location lVis = GetLocation(oWarn); SendMessageToPC(oWarn, "Auto Restart Sequence Active, you will have to reconnect."); SendMessageToPC(oWarn, "YOU WILL BE DISCONNECTED BUT YOU MAY RECONNECT SHORTLY."); ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_METEOR_SWARM), lVis, 5.0); oWarn = GetNextPC(); } } //4.33 hours after server has been up...crash server //This is not a great idea, but I left it in regaurdless.. //2602 if (timekeeper >= 2602){ WriteTimestampedLogEntry("Attempting to Crash Server "); SetListening(PoA, TRUE); SetListenPattern(PoA,"**", 2500); WriteTimestampedLogEntry("Crash Server attempted"); } }