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 05-23-2013, 04:33 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default Quest help...

Why does this crash my zone? Only does it when the PC does NOT have the item.

Code:
sub EVENT_SAY {
  


if ($text =~/Hail/i)
 	{
	if (plugin::check_hasitem($client, 1445)){
		quest::say("The King awaits.");		
      		quest::spawn2(999296,0,0,-118,2439,-262,128);

      }
   }
}
Reply With Quote
  #2  
Old 05-23-2013, 05:22 PM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 270
Default

Quite a while back I had an issue with it crashing when it tried to scan corpses. There might be a fix in the latest quest repository, but I just commented out the corpse check in plugins/check_hasitem.pl.

At the top of the function there's this line:
Code:
my $body_count = $client->GetCorpseCount();
Then the very last check starts with
Code:
#Check corpses
if ($body_count > 0) {
I just commented that all out until the function returned.

--- Edit ---

Another way would be to use plugin::check_hasitem_inv()
__________________
http://dungeoncrawl.us.to
Reply With Quote
  #3  
Old 05-23-2013, 06:19 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

Could it be because it's constantly checking for the item and not stopping so it spawns infinite NPCs and crashes the zone? You could do this, maybe? Just threw it together really fast.
Code:
sub EVENT_SAY 
{
	$check = 0;
	if ($text =~/Hail/i)
 	{
		if(plugin::check_hasitem($client, 1445) && $check == 0)
		{
			quest::say("The King awaits.");		
			quest::spawn2(999296,0,0,-118,2439,-262,128);
			$check = 1;
		}
		else
		{
		}
	}
}
Reply With Quote
  #4  
Old 05-23-2013, 10:35 PM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 270
Default

He's using if blocks so hasitem is checked once per hail. There is no loop.
__________________
http://dungeoncrawl.us.to
Reply With Quote
  #5  
Old 05-24-2013, 01:39 AM
Dunge0nMastr
Hill Giant
 
Join Date: Oct 2002
Location: Rockville, MD
Posts: 124
Default

Quote:
Originally Posted by Tabasco View Post
Quite a while back I had an issue with it crashing when it tried to scan corpses. There might be a fix in the latest quest repository, but I just commented out the corpse check in plugins/check_hasitem.pl.

At the top of the function there's this line:
Code:
my $body_count = $client->GetCorpseCount();
Then the very last check starts with
Code:
#Check corpses
if ($body_count > 0) {

I just commented that all out until the function returned.

--- Edit ---

Another way would be to use plugin::check_hasitem_inv()
We had the same issue on NL with doors with keys causing crashes. Did this fix and we haven't had the same issue since.
__________________
Bront -Server Admin/Owner and Lead Quest Dev for Kildrukaun's Prophecy
http://kpemu.com/
Reply With Quote
  #6  
Old 08-19-2014, 02:36 PM
Leetsauce
Hill Giant
 
Join Date: Apr 2010
Posts: 169
Default

Hate to necro an old thread, but I just ran into this issue. Tobasco's suggestion of commenting out the corpse checking (for servers where corpses serve no purpose or simply do not exist) from checkhasitem.pl seems to address the issue.
Reply With Quote
Reply


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 02:23 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3