View Single Post
  #1  
Old 06-14-2016, 04:28 AM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default Hash Array in Perl Question

I got this little plugin i'm mucking around, this is just a snippet, but the idea is still there:

The problem: quest::say always just says "Requires " once, and never iterates/echos anything of note.

pastebin probably easier to read.

http://pastebin.com/NGwDt2Rj
Code:
sub DoArmorHandin {
 
    my $armor_list;
    $tmp_zone = 113;
    $tmp_class = 9;
    $armor_list[$tmp_zone][$tmp_class][6] = {slot => 19, item => 24938, reward => 31014}; #boots
   
    foreach my $entry ($armor_list[$zoneid][$class]) {
        quest::say("Requires ".$entry);
        if (plugin::check_handin(\%itemcount,$entry{item}) => 1 &&
            $cash >= (plugin::DoPricingBySlot($entry{slot})*1000)) {
            quest::summonitem($entry{reward});
            return 1;
        }
    }
    return 0;
}
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote