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 01-28-2010, 08:03 PM
Forgotten1
Fire Beetle
 
Join Date: Jan 2010
Posts: 4
Default Can't figure this out

I'm trying to build a quest template i'll use for a weapon NPC. The part I can't get to work is the class checks on the items. It seems like he's not doing them at all. I removed warrior as a class, then tried a turn in after reloading quests and he still gave me all of the items. This is a problem since the actual items he gives will be class specific!

I've been trying to figure out what I have wrong for 2 hours now, but alas I'm still stuck. Any help would be appreciated..I'm new to this.

Code:
sub EVENT_SAY
{
my $locate = quest::saylink("What do you need me to find?", 0, "locate");

	if($text=~/hail/i && $qglobals{startweap} == 0)
	{
		quest::say("Hrm, Zilgru sent another one of ya to me huh?  Alright, here's yer weapon.  It was clean, lucky for you.  Speak to me again and maybe we can work on getting you something with a little more bang...");
		quest::setglobal("startweap","1","0","F");
		quest::summonitem("1079");
		quest::summonitem("1096");
	}

	if ($text=~/hail/i && $qglobals{startweap} == 1)
	 {
	 quest::say("What's that? Ah right, I said I would help you make a better weapon.  Well you see, I may be a Master Weaponsmith, but that does not mean I can make a weapon out of this carpet under my feet!  You will need to [$locate] certain items for me.");
	 }
	 if ($text=~/find/i && $qglobals{startweap} == 1)
	 {
	 quest::setglobal("startweap","2","0","F");
	 quest::say("Well let me think will ya?  You can't gather the right stuff to make anything too powerful yet, no no yer much too young to be able to gather those materials. Ahah, yes that's the one!  Okay, $name, in order to create your weapon I will need two Forgotten Rat Tails and Fang of a Forgotten Snake. Bring me those items, and I shall create yer first true weapon.");
		 }
	
	if ($text=~/hail/i && $qglobals{startweap} == 2)
	 {
	 quest::say("What are ye waitin' for? Go gather those items!  Bring me those two Forgotten Rat Tails and that Fang of a Forgotten Snake.  That slithering bugger, he's a tough one to catch..");
	 }
	 }
	 
	 
	sub EVENT_ITEM
{
	if(($itemcount{1333} == 2) && ($itemcount{1340} == 1) && ($qglobals{startweap} == 2) && ($class == "Ranger, Beastlord"))
		{
			quest::say("Not bad, maybe you're not as feable as I thought you were.  Next time I will have a task that's much more challenging..");
			quest::summonitem("1192");
			quest::summonitem("25716");
			quest::summonitem("25719");
			quest::summonitem("25723");
			quest::summonitem("1266");
			quest::summonitem("1267");
			quest::summonitem("1270");
			}
elsif(($itemcount{1333} == 2) && ($itemcount{1340} == 1) && ($qglobals{startweap} == 2) && ($class == "Monk"))
	{
			quest::say("Not bad, maybe you're not as feable as I thought you were.  Next time I will have a task that's much more challenging..");
			quest::summonitem("1192");
			quest::summonitem("25716");
			quest::summonitem("25719");
			quest::summonitem("25723");
			quest::summonitem("1266");
			quest::summonitem("1267");
			quest::summonitem("1270");
			}
elsif(($itemcount{1333} == 2) && ($itemcount{1340} == 1) && ($qglobals{startweap} == 2) && ($class == "Warrior, Bard, Ranger"))
	{
			quest::say("Not bad, maybe you're not as feable as I thought you were.  Next time I will have a task that's much more challenging..");
			quest::summonitem("1192");
			quest::summonitem("25716");
			quest::summonitem("25719");
			quest::summonitem("25723");
			quest::summonitem("1266");
			quest::summonitem("1267");
			quest::summonitem("1270");
			}
elsif(($itemcount{1333} == 2) && ($itemcount{1340} == 1) && ($qglobals{startweap} == 2) && ($class == "Cleric, Druid, Shaman"))
	{
			quest::say("Not bad, maybe you're not as feable as I thought you were.  Next time I will have a task that's much more challenging..");
			quest::summonitem("1192");
			quest::summonitem("25716");
			quest::summonitem("25719");
			quest::summonitem("25723");
			quest::summonitem("1266");
			quest::summonitem("1267");
			quest::summonitem("1270");
			}
elsif(($itemcount{1333} == 2) && ($itemcount{1340} == 1) && ($qglobals{startweap} == 2) && ($class == "Necromancer, Wizard, Magician, Enchanter"))
	{
			quest::say("Not bad, maybe you're not as feable as I thought you were.  Next time I will have a task that's much more challenging..");
			quest::summonitem("1192");
			quest::summonitem("25716");
			quest::summonitem("25719");
			quest::summonitem("25723");
			quest::summonitem("1266");
			quest::summonitem("1267");
			quest::summonitem("1270");
			}
elsif(($itemcount{1333} == 2) && ($itemcount{1340} == 1) && ($qglobals{startweap} == 2) && ($class == "Berserker, Shadowknight, Paladin"))
	{
			quest::say("Not bad, maybe you're not as feable as I thought you were.  Next time I will have a task that's much more challenging..");
			quest::summonitem("1192");
			quest::summonitem("25716");
			quest::summonitem("25719");
			quest::summonitem("25723");
			quest::summonitem("1266");
			quest::summonitem("1267");
			quest::summonitem("1270");
			}
    else {
      quest::say("Sorry, your class does not get an epic on this server.");
      quest::summonitem(1387);
    }
  }
  else {
    quest::say("I do not need this.");
    plugin::return_items(\%itemcount);
  }
}
Thanks.
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 02:39 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3