UW2_PRC8/_module/nss/dieserverdie.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

103 lines
3.4 KiB
Plaintext

void main()
{
int timekeeper = GetLocalInt(GetModule(), "loadtimer");
object PoA = (GetModule());
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();
ExportAllCharacters();
}
}
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();
}
}
if (timekeeper >= 2602){
WriteTimestampedLogEntry("Attempting to Crash Server ");
SetListening(PoA, TRUE);
SetListenPattern(PoA,"**", 2500);
WriteTimestampedLogEntry("Crash Server attempted");
StartNewModule ("UNDERWORLD");
}
}