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
  #2  
Old 08-27-2008, 05:09 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Well, I was finally able to get it working with the hash properly! But, for some reason, I can't get the return items plugin working properly for it. The code below works perfectly if you turn in the correct items, but if you turn in the wrong items, it will just eat them. I commented out the return plugin section because it was breaking the script. Basically with the return items plugin set to be used, it causes the return text to be said 3 times and then just returns the item you turned in. This is the case for the first 2 items, but the 3rd (last) item in the hash will actually still turn in properly for some reason.

Code:
sub EVENT_ITEM {

my %turn_ins = (2667 => 3233, 2664 => 3230, 2662 => 3227);

  for my $turn_ins (sort keys %turn_ins) {
    if(defined($turn_ins)) {
      if (plugin::check_handin(\%itemcount, $turn_ins => 1)) {
        quest::say("I see you have turned in item $turn_ins");

        if(defined($turn_ins{$turn_ins})) {
          quest::say("Your reward is item $turn_ins{$turn_ins}");
          quest::summonitem($turn_ins{$turn_ins});
        }
      } 
#  else {
#    plugin::return_items(\%itemcount);
#    quest::say ("I have no use for this item, $name.");
#  }        
    } 
  }
}
Anyone know how to get the return plugin working properly for this? I am guessing that it has something to do with it checking the has with the sort once for each item in the hash and then failing some of the checks to it skips straight to the else before it finishes checking all of the keys in the hash for the turn in item ID.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 01:12 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