LordAdakos
12-03-2011, 01:41 AM
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?
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...");
}
}
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?
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...");
}
}