View Single Post
  #6  
Old 01-29-2010, 04:44 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Looks like this is a work in progress for you as there are duplicates, etc. So you can try this and work with it more:

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

  if($text=~/hail/i) {
    if(!defined($qglobals{startweap})) { #PC has not started the quest
      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);
    }
    elsif($qglobals{startweap} == 1) { #PC has received items but needs instructions
      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.");
    }
    elsif($qglobals{startweap} == 2) { #PC has received items and instructions
      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..");
    }
  }
  if($text=~/find/i && (defined($qglobals{startweap}) && ($qglobals{startweap} == 1)) { #PC has items and will get instructions
    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.");
  }
}
	 
	 
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 1333 => 2, 1340 => 1)) {
    if(defined($qglobals{startweap}) && ($qglobals{startweap} == 2)) {
      if($class eq "Ranger" || $class eq "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($class eq "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($class eq "Warrior" || $class eq "Bard" || $class eq "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($class eq "Cleric" || $class eq "Druid" || $class eq "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($class eq "Necromancer" || $class eq "Wizard" || $class eq "Magician" || $class eq "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($class eq "Berserker" || $class eq "Shadowknight" || $class eq "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 { #Catch any class not covered
        quest::say("Sorry, your class does not get an epic on this server.");
        quest::summonitem(1333);
        quest::summonitem(1333);
        quest::summonitem(1340);
      }
    }
    else { #PC has not finished proper dialogue
      quest::say("Why did you bring me these?");
      quest::summonitem(1333);
      quest::summonitem(1333);
      quest::summonitem(1340);
    }
  }
  else { #PC did not give proper items
    quest::say("I do not need this.");
    plugin::return_items(\%itemcount);
  }
}
Reply With Quote