View Single Post
  #5  
Old 02-04-2008, 10:47 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Here is the current armor quest I use for 1 single slot. I am wanting to make a similar one that lets them turn in their class armor and 1 item for an upgraded armor piece. I am putting this here as a reference, and this does work fine:

Code:
sub EVENT_ITEM {
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowkight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Mage' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1319 => 1)) {
    my %rewards = (
"Warrior" => 4917, "Rogue" => 4907, "Monk" => 1206, "Berserker" => 55607, "Shadowknight" => 9829, "Paladin" => 9829, "Ranger" => 9829, "Bard" => 9829, "Beastlord" => 9829, "Cleric" => 9829, "Druid" => 9829, "Shaman" => 9829, "Wizard" => 9829, "Mage" => 9829, "Enchanter" => 9829, "Necromancer" => 9829
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
      quest::emote("Works to make a piece of armor from the instructions you provided to him." );
      quest::say ("Here you go $name.");
    }
}
 	else {
 	    plugin::return_items(\%itemcount);
    	quest::say("I have no use for this item, $name.  Take it back.");
	}  
}
}

I tried using Theeper's script, but it just eats my items. The items in this are 1577 (main drop), 1579, 1581, and 1582 (which I want any to work for turn in along with main drop), and 1658 which is supposed to be the reward. Of course, if I could get this working, the reward would be different for each possible turn in combo. So, if a paladin turns in a bracer and the 1577 drop, he would get an upgraded bracer. Here is exactly what I used as a test:
Code:
sub EVENT_ITEM {

   my $item_1 = 1577;
   %items = (
      1579 => 1658,
      1581 => 1658,
      1582 => 1658,
   );
  
   if (plugin::check_handin(\%itemcount, $item_1 => 1)) {

      For my $items (sort keys %items) {

         if (plugin::check_handin(\%itemcount, $items => 1)) {
            quest::summonitem($items{$items}); 
         }
      }
   }
}
If anyone knows of a way that will work, or anything I am missing, I would greatly appreciate the help lol. I have already spent hours on this, but I just don't want to do it the long way. Much more room for error and much harder to read through if I do each turn in individually with it's own reward, even though it would be an easy script to write.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote