View Single Post
  #4  
Old 06-14-2016, 05:57 AM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default

I was still having some peculiar issues, that aside though.. my next issue is..

I'm trying to check_handin and it seems to always be empty with itemcount, so, i'm trying to pass itemcount, similar to how check_handin does it.

Code:
plugin::velious_armor_handin($zoneid, $cash, $client->GetClass(), \%itemcount)
I call it itemref. the Got Item! line never triggers, even if I use proper item id.
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;
}
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote