Just an option, but you should use the check_handins.pl plugin to check for handin success or failure.
Example:
Code:
if (plugin::check_handin(\%itemcount, 13128 => 1)) {
...do stuff...
}
Always end your EVENT_ITEM with:
Code:
plugin::return_items(\%itemcount);
and you won't lose items should something go wrong. You can do it the way you wrote it, too... but I think you might have a syntax problem around the $itemcount{###} <-- curlies instead of parens? Been a while since I've done it that way, can't remember if that's right.
Also, it is advisable in your EVENT_SAY to only check for exactly what you [bracket] in the previous text... while we're all used to having proper english conversations with our NPCs, it's likely they only cared about their [bracketed] word only.