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
  #3  
Old 02-04-2008, 12:14 PM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

I wouldn't use $item1, $item2 etc. as variables, they are already defined when an item is handed in.

You could do it by creating a hash of the possible "$item2" handins and loop through it to see if any of that item was turned in.

Something like this should work for you. Where the keys in the hash represent the itemID's of the handed-in item, and the values are the item to give back to the player.

Code:
sub EVENT_ITEM {

   my $item_1 = 12345;
   %items = (
      11111 => 22222,
      33333 => 44444,
      55555 => 66666,
   );
  
   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}); 
         }

      }

   }

}
Of course you'd need some extra logic to make sure only one item is returned back to the player.

Last edited by Theeper; 02-04-2008 at 08:17 PM..
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 08:46 AM.


 

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