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-14-2016, 05:17 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default

Thanks c0ncrete. So the answer to my question is: \%{$itemref}

Code:
sub velious_armor_handin {
	my $zoneid = shift;
	my $cash = shift;
	my $classid = shift;
	my $itemref = shift; #I don't know if perl does a pointer reference or what, emulating check_handin's code to pass along
	my $armor_list = plugin::velious_armor_list();
		
	for $x (0...6) {
		$slot = $armor_list[$zoneid][$classid][$x]{slot};
		$item = $armor_list[$zoneid][$classid][$x]{item};
		$reward = $armor_list[$zoneid][$classid][$x]{reward};
		quest::say("Looking for $slot in $item for reward $reward");		
		if (plugin::check_handin(\%{$itemref}, $item => 1)) { #i'm passing itemref here, to check_handin.
			quest::say("Got item!"); #this line never echos.
			if ($cash >= (plugin::pricing_by_slot($slot)*1000)) {
				quest::summonitem($reward);
				return 1;
			} else { #fail!
				return 0;
			}
		}
	}
	return 0;
}

ghanja sent me a PM that informed shift is destructive and pulls data out of the argument list @_ so, I will keep that in mind while I finish fixing other issues.

This is all complete, and I posted the solutions to my question on each part, for anyone else who may have similar questions.

Thanks for your help guys.
__________________

~Shin Noir
DungeonEQ.com

Last edited by Shin Noir; 06-14-2016 at 05:23 PM..
Reply With Quote
Reply

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 12:01 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