Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 07-24-2009, 03:50 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Try this:

Code:
sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 98550 => 1) || plugin::check_handin(\%itemcount, 98550 => 2) || plugin::check_handin(\%itemcount, 98550 => 3) || plugin::check_handin(\%itemcount, 98550 => 4)) {
    $new = ($client->GetRawSkill(59))+($itemcount{98550}*4);
    quest::setskill(59, $new);
  }
  elsif(plugin::check_handin(\%itemcount, 98551 => 1) || plugin::check_handin(\%itemcount, 98551 => 2) || plugin::check_handin(\%itemcount, 98551 => 3) || plugin::check_handin(\%itemcount, 98551 => 4)) {
    $new = ($client->GetRawSkill(60))+($itemcount{98551}*4);
    quest::setskill(60, $new);
  }
  elsif(plugin::check_handin(\%itemcount, 98552 => 1) || plugin::check_handin(\%itemcount, 98552 => 2) || plugin::check_handin(\%itemcount, 98552 => 3) || plugin::check_handin(\%itemcount, 98552 => 4)) {
    $new = ($client->GetRawSkill(65))+($itemcount{98552}*4);
    quest::setskill(65, $new);
  }
  elsif(plugin::check_handin(\%itemcount, 98553 => 1) || plugin::check_handin(\%itemcount, 98553 => 2) || plugin::check_handin(\%itemcount, 98553 => 3) || plugin::check_handin(\%itemcount, 98553 => 4)) {
    $new = ($client->GetRawSkill(64))+($itemcount{98553}*4);
    quest::setskill(64, $new);
  }
  elsif(plugin::check_handin(\%itemcount, 98554 => 1) || plugin::check_handin(\%itemcount, 98554 => 2) || plugin::check_handin(\%itemcount, 98554 => 3) || plugin::check_handin(\%itemcount, 98554 => 4)) {
    $new = ($client->GetRawSkill(68))+($itemcount{98554}*4);
    quest::setskill(68, $new);
  }
  elsif(plugin::check_handin(\%itemcount, 98555 => 1) || plugin::check_handin(\%itemcount, 98555 => 2) || plugin::check_handin(\%itemcount, 98555 => 3) || plugin::check_handin(\%itemcount, 98555 => 4)) {
    $new = ($client->GetRawSkill(69))+($itemcount{98555}*4);
    quest::setskill(69, $new);
  }
  elsif(plugin::check_handin(\%itemcount, 98556 => 1) || plugin::check_handin(\%itemcount, 98556 => 2) || plugin::check_handin(\%itemcount, 98556 => 3) || plugin::check_handin(\%itemcount, 98556 => 4)) {
    $new = ($client->GetRawSkill(63))+($itemcount{98556}*4);
    quest::setskill(63, $new);
  }
  elsif(plugin::check_handin(\%itemcount, 98557 => 1) || plugin::check_handin(\%itemcount, 98557 => 2) || plugin::check_handin(\%itemcount, 98557 => 3) || plugin::check_handin(\%itemcount, 98557 => 4)) {
    $new = ($client->GetRawSkill(61))+($itemcount{98557}*4);
    quest::setskill(61, $new);
  }
  elsif(plugin::check_handin(\%itemcount, 98558 => 1) || plugin::check_handin(\%itemcount, 98558 => 2) || plugin::check_handin(\%itemcount, 98558 => 3) || plugin::check_handin(\%itemcount, 98558 => 4)) {
    $new = ($client->GetRawSkill(57))+($itemcount{98558}*4);
    quest::setskill(57, $new);
  }
  else {
    plugin::return_items(\%itemcount);
  }
}
Reply With Quote
  #3  
Old 07-24-2009, 09:03 AM
Capheus
Hill Giant
 
Join Date: Apr 2008
Location: Milwaukee
Posts: 141
Default

Yes that looks like it works too. I might have had some variation of that among the dozen ways I re-re-rewrote it
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:33 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3