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 06-17-2019, 10:34 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

Quote:
Originally Posted by Almusious View Post
I -believe- this is what you're looking for (i.e. how to access/use a key in a hash of a hash):

Code:
%combine_1 = (
  1 => { "item1" => 1234, "item2" => 1111, "type" => 1,  "reward" => 11111 }, # Ring
  2 => { "item1" => 1234, "item2" => 2222, "type" => 4,  "reward" => 22222 }, # Veil
  3 => { "item1" => 1234, "item2" => 3333, "type" => 3,  "reward" => 33333 }, # Earring
  4 => { "item1" => 1234, "item2" => 4444, "type" => 1,  "reward" => 44444 }, # Ring
  5 => { "item1" => 1234, "item2" => 5555, "type" => 2,  "reward" => 55555 }, # Necklace
  );
  
{
	foreach my $key (sort keys %combine_1)
	## could be shortened: foreach (sort keys $combine_1)
	{
		if ($combine_1{$key}->{type} == 1)
		## if above shortened: if ($combine_1{$_}->{type} == 1)
		{
			my $itemlink = quest::varlink($combine_1{$key}->{reward});
			## my $itemlink = quest::varlink($combine_1{$_}->{reward});
			$client->Message(15, $itemlink);
		}
	}
}
?
^ this method is working great for what I'm trying to do. This should get my dialog responses down to 6-10 depending on the category, which is much better and I can filter further if needed.
__________________
Clumsy's World: Resurgence [2019-Present]
Clumsy's World 2.0 [2014-2016]
Clumsy's World [2006-2012]
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 01:05 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