View Single Post
  #1  
Old 08-17-2011, 03:59 AM
Kingmen30264
Hill Giant
 
Join Date: Sep 2006
Posts: 112
Default Quest based on class

I am trying to make a custom quest that allows ONE NPC to give out the proper class reward with a single item turn in (For now).

Right now when I do the turn in, it ONLY works for the first line (Beastlord).


Here is what I have:

Code:
#####
#NPC: Epic Test
#Author: Warlore
#####

sub EVENT_SAY
{

my $Epic = quest::saylink("Epic");

  if($text=~/hail/i)
    {
      plugin::Whisper("Hello there $name. You have caught me at somewhat of a bad time. I am just finishing this item that I beleive will be [$Epic].");
    }
    elsif($text=~/Epic/i)
      {
        plugin::Whisper("Yes, Epic. All I need from you right now is a rusty dagger!");
      }
}

sub EVENT_ITEM
{
  if(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Beastlord")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(57054);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Bard")
    {  
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(77640);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Cleric")
    {  
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(20076);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Warrior")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(60332);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Shadowknight")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(48136);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Magician")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(19839);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Druid")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(62880);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Paladin")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(48147);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Enchanter")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(52962);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Monk")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(67742);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Berserker")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(18609);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Rogue")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(52348);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Necromancer")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(64067);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Ranger")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(62649);
    }
  elsif(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Shaman")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(57405);
    }
  else(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Wizard")
    {
      plugin::Whisper("Thank you for your hard work $name. Enjoy your new weapon!");
      quest::summonitem(16576);
    }
}
When I first tested this, I composed ONLY the first line and when it worked, I simply copied and pasted the line just changing the class specified.

Code:
 if(plugin::check_handin(\%itemcount, 7007 => 1) && $class eq "Beastlord")
Any and all help with this would be great. Thank you in advance.
Reply With Quote