I didn't test this, but maybe something like this?
Code:
sub EVENT_ITEM
{
if($item1 > 0)
{
$itemName = quest::getItemName($item1);
quest::say("Thank you for the $itemName");
}
if($item2 > 0)
{
$itemName = quest::getItemName($item2);
quest::say("...and thank you for the $itemName");
}
if($item3 > 0)
{
$itemName = quest::getItemName($item3);
quest::say("...and thank you for the $itemName");
}
if($item4 > 0)
{
$itemName = quest::getItemName($item4);
quest::say("...and thank you for the $itemName");
}
if($platinum > 0)
{
quest::say("Thank you for the $platinum Platinum");
}
if($gold > 0)
{
quest::say("...and thank you for the $gold Gold");
}
if($silver > 0)
{
quest::say("...and thank you for the $silver Silver");
}
if($copper > 0)
{
quest::say("...and thank you for the $copper Copper");
}
quest::say("...but I'm not interested.");
quest::emote("gives back your stuff");
plugin::return_items(\%itemcount);
if($platinum != 0 || $gold !=0 || $silver != 0 || $copper != 0)
{
quest::givecash($copper, $silver, $gold, $platinum);
}
}