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-01-2009, 08:23 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default Turn in 3 items for a class-specific weapon

Can anyone tell me what is wrong with this? It all works up until the turn in where he will eat the items and give no reward.

Code:
#Gives an archtype specific item after killing Grummus, Gyrme, Aramin

sub EVENT_SAY { 
if($text=~/Hail/i){
quest::say("There is nothing to be joyous about when speaking in a [land] such as this.");
}
if($text=~/land/i){
quest::emote("sighs deeply");
quest::say("This land, Plane of Disease, is a most sickening place. I wish nothing more than to have it annihilated. It's very existence makes me disgusted. Perhaps, you and some other adventurers will be able to [purify] this land forever.");
}
if($text=~/purify/i){
quest::say("There are three foul [beings] that reside here. I am certain that with them dead, no more filth will be able to survive here.");
}
if($text=~/beings/i){
quest::say("For the sake of Norrath, destroy Gryme the Crypt Guardian, Aramin the Spider Guardian, and finally kill Grummus. Bring to me an item that will prove they are dead.");
}
}

sub EVENT_ITEM {
  if  (plugin::check_handin(\%itemcount, 51624 => 1, 1563 => 1, 1568 => 1)){
  quest::say("My mind can be at ease knowing those fiends are no more.");
  quest::emote("pulls a gleaming weapon out of s bag.");
  quest::say("Take this weapon. I am sure you will be able to make use of it.");
  if($class eq 'Warrior'){quest::summonitem(1569);}
    elsif($class eq 'Cleric'){quest::summonitem(1582);}
    elsif($class eq 'Paladin'){quest::summonitem(1577);}
    elsif($class eq 'Ranger'){quest::summonitem(1569);}
    elsif($class eq 'Shadowknight'){quest::summonitem(1577);}
    elsif($class eq 'Druid'){quest::summonitem(1582);}
    elsif($class eq 'Monk'){quest::summonitem(1579);}
    elsif($class eq 'Bard'){quest::summonitem(1569);}
    elsif($class eq 'Rogue'){quest::summonitem(1581);}
    elsif($class eq 'Shaman'){quest::summonitem(1582);}
    elsif($class eq 'Necromancer'){quest::summonitem(1581);}
    elsif($class eq 'Wizard'){quest::summonitem(1581);}
    elsif($class eq 'Magician'){quest::summonitem(1581);}
    elsif($class eq 'Enchanter'){quest::summonitem(1581);}
    elsif($class eq 'Beastlord'){quest::summonitem(1579);}
    elsif($class eq 'Berserker'){quest::summonitem(1577);}
}
}
Reply With Quote
  #2  
Old 02-01-2009, 11:16 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Not sure if it really makes a difference since it is a string...

Have you tried "Warrior" instead of 'Warrior' (etc, etc)
Reply With Quote
  #3  
Old 02-02-2009, 12:09 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Yeah I did quotes instead, but it made no difference
Reply With Quote
  #4  
Old 02-02-2009, 03:01 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I think you may be missing a few semicolons at the end:
Code:
sub EVENT_ITEM {
  if (plugin::check_handin(\%itemcount, 51624 => 1, 1563 => 1, 1568 => 1)) {
    quest::say("My mind can be at ease knowing those fiends are no more.");
    quest::emote("pulls a gleaming weapon out of s bag.");
    quest::say("Take this weapon. I am sure you will be able to make use of it.");
    if($class eq 'Warrior') {quest::summonitem(1569);}
      elsif($class eq 'Cleric') {quest::summonitem(1582);}
      elsif($class eq 'Paladin') {quest::summonitem(1577);}
      elsif($class eq 'Ranger') {quest::summonitem(1569);}
      elsif($class eq 'Shadowknight') {quest::summonitem(1577);}
      elsif($class eq 'Druid') {quest::summonitem(1582);}
      elsif($class eq 'Monk') {quest::summonitem(1579);}
      elsif($class eq 'Bard') {quest::summonitem(1569);}
      elsif($class eq 'Rogue') {quest::summonitem(1581);}
      elsif($class eq 'Shaman') {quest::summonitem(1582);}
      elsif($class eq 'Necromancer') {quest::summonitem(1581);}
      elsif($class eq 'Wizard') {quest::summonitem(1581);}
      elsif($class eq 'Magician') {quest::summonitem(1581);}
      elsif($class eq 'Enchanter') {quest::summonitem(1581);}
      elsif($class eq 'Beastlord') {quest::summonitem(1579);}
      elsif($class eq 'Berserker') {quest::summonitem(1577);};
  };
}
On a side note, I would recommend using a switch/case (or possibly an array) instead of a string of if/elsif statements:

Code:
sub EVENT_ITEM {
  if (plugin::check_handin(\%itemcount, 51624 => 1, 1563 => 1, 1568 => 1)) {
    quest::say("My mind can be at ease knowing those fiends are no more.");
    quest::emote("pulls a gleaming weapon out of s bag.");
    quest::say("Take this weapon. I am sure you will be able to make use of it.");
    my $reward = 1001; #Cloth Cap is the booby prize if you're none of these classes
    switch ($class) {
      case "Warrior" {$reward = 1569;}
      case "Cleric" {$reward = 1582;}
      case "Paladin" {$reward = 1577;}
      case "Ranger" {$reward = 1569;}
      case "Shadowknight" {$reward = 1577;}
      case "Druid" {$reward = 1582;}
      case "Monk" {$reward = 1579;}
      case "Bard" {$reward = 1569;}
      case "Rogue" {$reward = 1581;}
      case "Shaman" {$reward = 1582;}
      case "Necromancer" {$reward = 1581;}
      case "Wizard" {$reward = 1581;}
      case "Magician" {$reward = 1581;}
      case "Enchanter" {$reward = 1581;}
      case "Beastlord" {$reward = 1579;}
      case "Berserker" {$reward = 1577;}
    };
  quest::summonitem($reward);
  };
}
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #5  
Old 02-02-2009, 08:02 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

I added the semicolons after those, but the quest still didn't work. Then I changed it to the format you suggested, but it still did the same thing. He just will not hand out a reward. This is how it looks now.


Code:
#Gives an archtype specific item after killing Grummus, Gyrme, Aramin

sub EVENT_SAY { 
if($text=~/Hail/i){
quest::say("There is nothing to be joyous about when speaking in a [land] such as this.");
}
if($text=~/land/i){
quest::emote("sighs deeply");
quest::say("This land, Plane of Disease, is a most sickening place. I wish nothing more than to have it annihilated. It's very existence makes me disgusted. Perhaps, you and some other adventurers will be able to [purify] this land forever.");
}
if($text=~/purify/i){
quest::say("There are three foul [beings] that reside here. I am certain that with them dead, no more filth will be able to survive here.");
}
if($text=~/beings/i){
quest::say("For the sake of Norrath, destroy Gryme the Crypt Guardian, Aramin the Spider Guardian, and finally kill Grummus. Bring to me an item that will prove they are dead.");
}
}

sub EVENT_ITEM {
  if  (plugin::check_handin(\%itemcount, 51624 => 1, 1563 => 1, 1568 => 1)){
  quest::say("My mind can be at ease knowing those fiends are no more.");
  quest::emote("pulls a gleaming weapon out of a bag.");
  quest::say("Take this weapon. I am sure you will be able to make use of it.");
   my $reward = 1001; #Cloth Cap Is the booby prize if you're none of these classes
    switch ($class) {
      case "Warrior" {$reward = 1569;}
      case "Cleric" {$reward = 1582;}
      case "Paladin" {$reward = 1577;}
      case "Ranger" {$reward = 1569;}
      case "Shadowknight" {$reward = 1577;}
      case "Druid" {$reward = 1582;}
      case "Monk" {$reward = 1579;}
      case "Bard" {$reward = 1569;}
      case "Rogue" {$reward = 1581;}
      case "Shaman" {$reward = 1582;}
      case "Necromancer" {$reward = 1581;}
      case "Wizard" {$reward = 1581;}
      case "Magician" {$reward = 1581;}
      case "Enchanter" {$reward = 1581;}
      case "Beastlord" {$reward = 1579;}
      case "Berserker" {$reward = 1577;}
    };
  quest::summonitem($reward);
  };
}
Reply With Quote
  #6  
Old 02-02-2009, 08:56 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Yeah, I've never had to use those semicolons before either.

Question: Does he give you the text and just no item or does he not even give you the text/emotes?

EDIT: Looks like the last 2 items are not in the lucy database. Are they in your custom database?
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 05:33 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