Was just about to crash for the night.
Code:
elsif (($ulevel <= 5) && (!defined $qglobals{jep_knife})) ## If this quest line done why go any farther?
{
if ((plugin::check_handin(\%itemcount, 1377 =>1 )))
{
quest::setglobal("jep_knife","1","4","M30");
quest::exp("20000");
quest::ding();
}
}
else
{
plugin::return_items(\%itemcount);
plugin::Whisper("I don't want that. Here, take it back, $name.");
}
}
You're looking for an item match a quest line that the person may not be eligible for due to the defined qglobal, rather than checking if they can do it first.
That will cause the hiccup as well as not returning the item.. because you're telling it item 1377 in a quantity of 1 is a valid item, with the check_handin, so it is removing that item from the hash, thus, won't return it even with the return_items call.
Hope the above fixes the issue, if not it should at least get you started, am to "wake up" in two hours due to a forgotten appointment. Got to run. Good luck.