I think just some "if" should be "elsif", see below (cant test it atm though, but should work).
Code:
sub EVENT_SAY
{
my $armor = quest::saylink("Armor");
my $rumor = quest::saylink("Rumors");
if ($text =~/Hail/i)
{
quest::say ("Hey there, $name. As you know chaos has taken our land, and this is the only safehaven left for us. The minions of chaos have started their infiltration into our palace here, and we need your help! If you head into the castle, please see if you can find any of their instructions for [$armor] crafting. That way I can aid you in your fight against Chaos.");
}
if ($text =~/armor/i)
{
quest::say ("Yes, it is said that some of the minions inside the castle hold instructions for basic armor crafting. I think they sound perfect for a novice crafter such as myself. Would you like to hear more [$rumor] about the instructions? ");
}
if ($text =~/rumors/i)
{
quest::say ("I hear the easier parts to make are kept by the common minions you will find there, but the harder leggings and chest instructions are only to be had by the leaders.");
}
}
sub EVENT_ITEM {
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Shadowkight' || $class ==
'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Cleric' || $class == 'Druid' || $class ==
'Shaman' || $class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') {
#Gloves
if (plugin::check_handin(\%itemcount, 1119 => 1)) {
my %rewards = (
"Warrior" => 27583, "Rogue" => 22690, "Monk" => 1319, "Shadowknight" => 19892, "Paladin" => 61149, "Ranger" => 27514,
"Bard" => 27528, "Cleric" => 20313, "Druid" => 19682, "Shaman" => 55122, "Wizard" => 63032, "Magician" => 27384, "Enchanter"
=> 20327, "Necromancer" => 22595
);
if(defined($rewards{$class})) {
quest::summonitem($rewards{$class});
quest::emote("Works to make a piece of armor from the instructions you provided to him." );
quest::say ("Here you go $name.");
}
}
#Bracer
elsif (plugin::check_handin(\%itemcount, 1261 => 1)) {
my %rewards = (
"Warrior" => 27579, "Rogue" => 22686, "Monk" => 1323, "Shadowknight" => 19891, "Paladin" => 61145, "Ranger" => 27510,
"Bard" => 27524, "Cleric" => 20309, "Druid" => 19681, "Shaman" => 55121, "Wizard" => 63087, "Magician" => 27380, "Enchanter"
=> 20323, "Necromancer" => 22591
);
if(defined($rewards{$class})) {
quest::summonitem($rewards{$class});
quest::emote("Works to make a piece of armor from the instructions you provided to him." );
quest::say ("Here you go $name.");
}
}
#Arms
elsif (plugin::check_handin(\%itemcount, 1264 => 1)) {
my %rewards = (
"Warrior" => 27580, "Rogue" => 22687, "Monk" => 1352, "Shadowknight" => 19890, "Paladin" => 61146, "Ranger" => 27511,
"Bard" => 27525, "Cleric" => 20310, "Druid" => 19680, "Shaman" => 55120, "Wizard" => 63077, "Magician" => 27381, "Enchanter"
=> 20324, "Necromancer" => 22593
);
if(defined($rewards{$class})) {
quest::summonitem($rewards{$class});
quest::emote("Works to make a piece of armor from the instructions you provided to him." );
quest::say ("Here you go $name.");
}
}
#Helm
elsif (plugin::check_handin(\%itemcount, 1265 => 1)) {
my %rewards = (
"Warrior" => 27578, "Rogue" => 22685, "Monk" => 1353, "Shadowknight" => 19888, "Paladin" => 61144, "Ranger" => 27509,
"Bard" => 27523, "Cleric" => 20308, "Druid" => 19678, "Shaman" => 55119, "Wizard" => 63034, "Magician" => 27379, "Enchanter"
=> 20322, "Necromancer" => 22590
);
if(defined($rewards{$class})) {
quest::summonitem($rewards{$class});
quest::emote("Works to make a piece of armor from the instructions you provided to him." );
quest::say ("Here you go $name.");
}
}
#Boots
elsif (plugin::check_handin(\%itemcount, 1266 => 1)) {
my %rewards = (
"Warrior" => 27581, "Rogue" => 22688, "Monk" => 1372, "Shadowknight" => 19894, "Paladin" => 61147, "Ranger" => 27512,
"Bard" => 27526, "Cleric" => 20311, "Druid" => 19684, "Shaman" => 55123, "Wizard" => 63033, "Magician" => 27382, "Enchanter"
=> 20325, "Necromancer" => 22592
);
if(defined($rewards{$class})) {
quest::summonitem($rewards{$class});
quest::emote("Works to make a piece of armor from the instructions you provided to him." );
quest::say ("Here you go $name.");
}
}
#Legs
elsif (plugin::check_handin(\%itemcount, 1267 => 1)) {
my %rewards = (
"Warrior" => 27582, "Rogue" => 22689, "Monk" => 1373, "Shadowknight" => 19893, "Paladin" => 61148, "Ranger" => 27513,
"Bard" => 27527, "Cleric" => 20312, "Druid" => 19683, "Shaman" => 55124, "Wizard" => 63078, "Magician" => 27383, "Enchanter"
=> 20326, "Necromancer" => 22594
);
if(defined($rewards{$class})) {
quest::summonitem($rewards{$class});
quest::emote("Works to make a piece of armor from the instructions you provided to him." );
quest::say ("Here you go $name.");
}
}
#Breastplate
elsif (plugin::check_handin(\%itemcount, 1270 => 1)) {
my %rewards = (
"Warrior" => 27584, "Rogue" => 22692, "Monk" => 1374, "Shadowknight" => 19889, "Paladin" => 61150, "Ranger" => 27515,
"Bard" => 27529, "Cleric" => 20314, "Druid" => 19679, "Shaman" => 55125, "Wizard" => 63040, "Magician" => 27385, "Enchanter"
=> 20328, "Necromancer" => 22596
);
if(defined($rewards{$class})) {
quest::summonitem($rewards{$class});
quest::emote("Works to make a piece of armor from the instructions you provided to him." );
quest::say ("Here you go $name.");
}
}
else {
plugin::return_items(\%itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}
}
}