Could it be that here
Code:
if ($itemcount{9998} => 0){quest::summonitem("5042"); }
if ($itemcount(9999} => 0){quest::summonitem("6030"); }
if ($itemcount{55623} => 0){quest::summonitem("5071"); }
the ($itemcount{9998} => 0) string, shouldn't that be set to 1? I dont really use this format so not sure if thats right or not though.