very inefficient to loop through the entire list of valid charms (100?) instead of just checking the item ids that were turned in (max of 4).
put this at the top of your file to be able to use the ~~ operator:
Code:
foreach my $itemid (%itemcount)
{
next unless $itemid ~~ [140126..140225];
if (plugin::check_handin(\%itemcount, $charmid => 1, 140226 => 1))
{
plugin::Whisper("Here is your upgraded charm!");
quest::summonitem($itemid+1, 1);
}
}
plugin::return_items(\%itemcount);
quest::givecash($copper, $silver, $gold, $platinum);