View Single Post
  #1  
Old 07-20-2009, 08:58 AM
Capheus
Hill Giant
 
Join Date: Apr 2008
Location: Milwaukee
Posts: 141
Default Return items plugin

This script works great except I get burned by the return items plugin. I have to set up the return items part this way or it returns the items handed in too. I've tried many things and this seems to be the simplest way of doing it. Anyone else got any ideas?


Code:
sub EVENT_ITEM { 


	if(($item1 == 98550) or ($item2 == 98550) or ($item3 == 98550) or ($item4 == 98550)) {  
		$new = ($client->GetRawSkill(59))+($itemcount{98550}*4);
		quest::setskill(59, $new);
	}
	
	if(($item1 == 98551) or ($item2 == 98551) or ($item3 == 98551) or ($item4 == 98551)) {  
		$new = ($client->GetRawSkill(60))+($itemcount{98551}*4);
		quest::setskill(60, $new);
	}		  
 
	if(($item1 == 98552) or ($item2 == 98552) or ($item3 == 98552) or ($item4 == 98552)) {  
		$new = ($client->GetRawSkill(65))+($itemcount{98552}*4);
		quest::setskill(65, $new);
	}

	if(($item1 == 98553) or ($item2 == 98553) or ($item3 == 98553) or ($item4 == 98553)) {  
		$new = ($client->GetRawSkill(64))+($itemcount{98553}*4);
		quest::setskill(64, $new);
	}

	if(($item1 == 98554) or ($item2 == 98554) or ($item3 == 98554) or ($item4 == 98554)) {  
		$new = ($client->GetRawSkill(68))+($itemcount{98554}*4);
		quest::setskill(68, $new);
	}

	if(($item1 == 98555) or ($item2 == 98555) or ($item3 == 98555) or ($item4 == 98555)) {  
		$new = ($client->GetRawSkill(69))+($itemcount{98555}*4);
		quest::setskill(69, $new);
	}

	if(($item1 == 98556) or ($item2 == 98556) or ($item3 == 98556) or ($item4 == 98556)) {  
		$new = ($client->GetRawSkill(63))+($itemcount{98556}*4);
		quest::setskill(63, $new);
	}
		
	if(($item1 == 98557) or ($item2 == 98557) or ($item3 == 98557) or ($item4 == 98557)) {  
		$new = ($client->GetRawSkill(61))+($itemcount{98557}*4);
		quest::setskill(61, $new);
	}

	if(($item1 == 98558) or ($item2 == 98558) or ($item3 == 98558) or ($item4 == 98558)) {  
		$new = ($client->GetRawSkill(57))+($itemcount{98558}*4);
		quest::setskill(57, $new);
	}

	elsif  ((plugin::check_handin(\%itemcount,98550=>1) == 0) or
		(plugin::check_handin(\%itemcount,98551=>1) == 0) or
		(plugin::check_handin(\%itemcount,98552=>1) == 0) or
		(plugin::check_handin(\%itemcount,98553=>1) == 0) or
		(plugin::check_handin(\%itemcount,98554=>1) == 0) or
		(plugin::check_handin(\%itemcount,98555=>1) == 0) or
		(plugin::check_handin(\%itemcount,98556=>1) == 0) or
		(plugin::check_handin(\%itemcount,98557=>1) == 0) or
		(plugin::check_handin(\%itemcount,98558=>1) == 0)) {
		plugin::return_items(\%itemcount); 
	}
	

}
Reply With Quote