I am still looking into a way to make this happen with the current quest options. I am currently trying to use timers to give the warnings and initiate the actual reset. So far the timers I have aren't working at all. Maybe I am missing something. I haven't tried setting up timers before, so I am not exactly sure how they are supposed to work.
Here is what I have so far:
Code:
#Fast Zone Reset Test
my $counter;
sub EVENT_SPAWN {
quest::settimer("reset",61);
quest::settimer("warning1",1);
quest::settimer("warning2",31);
quest::settimer("warning3",41);
quest::settimer("warning4",51);
quest::settimer("warning5",56);
quest::settimer("warning6",60);
$counter = 0;
}
sub EVENT_TIMER{
if ($timername == "warning1"){
quest::stoptimer("warning1");
quest::shout("NEXUS will be restarting in 60 seconds. Please zone out before that time.");
}
if ($timername == "warning2"){
quest::stoptimer("warning2");
quest::shout("NEXUS will be restarting in 30 seconds. Please zone out before that time.");
}
if ($timername == "warning3"){
quest::stoptimer("warning3");
quest::shout("NEXUS will be restarting in 20 seconds. Please zone out before that time.");
}
if ($timername == "warning4"){
quest::stoptimer("warning4");
quest::shout("NEXUS will be restarting in 10 seconds. Please zone out before that time.");
}
if ($timername == "warning5"){
quest::stoptimer("warning5");
quest::shout("NEXUS will be restarting in 5 seconds. Please zone out before that time.");
}
if ($timername == "warning6"){
quest::stoptimer("warning6");
quest::shout("NEXUS will be restarting in 1 seconds. Please zone out NOW!");
}
if ($timername == "reset"){
quest::stoptimer("reset");
quest::shout2("Nexus is being restarted right now! It will be back immediately, so you can zone back in right away.");
quest::echo("#zoneshutdown nexus");
quest::castspell(186107,35);
}
}
Don't worry about the end of the script. That is where the actual reset or zone crash will happen. I don't have a sure way to make that part happen yet either, but I need to get the timers working properly first and then I will worry about the actual reset.
If anyone can tell me what is wrong with this script, please do! I am at work right now, but I added this in quickly when I had a chance to go home for a few minutes. If there are no replies, I will mess with it more when I get home.
I would really like to get this thing working. I know of at least a few servers with decent size populations that would most likely use a script like this if it works. As soon as I get one working, I will post it in the quest submissions forum to share it with everyone else.
In case you can't tell what this script is supposed to do, it is supposed to give warnings in /shout (will be shout2 after I get it working). Then after the warning count down, it is supposed to reset or crash the zone to clear out all ghosts/connections and anyone else in the zone. The zone should then automatically recover and restart.
One idea I have to crash the zone is to give the NPC a weapon that they will equip that has an unknown focus effect and then have them cast a spell to crash the zone. Or possible give the NPC a weapon with an unknown proc and have them attack another NPC to crash the zone when the proc goes off. If anyone has an easier way to crash a zone or reset it, I would be very glad to hear it!
Thanks