Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2008, 02:25 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
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
  #3  
Old 02-24-2008, 06:27 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Woot, that works! Now I just need to figure out how to crash the zone lol. Might have this up and running tonight (I hope).
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 02-24-2008, 11:11 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Getting an NPC to crash a zone is apparently much harder than I suspected it would be. Seems like the devs made the emu too stable :P

So far I have tried:
quest::castspell(12011,0000) - to cast a spell on itself that doesn't exist.
quest::castspell(12011,13) - To have the NPC cast a spell on itself that does exist while it is wearing an item with an "unknown spell" for the focus type.
quest::selfcast(0000) - Does nothing without a target.
quest::depop(1111111111) - to depop a mob that doesn't exist.
quest::spawn(19011,0,0,0,0,-20) to spawn a mob I made that has a buff spell list I created which the spells in the list don't exist. The mob spawns, but doesn't cast anything.
quest::echo(#zoneshutdown) - Wouldn't it be awesome if that actually worked?
quest::shout("spam spam spam spam etc for about 10 lines worth") - Does the shout, but just truncates it.


I have been working on this for hours and can't figure out a way to do it. If anyone knows of a sure way to crash a zone without lagging the entire server, please let me know! Or if someone knows how to make a perl call that will let an NPC run the GM command for #zoneshutdown, that would be ideal!

Once I get this crash or shutdown working, this script will be ready to start using. I really think it will help clear up server lag enough to allow quite a few more players on a server at once, as well as less intervention from admins to reset the server daily. My events log on my PC reports 800 connections sometimes, even though I only get a max of 60ish on at once... I have a feeling that a lot of those connections are just left overs that can be cleared up with a zone reset or crash.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 02-25-2008, 02:15 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Wish I could help you there, but the only sure-fire zone crash I've found is to have my girlfriend's bard try to zone in =P
Reply With Quote
  #6  
Old 02-25-2008, 09:50 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Derail:
LOL. Looks like a client issue to me. Did the fresh install of Titanium fix the problem? I would suspect that the problem was a bad copy of titanium (most likely illegal).

Back to the current issue, I am still looking for a way to reset or crash a zone via NPC script/quest.

More failed crash attempts:
quest::addloot(111111111); - bogus item ID, but it had no effect.
quest::settimer("reset",1); - restarted the same timer over and over without stopping it. The timer restarted and the shout went out every second, but no crash...
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #7  
Old 02-25-2008, 10:15 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by trevius View Post
Derail:

Back to the current issue, I am still looking for a way to reset or crash a zone via NPC script/quest.
Try putting
Code:
CORE::Dump();
in your script. Crashes my zone under Linux.

Code:
sub EVENT_SAY {
 if($text =~ /Hail/i) {
        quest::say('Hello. I am the guild master.');
        CORE::dump()

 }
}
Edit: I just tried it in Windows ... says it's not supported there.

Last edited by Derision; 02-25-2008 at 06:19 PM..
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:00 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3