View Single Post
  #7  
Old 11-25-2009, 06:51 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

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);
	}
}
Reply With Quote