View Single Post
  #4  
Old 02-24-2008, 05:47 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Try this:
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 ($timer eq "warning1"){
    quest::stoptimer("warning1");
    quest::shout("NEXUS will be restarting in 60 seconds.  Please zone out before that time.");
  }

  if ($timer eq "warning2"){
    quest::stoptimer("warning2");
    quest::shout("NEXUS will be restarting in 30 seconds.  Please zone out before that time.");
  }

  if ($timer eq "warning3"){
    quest::stoptimer("warning3");
    quest::shout("NEXUS will be restarting in 20 seconds.  Please zone out before that time.");
  }

  if ($timer eq "warning4"){
    quest::stoptimer("warning4");
    quest::shout("NEXUS will be restarting in 10 seconds.  Please zone out before that time.");
  }

  if ($timer eq "warning5"){
    quest::stoptimer("warning5");
    quest::shout("NEXUS will be restarting in 5 seconds.  Please zone out before that time.");
  }

  if ($timer eq "warning6"){
    quest::stoptimer("warning6");
    quest::shout("NEXUS will be restarting in 1 seconds.  Please zone out NOW!");
  }

  if ($timer eq "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);
  }
}
I've never used $timername, just $timer, and it's always worked fine for me. Also, "==" may work just as well as "eq", but I felt safer taking it from quest files that I have working right now. Without a good chance to test yours, I figured I'd go only with what I know to work 100%. Only test one variable at a time, and such

Anyway, give that a shot. I like the idea, to be sure.
Reply With Quote