You could make an array of the turn-in items and loop through them. Something like this should work for you.
Code:
@items = (1001, 1002, 1003, 1004, 1005);
sub EVENT_ITEM {
my $accepted_items = 0;
foreach (@items) {
if($itemcount{$_} == 1) ++$accepted_items;
}
if ($accepted_items > 0) {
quest::summonitem(1006);
} else {
plugin::return_items(\%itemcount);
}
}