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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #14  
Old 02-10-2015, 03:51 PM
utbbop
Sarnak
 
Join Date: May 2009
Location: Mentor
Posts: 58
Default

Quote:
Originally Posted by NatedogEZ View Post
This may work .. now that I know what you are asking for.

Place all rewards into the correct spot...
Place all possibly turn in items into @item_list...

This will ONLY work if they are single slot items and they match.. (helms give helms.. ect ect...)


Turning in any helm from the list of items will give you your class helm.. ect..

Code:
sub EVENT_ITEM {
	my %rewards = (		   #head arm  bracer hands chest legs  feet
		"Warrior"		=> [4515, 4517, 4518, 4519, 4516, 4520, 4521],  #All the cobalt set.. (for testing)
		"Rogue"			=> [2828, 1001, 1002, 1003, 1004, 1005, 1006],
		"Monk"			=> [2444, 1001, 1002, 1003, 1004, 1005, 1006],
		"Berserker"		=> [2684, 1001, 1002, 1003, 1004, 1005, 1006],
		"Shadowknight"	=> [1819, 1001, 1002, 1003, 1004, 1005, 1006],
		"Paladin"		=> [1810, 1001, 1002, 1003, 1004, 1005, 1006],
		"Ranger"		=> [2493, 1001, 1002, 1003, 1004, 1005, 1006],
		"Bard"			=> [1846, 1001, 1002, 1003, 1004, 1005, 1006],
		"Beastlord"		=> [2562, 1001, 1002, 1003, 1004, 1005, 1006],
		"Cleric"		=> [1803, 1001, 1002, 1003, 1004, 1005, 1006],
		"Druid"			=> [2434, 1001, 1002, 1003, 1004, 1005, 1006],
		"Shaman"		=> [2665, 1001, 1002, 1003, 1004, 1005, 1006],
		"Wizard"		=> [2422, 1001, 1002, 1003, 1004, 1005, 1006],
		"Magician"		=> [2278, 1001, 1002, 1003, 1004, 1005, 1006],
		"Enchanter"		=> [2561, 1001, 1002, 1003, 1004, 1005, 1006],
		"Necromancer"	=> [2381, 1001, 1002, 1003, 1004, 1005, 1006]
	);
	my %reward_type = (
	 4			=> 0,  #Head  
	 128		=> 1,  #Arm
	 1536		=> 2,  #Bracer 
	 4096		=> 3,  #hands
	 131072		=> 4,  #chest
	 262144		=> 5,  #legs
	 524288		=> 6   #feet
	);

	my @item_list = (1001, 1004, 1008, 1009, 1010, 1011, 1012); #THIS would be ALL items that are turned IN
	my $item_turnin = 0;
	if (grep { $_ == $item1 } @item_list) { $item_turnin = $item1; }
	elsif (grep { $_ == $item2 } @item_list) { $item_turnin = $item2; }
	elsif (grep { $_ == $item3 } @item_list) { $item_turnin = $item3; }
	elsif (grep { $_ == $item4 } @item_list) { $item_turnin = $item4; }

	if($item_turnin > 0) {
		my $slots = $client->GetItemStat($item_turnin, "slots");
		if (plugin::check_handin(\%itemcount, $item_turnin => 1)) {
			quest::summonitem($rewards{$class}[$reward_type{$slots}]);
			quest::emote("Works to make a piece of armor from the instructions you provided to him." );
			quest::say ("Here you go $name.");
		}
	}
	
	plugin::return_items(\%itemcount);
}
Ok, this may work.
I will give it a whirl and let you all know the results.
Reply With Quote
 

Thread Tools
Display Modes

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 03:28 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3