This assigns the itemids given to $i: foreach my $i(keys %{$itemcount}) {
I would think isdisctome($i) only checks if the item is a discipline tome.
Maybe you are thinking too far outside the box?
Psuedo:
Code:
if (plugin::check_handin(\%itemcount, tomeid => 1)) {
if (special_person_only || special_case_only) {
quest::traindisc(tomeid);
}
}