Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2011, 01:41 AM
LordAdakos
Sarnak
 
Join Date: Dec 2007
Posts: 57
Default Multiple Hand/Turn in Catching First only

I'm using this script so people can collect quest items and then figure out on their own how to do the turn in. They have to collect the three items (two stones and blood) and then turn them all in.
If they turn in just one stone, or the other stone, or the blood itself, the script catches and thinks that the turn-in was activated for whichever item is found first. Is there a way for the hand in to check if ALL the items are there, not just a first match ? -- Would this be achieved by using separate IF statements instead of elsif?

Code:
sub EVENT_ITEM {
if  (plugin::check_handin(\%itemcount,2633 => 1)) {
quest::say("No No No! This Is only part of what I need! bring me the other part of the stone and the stonecrafter blood");
quest::summonitem(2633);
}
elsif  (plugin::check_handin(\%itemcount,2634 => 1)) {
quest::say("No No No! This Is only part of what I need! bring me the other part of the stone and the stonecrafter blood");
quest::summonitem(2634);
}
elsif  (plugin::check_handin(\%itemcount,2614 => 1)) {
quest::say("No No No! This Is only part of what I need! bring me the other two part of the stone!");
quest::summonitem(2614);
}
elsif (plugin::check_handin(\%itemcount,2633 => 1,2632 => 1, 2634 => 1, 2614 =>1)) {
$client->Message(19, "An explosion rends the air around the old man as he inscribes the lettings upon the stone.");
quest::say("I've done it. I've restored the stone of Trakanon! After all these years... Finally! Take this back to Attendant Maser aboard his ship. Go now! Quickly!");
quest::summonitem(2717);
}
elsif  (plugin::check_handin(\%itemcount,2717 => 1)) {
quest::say("No No No! This goes to Maser. I just saw this when I inscribed it for you, fool. Now go!");
quest::summonitem(2717);
}
else {
plugin::return_items(\%itemcount);
plugin::Whisper("What's this, who are you, whats going on here, you better not be trying to get frisky, you whippersnapper...");
}
 }
Reply With Quote
  #2  
Old 12-03-2011, 02:40 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Put this line first:

if (plugin::check_handin(\%itemcount,2633 => 1,2632 => 1, 2634 => 1, 2614 =>1))
Reply With Quote
  #3  
Old 12-03-2011, 09:21 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Right. Always put the largest requirements first.
Reply With Quote
Reply


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 02:29 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3