View Single Post
  #4  
Old 02-04-2008, 06:08 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Thanks for the response! And, I am using "plugin::return_items(\%itemcount);" at the end of my sub EVENT_ITEM to return all handed in items if they don't match any of the quest turn ins. Will that still work with the hash? I don't know a ton about perl (obviously), so I have to experiment a lot to get things working properly.

I am not sure if I am reading your script correctly, but here is how I think my script would apply if I used what you supplied:

Code:
sub_EVENT_ITEM {

my $drop = 1200;
%helms = (
	1201 => 1,
	1202 => 1,
	1203 => 1
	);

if (
 $class eq 'Warrior' ||
 $class eq 'Rogue' ||
 $class eq 'Monk' ||
 $class eq 'Berserker' ||
 $class eq 'Shadowkight' ||
 $class eq 'Paladin' ||
 $class eq 'Ranger' ||
 $class eq 'Bard' ||
 $class eq 'Beastlord' ||
 $class eq 'Cleric' ||
 $class eq 'Druid' ||
 $class eq 'Shaman' ||
 $class eq 'Wizard' ||
 $class eq 'Mage' ||
 $class eq 'Enchanter' ||
 $class eq 'Necromancer'
	) {

  if (plugin::check_handin(\%itemcount, $drop => 1)) {

	for my $helms (sort keys %helms) {

my %rewards = (
 "Warrior" => 4917,
 "Rogue" => 4907,
 "Monk" => 1206,
 "Berserker" => 55607,
 "Shadowknight" => 9829,
 "Paladin" => 9829,
 "Ranger" => 9829,
 "Bard" => 9829,
 "Beastlord" => 9829,
 "Cleric" => 9829,
 "Druid" => 9829,
 "Shaman" => 9829,
 "Wizard" => 9829,
 "Mage" => 9829,
 "Enchanter" => 9829,
 "Necromancer" => 9829
    );

    if(defined($rewards{$class})) {
    quest::summonitem($rewards{$class});
}
}
}
}
else 
plugin::return_items(\%itemcount);
}
I realize that it is pretty sloppy, but that is as close as I can figure given the example you gave me. I am probably not reading your script properly, but I don't think this would work at all. This script has pretty much everything I want to do. So it will award each class with a specific item.

Writing that did give me an idea of how to get it working like I want. I will try it when I get home and post here if I get it working or not. Thanks again.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 02-05-2008 at 02:11 AM..
Reply With Quote