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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-14-2011, 01:42 AM
Expletus
Hill Giant
 
Join Date: Jan 2010
Location: Baltimore Maryland
Posts: 152
Default Spawn2 // Itemturn in

Was trying to get an npc to assign the task (which it did) and upon turn in of 4 of the same item it would depop and spawn another mob in its place. Tried several variations and just couldn't figure this out. Where did I go wrong? The elseif part?

Code:
sub EVENT_SAY {
 
	my $help = quest::saylink("help");
	my $assist = quest::saylink("assist");

	$client->Message(7, "-");
	my $NPCName = $npc->GetCleanName();

	if (quest::istaskactive(226) || quest::istaskcompleted(226))
	{
		$client->Message(315, "$NPCName whispers to you, 'What are you waiting for? Don't make me skunk you up.");
	}
	else
	{
		if ($text =~/Hail/i)
		{
			$client->Message(315, "$NPCName whispers to you, 'Please wait, $name! I need your [$help].");
		}

		if ($text =~/help/i)
		{
			$client->Message(315, "$NPCName whispers to you, 'I was turned into a skunk by Xalgoz when they invaded. Since I dabbled in some magic, I know essence of shadow can reverse this particular spell. If you can [$assist] me and bring me 4 essences, I will give this shiney thing I found.");
		}

		if ($text =~/assist/i)
		{
			$client->Message(315, "$NPCName whispers to you, 'Bring me 4 of those essences and please do hurry.");
			quest::assigntask(226);
		}
	}

}

sub EVENT_ITEM 
{
	$x = $npc->GetX();
	$y = $npc->GetY();
	$z = $npc->GetZ();
	$h = $npc->GetHeading();
	$entid1 = quest::spawn2(58083,0,0,$x,$y,$z,$h);
  
  if (plugin::check_handin(\%itemcount, 119782=> 4))
    {
      quest::spawn2(58083,0,0,$x,$y,$z$h);
      quest::shout2("Fool you have unleashed me!");
      quest::ding ();
      quest::depop(58082);
    }
  elsif(plugin::check_handin(\%itemcount, $_=> 1)) 
    {
	$client->Message(315, "$NPCName whispers to you, 'Not quite there yet, ace.");
	quest::summonitem($turnins[$i]);
   		}
   plugin::return_items(\%itemcount);

}
__________________
Expletus / Volgar
Reply With Quote
 


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 03:11 AM.


 

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