View Single Post
  #9  
Old 06-27-2008, 11:14 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ya, I should have posted the corrections to that quest after I made them sorry lol. There was another class typo too that most probably wouldn't notice at first:
Code:
$class == 'Mage'
Should have been

Code:
$class == 'Magician'
Here is the current version of the quest that I use that is fully functional:

Code:
#An Armor Quest For all classes
sub EVENT_SAY
{
if ($text =~/Hail/i)
 {
quest::say ("Hey there, $name. I can send you to [crushbone] if ya want.  That area is best suited for players of 1 to 20 season.  You may even want to stay there until 25 if the harder zones are too much for you to handle at 20.  And if you do head that way, please see if you can find any of their instructions for [armor] crafting.  What say you?");
 }
if ($text =~/armor/i)
 {
quest::say ("Yes, it is said that some of the Orcs of Crushbone hold instructions for basic armor crafting.  I think they sound perfect for a novice crafter such as myself.  Would you like to hear more [rumors] about the instructions? ");
 }
 if ($text =~/rumors/i)
 {
quest::say ("I hear the easier parts to make are kept by the common Orcs you will find there, but the harder leggings and chest instructions are only to be had by Emperor Crush himself, and his Ambassador.  It is possible that the Shroom Slaves have stolen some instructions from the orcs as well.");
 }
if ($text =~/crushbone/i)
 {
quest::say ("Off ya go!");
$client->Message(6, "Morki Krush fumbles about trying to cast a spell.  Let's hope you arrive where you were heading safely...");
quest::movepc(58, 158,-644,4);
 }
}

sub EVENT_ITEM {
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1319 => 1)) {
    my %rewards = (
"Warrior" => 4917, "Rogue" => 4907, "Monk" => 1206, "Berserker" => 55607, "Shadowknight" => 4847, "Paladin" => 4857, "Ranger" => 4897, "Bard" => 4867, "Beastlord" => 1206, "Cleric" => 4887, "Druid" => 3807, "Shaman" => 4877, "Wizard" => 1231, "Magician" => 1245, "Enchanter" => 1252, "Necromancer" => 1238
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Morki Krush works to make a piece of armor from the instructions you provided to him." );
      quest::exp(450);
      quest::say ("Here you go, $name.");
    } 
}  
}
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1323 => 1)) {
    my %rewards = (
"Warrior" => 4915, "Rogue" => 4905, "Monk" => 1204, "Berserker" => 55605, "Shadowknight" => 4845, "Paladin" => 4855, "Ranger" => 4895, "Bard" => 4865, "Beastlord" => 1204, "Cleric" => 4885, "Druid" => 3805, "Shaman" => 4875, "Wizard" => 1229, "Magician" => 1243, "Enchanter" => 1250, "Necromancer" => 1236
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Morki Krush works to make a piece of armor from the instructions you provided to him." );
      quest::exp(450);
      quest::say ("Here you go, $name.");
    }
} 
}
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1353 => 1)) {
    my %rewards = (
"Warrior" => 4913, "Rogue" => 4903, "Monk" => 1202, "Berserker" => 55603, "Shadowknight" => 4843, "Paladin" => 4853, "Ranger" => 4893, "Bard" => 4863, "Beastlord" => 1202, "Cleric" => 4883, "Druid" => 3803, "Shaman" => 4873, "Wizard" => 1227, "Magician" => 1241, "Enchanter" => 1248, "Necromancer" => 1234
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Morki Krush works to make a piece of armor from the instructions you provided to him." );
      quest::exp(450);
      quest::say ("Here you go, $name.");
    } 
} 
}
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1372 => 1)) {
    my %rewards = (
"Warrior" => 4911, "Rogue" => 4901, "Monk" => 1378, "Berserker" => 55601, "Shadowknight" => 4841, "Paladin" => 4851, "Ranger" => 4891, "Bard" => 4861, "Beastlord" => 1378, "Cleric" => 4881, "Druid" => 3801, "Shaman" => 4871, "Wizard" => 1225, "Magician" => 1239, "Enchanter" => 1246, "Necromancer" => 1232
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Morki Krush works to make a piece of armor from the instructions you provided to him." );
      quest::exp(450);
      quest::say ("Here you go, $name.");
    } 
}

}
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1373 => 1)) {
    my %rewards = (
"Warrior" => 4914, "Rogue" => 4904, "Monk" => 1203, "Berserker" => 55604, "Shadowknight" => 4844, "Paladin" => 4854, "Ranger" => 4894, "Bard" => 4864, "Beastlord" => 1203, "Cleric" => 4884, "Druid" => 3804, "Shaman" => 4874, "Wizard" => 1228, "Magician" => 1242, "Enchanter" => 1249, "Necromancer" => 1235
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Morki Krush works to make a piece of armor from the instructions you provided to him." );
      quest::exp(450);
      quest::say ("Here you go, $name.");
    } 
}
}
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1374 => 1)) {
    my %rewards = (
"Warrior" => 4916, "Rogue" => 4906, "Monk" => 1205, "Berserker" => 55606, "Shadowknight" => 4846, "Paladin" => 4856, "Ranger" => 4896, "Bard" => 4866, "Beastlord" => 1205, "Cleric" => 4886, "Druid" => 3806, "Shaman" => 4876, "Wizard" => 1230, "Magician" => 1244, "Enchanter" => 1251, "Necromancer" => 1237
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Morki Krush works to make a piece of armor from the instructions you provided to him." );
      quest::exp(450);
      quest::say ("Here you go, $name.");
    }
} 
}
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1377 => 1)) {
    my %rewards = (
"Warrior" => 4912, "Rogue" => 4902, "Monk" => 1201, "Berserker" => 55602, "Shadowknight" => 4842, "Paladin" => 4852, "Ranger" => 4892, "Bard" => 4862, "Beastlord" => 1201, "Cleric" => 4882, "Druid" => 3802, "Shaman" => 4872, "Wizard" => 1226, "Magician" => 1240, "Enchanter" => 1247, "Necromancer" => 1233
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Morki Krush works to make a piece of armor from the instructions you provided to him." );
      quest::exp(450);
      quest::say ("Here you go, $name.");
    }
}
else {
 	    plugin::return_items(\%itemcount);
	}
}
}
This was one of my first quests though and I have learned alot about writing them since then. I am sure I could now go back and rewrite it to be MUCH shorter and work just as well. But, since it already works, there is the old saying "don't fix something that isn't broke", and I don't really need to waste time on it hehe. Other than maybe for the benefit of others wanting to use the quest as an example to learn/write from.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote