Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 01-16-2008, 07:08 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default Armor Quest for all Classes and Teleporter

This is an armor quest for all classes. The quest will also teleport the player to a zone (crushbone in this example).


The player gets drops from a zone that are notes, molds, instructions, or whatever you want to name them. An example of the items I created for this quest are "Boot Instructions". Any class can turn in those boot instructions and get boots specific to their class, and the same goes for all of the other instructions for the rest of the armor set (7 total different pieces). All you need to do is create the 7 different custom note drops, and add them to the quest, and then either find pre-existing class specific armor sets or make your own custom ones and add them to the quest. It is pretty straight foward.

In the code below, I have PoH/PoF armor already in for the pure melee classes. So, you can try it out easily just by making your custom notes and plugging the ID into the check_handin. I have tested this quest and it works 100% on my server.

You will need to edit the npc text to reflect what you want/need.

Code:
#############
#Quest Name: An Armor Quest for all Classes and Teleporter
#Author: Trevius
#NPCs Involved: The quest giver NPC can have any name you want.
#Items Involved: 7 notes made custom, and any class specific armor sets.
#################
sub EVENT_SAY
{
if ($text =~/Hail/i)
 {
quest::say ("Hey there, $name. I can send you to [crusbone] if ya want.  That area is best suited for players of 1 to 20 season.  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.");
 }
if ($text =~/crushbone/i)
 {
quest::say ("Off ya go!");
quest::emote ("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 == 'Shadowkight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Mage' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1319 => 1)) {
    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});
      quest::emote("Works to make a piece of armor from the instructions you provided to him." );
      quest::say ("Here you go $name.");
    }
}
  if (plugin::check_handin(\%itemcount, 1323 => 1)) {
    my %rewards = (
"Warrior" => 4915, "Rogue" => 4905, "Monk" => 1204, "Berserker" => 55605, "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});
      quest::emote("Works to make a piece of armor from the instructions you provided to him." );
      quest::say ("Here you go $name.");
    }
}
  if (plugin::check_handin(\%itemcount, 1353 => 1)) {
    my %rewards = (
"Warrior" => 4913, "Rogue" => 4903, "Monk" => 1202, "Berserker" => 55603, "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});
      quest::emote("Works to make a piece of armor from the instructions you provided to him." );
      quest::say ("Here you go $name.");
    }
}
  if (plugin::check_handin(\%itemcount, 1372 => 1)) {
    my %rewards = (
"Warrior" => 4911, "Rogue" => 4901, "Monk" => 1378, "Berserker" => 55601, "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});
      quest::emote("Works to make a piece of armor from the instructions you provided to him." );
      quest::say ("Here you go $name.");
    }
}
  if (plugin::check_handin(\%itemcount, 1373 => 1)) {
    my %rewards = (
"Warrior" => 4914, "Rogue" => 4904, "Monk" => 1203, "Berserker" => 55604, "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});
      quest::emote("Works to make a piece of armor from the instructions you provided to him." );
      quest::say ("Here you go $name.");
    }
}
  if (plugin::check_handin(\%itemcount, 1375 => 1)) {
    my %rewards = (
"Warrior" => 4916, "Rogue" => 4906, "Monk" => 1205, "Berserker" => 55606, "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});
      quest::emote("Works to make a piece of armor from the instructions you provided to him." );
      quest::say ("Here you go $name.");
    }
}
  if (plugin::check_handin(\%itemcount, 1377 => 1)) {
    my %rewards = (
"Warrior" => 4912, "Rogue" => 4902, "Monk" => 1201, "Berserker" => 55602, "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});
      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.");
	}  
}
}
Reply With Quote
  #2  
Old 06-27-2008, 05:30 AM
ccody1025
Fire Beetle
 
Join Date: Apr 2008
Posts: 13
Default

Hey Trev, Tried out this code tonight, making a server for me and a few friends to play on...I know the code works on your server, cause i have multiple toons 70+ on there, and never had any trouble. I tried editing the code to add in my own stuff, gear rewards and whatnot, but the guy just eats the turn ins. I am using Prathun in gloomingdeep as my armor guy. Here is a snippet of the code...


Code:
sub EVENT_ITEM {
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowkight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Mage' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1319 => 1)) {
    my $rewards = (
"Warrior" => 31084, "Rogue" => 31028, "Monk" => 24440, "Berserker" => 55317, "Shadowknight" => 44113, "Paladin" => 31119, "Ranger" => 25363, "Bard" => 31133, "Beastlord" => 5353, "Cleric" => 31042, "Druid" => 31147, "Shaman" => 31105, "Wizard" => 25405, "Mage" => 25419, "Enchanter" => 25426, "Necromancer" => 31063
    );

    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.");
    }
}
Any advice ya can give would be greatly appreciated.
Reply With Quote
  #3  
Old 06-27-2008, 05:34 AM
Aramid
Discordant
 
Join Date: May 2006
Posts: 356
Default

Try changing your my $rewards = to my %rewards =
__________________
Random Segments of Code....
Reply With Quote
  #4  
Old 06-27-2008, 10:09 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Does this code really work for all classes?

Quote:
$class == 'Shadowkight'
Reply With Quote
  #5  
Old 06-27-2008, 10:58 AM
ccody1025
Fire Beetle
 
Join Date: Apr 2008
Posts: 13
Default

it was at %rewards to start, i didnt work, so i tried $, ended up with the same problem. The guy just eats the turn ins.

Quote:
Does this code really work for all classes?

Quote:
$class == 'Shadowkight'
if it is the same code he used on his server...then yea...it worked for each class.
Reply With Quote
  #6  
Old 06-27-2008, 03:03 PM
xxarthurxx
Hill Giant
 
Join Date: Jun 2006
Location: San Jo, Cali
Posts: 180
Default

you might want to try shadowknight...
__________________
Tinimus Minimus Da Captain - Warrior of MMOs
Lead Admin and Server Op of Da Pirate's Cove, a Custom Classic Legit Progression Server
Reply With Quote
  #7  
Old 06-27-2008, 04:00 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Quote:
Originally Posted by ccody1025 View Post
Hey Trev, Tried out this code tonight, making a server for me and a few friends to play on...I know the code works on your server, cause i have multiple toons 70+ on there, and never had any trouble. I tried editing the code to add in my own stuff, gear rewards and whatnot, but the guy just eats the turn ins. I am using Prathun in gloomingdeep as my armor guy. Here is a snippet of the code...


Code:
sub EVENT_ITEM {
if ($class == 'Warrior' || $class == 'Rogue' || $class == 'Monk' || $class == 'Berserker' || $class == 'Shadowkight' || $class == 'Paladin' || $class == 'Ranger' || $class == 'Bard' || $class == 'Beastlord' || $class == 'Cleric' || $class == 'Druid' || $class == 'Shaman' || $class == 'Wizard' || $class == 'Mage' || $class == 'Enchanter' || $class == 'Necromancer') {
  if (plugin::check_handin(\%itemcount, 1319 => 1)) {
    my $rewards = (
"Warrior" => 31084, "Rogue" => 31028, "Monk" => 24440, "Berserker" => 55317, "Shadowknight" => 44113, "Paladin" => 31119, "Ranger" => 25363, "Bard" => 31133, "Beastlord" => 5353, "Cleric" => 31042, "Druid" => 31147, "Shaman" => 31105, "Wizard" => 25405, "Mage" => 25419, "Enchanter" => 25426, "Necromancer" => 31063
    );

    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.");
    }
}
Any advice ya can give would be greatly appreciated.
couple things...some is just semantics...

Code:
$class == 'Shadowknight'
should really be
Code:
$class eq "Shadowknight"
Perl is nice and lets you get away with it, but the top one is an array of characters, while the bottom one is a string. Most of the time it won't matter as long as you do consistent types of conditionals along the way, but sometimes it does matter.

Next, you must use

Code:
my %rewards = ( "blah" => blah );
$rewards is scalar context, and using it this way will basically give you the count of the items in the array.

Just looking at your code though, if the above was % to start with, I don't see anything that sticks out as a problem and I'm not anywhere where I can test it right now. But you should stick this:

Code:
else {
 	    plugin::return_items(\%itemcount);
    	quest::say("I have no use for this item, $name.  Take it back.");
	}
at the bottom of any of your sub EVENT_ITEM subroutines for any quest to keep them from eating items they were not meant to be given.

I would check your quest logs to see if they are any help. Try putting some debugging print steps in there to help you narrow down the issue. If you still haven't resolved it later I'll try it on my server.
Reply With Quote
  #8  
Old 06-27-2008, 04:54 PM
ccody1025
Fire Beetle
 
Join Date: Apr 2008
Posts: 13
Default

*smacks head on desk* Well, I figured out the problem. I am a noob to all of this, never did any coding past BASIC and a tiny bit of VB. I had the return_item code ya mentioned at the bottom of the quest, as i copied and pasted Trev's code, just changing what i wanted. I summoned a random item, and turned it in, but he said nothing, and didnt give it back, just ate it. Well i did some looking into the plugin::check_handin...and it appears I did not have the plugin. So it wasn't checking anything i handed it, just eating it. I added the code I found after searching on the boards to the plugin folder, and it now works =). Thank you all for your replies, and sorry to have just missed something that simple, lol.

I did not know the plugin::blah_blah was an actual plugin until i did a search for it, so everything seem to be working now =). Thank you all again.
Reply With Quote
  #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
  #10  
Old 07-21-2008, 02:34 PM
Striat
Sarnak
 
Join Date: Aug 2006
Posts: 60
Wink

Decided to take a shot at cleaning up things;p I'm not exactly proficient at auto generating complex hash/array combos. And there is definitely redundancy in my example that could be cleaned up. But, here is an alternative method that may be easier for the average joe to pick up and change/add things that he wants with little quest scripting experience.

Code:
#############
#Quest Name: An Armor Quest for all Classes and Teleporter
#Author: Trevius
#NPCs Involved: The quest giver NPC can have any name you want.
#Items Involved: 7 notes made custom, and any class specific armor sets.
#################

my %itemturnins = (		#Hash of Hashes.  rewarditem is the reward given.  rewardmessage is the message given for each item turn in.
	"Bard" => { 1321=> { type => "boots", reward => 55607 }, 1323 => { type => "Greaves", reward => 55605 }, 1353 => { type => "boots", reward => 55603 }, 1372 => { type => "boots", reward => 55601 }, 1373 => { type => "boots", reward => 55604 },  1375 => { type => "boots", reward => 55606 }, 1377 => { type => "boots", reward => 55602 } },
	"Beastlord" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Berserker" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Cleric" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Druid" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Enchanter" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Magician" => { 1321=> { type => "boots", reward => 9829 }, 9830 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Monk" => { 1321=> { type => "boots", reward => 1206 }, 1323 => { type => "Greaves", reward => 1204 }, 1353 => { type => "boots", reward => 1202 }, 1372 => { type => "boots", reward => 1378 }, 1373 => { type => "boots", reward => 1203 },  1375 => { type => "boots", reward => 1205 }, 1377 => { type => "boots", reward => 1201 } },
	"Necromancer" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Paladin" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Ranger" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Rogue" => { 1321=> { type => "boots", reward => 4907 }, 1323 => { type => "Greaves", reward => 4905 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Shadowknight" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Shaman" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 4903 }, 1372 => { type => "boots", reward => 4901 }, 1373 => { type => "boots", reward => 4904 },  1375 => { type => "boots", reward => 4906 }, 1377 => { type => "boots", reward => 4902 } },
	"Wizard" => { 1321=> { type => "boots", reward => 9829 }, 1323 => { type => "Greaves", reward => 9829 }, 1353 => { type => "boots", reward => 9829 }, 1372 => { type => "boots", reward => 9829 }, 1373 => { type => "boots", reward => 9829 },  1375 => { type => "boots", reward => 9829 }, 1377 => { type => "boots", reward => 9829 } },
	"Warrior" => { 1321=> { type => "boots", reward => 4917 }, 1323 => { type => "Greaves", reward => 4915 }, 1353 => { type => "boots", reward => 4913 }, 1372 => { type => "boots", reward => 4911 }, 1373 => { type => "boots", reward => 4914 },  1375 => { type => "boots", reward => 4916 }, 1377 => { type => "boots", reward => 4912 } },
);

sub EVENT_SAY
{
if ($text =~/Hail/i)
 {
quest::say ("Hey there, $name. I can send you to [crusbone] if ya want.  That area is best suited for players of 1 to 20 season.  And if you do head that way, please see if you can find any of their instructions for [armor] crafting.  What say you?");
 }
elsif ($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? ");
 }
elsif ($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.");
 }
elsif ($text =~/crushbone/i)
 {
quest::say ("Off ya go!");
quest::emote ("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 {
	my $gaveitem = 0;

foreach my $itemturnin ( sort keys %{ $itemturnins{$class} } ) {
	if (plugin::check_handin(\%itemcount, $itemturnin => 1)) {
	$gaveitem = 1;
      quest::summonitem($itemturnins{$class}{$itemturnin}{reward});
      quest::emote("Works to make a piece of armor from the instructions you provided to him." );
      quest::say ("Here you go $name.  Here is your new $itemturnins{$class}{$itemturnin}{type}");
    }
}
	if ($gaveitem == 0) {
		quest::say("I didn't ask for this! Take your garbage elsewhere!");
	}
		plugin::return_items(\%itemcount);

}
1321 and other numbers correspond to item turn ins. the type and reward correspond to item type (boots, greaves, etc) and reward corresponds to item id to be given as a reward.

One thing I'd like to point out is that when you see this much redundancy such as in my hash for item turn in for each class, rest assured that it could be optimized a little more
Reply With Quote
  #11  
Old 09-08-2008, 02:11 AM
Frothel
Fire Beetle
 
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 10
Default

I tried to modify the code a little for personalization, and did extensive modifications to the items, and it is still not working. I used the last one that was posted as a model. Here is my code:

Code:
#A conversation to Teleport Player to lvl 40-50 zone (Dulak) 
#Hash of Hashes.  rewarditem Is the reward given.  rewardmessage Is the message given for each item turn in.

my %itemturnins = (		
	"Bard" => { 16370=> { type => "boots", reward => 19549 }, 16373 => { type => "Greaves", reward => 16771 }, 16371 => { type => "helm", reward => 9818 }, 16375 => { type => "chest piece", reward => 47643 }, 16372 => { type => "Sleeves", reward => 11444 },  16374 => { type => "gloves", reward => 12664 }, 16369 => { type => "bracer", reward => 11178 } },
	"Beastlord" => { 16382=> { type => "boots", reward => 20032 }, 16381 => { type => "Greaves", reward => 16787 }, 16376 => { type => "helm", reward => 9824 }, 16377 => { type => "chest piece", reward => 47652 }, 16378 => { type => "Sleeves", reward => 11450 },  16380 => { type => "gloves", reward => 13553 }, 16379 => { type => "bracer", reward => 11196 } },
	"Berserker" => { 16368=> { type => "boots", reward => 55509 }, 16367 => { type => "Greaves", reward => 55512 }, 16362 => { type => "helm", reward => 55513 }, 16363 => { type => "chest piece", reward => 55511 }, 16364 => { type => "Sleeves", reward => 55508 },  16366 => { type => "gloves", reward => 55514 }, 16365 => { type => "bracer", reward => 55510 } },
	"Cleric" => { 16370=> { type => "boots", reward => 20074 }, 16373 => { type => "Greaves", reward => 16797 }, 16371 => { type => "helm", reward => 9827 }, 16375 => { type => "chest piece", reward => 47646 }, 16372 => { type => "Sleeves", reward => 32012 },  16374 => { type => "gloves", reward => 13563 }, 16369 => { type => "bracer", reward => 11199 } },
	"Druid" => { 16382=> { type => "boots", reward => 20422 }, 16381 => { type => "Greaves", reward => 16811 }, 16376 => { type => "helm", reward => 9833 }, 16377 => { type => "chest piece", reward => 47651 }, 16378 => { type => "Sleeves", reward => 11575 },  16380 => { type => "gloves", reward => 13603 }, 16379 => { type => "bracer", reward => 11281 } },
	"Enchanter" => { 16389=> { type => "boots", reward => 20425 }, 16388 => { type => "Greaves", reward => 16931 }, 16383 => { type => "helm", reward => 9836 }, 16384 => { type => "chest piece", reward => 47656 }, 16385 => { type => "Sleeves", reward => 11578 },  16387 => { type => "gloves", reward => 13614 }, 16386 => { type => "bracer", reward => 11298 } },
	"Magician" => { 16389=> { type => "boots", reward => 20428 }, 16388 => { type => "Greaves", reward => 19021 }, 16383 => { type => "helm", reward => 9944 }, 16384 => { type => "chest piece", reward => 47655 }, 16385 => { type => "Sleeves", reward => 11598 },  16387 => { type => "gloves", reward => 13619 }, 16386 => { type => "bracer", reward => 11303 } },
	"Monk" => { 16382=> { type => "boots", reward => 19446 }, 16381 => { type => "Greaves", reward => 16727 }, 16376 => { type => "helm", reward => 9809 }, 16377 => { type => "chest piece", reward => 47650 }, 16378 => { type => "Sleeves", reward => 11435 },  16380 => { type => "gloves", reward => 12624 }, 16379 => { type => "bracer", reward => 11146 } },
	"Necromancer" => { 16389=> { type => "boots", reward => 20431 }, 16388 => { type => "Greaves", reward => 19024 }, 16383 => { type => "helm", reward => 9947 }, 16384 => { type => "chest piece", reward => 47653 }, 16385 => { type => "Sleeves", reward => 11618 },  16387 => { type => "gloves", reward => 13623 }, 16386 => { type => "bracer", reward => 11306 } },
	"Paladin" => { 16370=> { type => "boots", reward => 19449 }, 16373 => { type => "Greaves", reward => 16757 }, 16371 => { type => "helm", reward => 9812 }, 16375 => { type => "chest piece", reward => 47644 }, 16372 => { type => "Sleeves", reward => 11438 },  16374 => { type => "gloves", reward => 12627 }, 16369 => { type => "bracer", reward => 11163 } },
	"Ranger" => { 16368=> { type => "boots", reward => 19838 }, 16367 => { type => "Greaves", reward => 16777 }, 16362 => { type => "helm", reward => 9821 }, 16363 => { type => "chest piece", reward => 47647 }, 16364 => { type => "Sleeves", reward => 11447 },  16366 => { type => "gloves", reward => 12816 }, 16365 => { type => "bracer", reward => 11193 } },
	"Rogue" => { 16368=> { type => "boots", reward => 19443 }, 16367 => { type => "Greaves", reward => 16717 }, 16362 => { type => "helm", reward => 9806 }, 16363 => { type => "chest piece", reward => 47648 }, 16364 => { type => "Sleeves", reward => 11432 },  16366 => { type => "gloves", reward => 12598 }, 16365 => { type => "bracer", reward => 11141 } },
	"Shadowknight" => { 16370=> { type => "boots", reward => 19546 }, 16373 => { type => "Greaves", reward => 16763 }, 16371 => { type => "helm", reward => 9815 }, 16375 => { type => "chest piece", reward => 47645 }, 16372 => { type => "Sleeves", reward => 11441 },  16374 => { type => "gloves", reward => 12637 }, 16369 => { type => "bracer", reward => 11173 } },
	"Shaman" => { 16368=> { type => "boots", reward => 20078 }, 16367 => { type => "Greaves", reward => 16803 }, 16362 => { type => "helm", reward => 9830 }, 16363 => { type => "chest piece", reward => 47649 }, 16364 => { type => "Sleeves", reward => 11529 },  16366 => { type => "gloves", reward => 13579 }, 16365 => { type => "bracer", reward => 11278 } },
	"Wizard" => { 16389=> { type => "boots", reward => 20434 }, 16388 => { type => "Greaves", reward => 19027 }, 16383 => { type => "helm", reward => 9950 }, 16384 => { type => "chest piece", reward => 47654 }, 16385 => { type => "Sleeves", reward => 11876 },  16387 => { type => "gloves", reward => 13627 }, 16386 => { type => "bracer", reward => 11309 } },
	"Warrior" => { 16370=> { type => "boots", reward => 19440 }, 16373 => { type => "Greaves", reward => 16693 }, 16371 => { type => "helm", reward => 9629 }, 16375 => { type => "chest piece", reward => 47642 }, 16372 => { type => "Sleeves", reward => 11429 },  16374 => { type => "gloves", reward => 12595 }, 16369 => { type => "bracer", reward => 11138 } },
);

sub EVENT_SAY
{
if ($text =~/Hail/i)
 {
quest::say ("Good day to you, $name. The Pirates in Dulak are a menace to the sea-faring travelers in Norrath and must be stopped!  They will occasionally drop armor molds/patterns that I can change into [armor] suitable for your class.  I can send you there [now] if you like.");
 }
elsif ($text =~/armor/i)
 {
quest::say ("Yes, it is said that some of the Pirates of Dulak 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? ");
 }
elsif ($text =~/rumors/i)
 {
quest::say ("I hear the easier parts to make are kept by the common Pirates you will find there, but the harder leggings and chest instructions are only to be had by Captain Varns himself, and Quigli.");
 }
elsif ($text =~/now/i)
 {
quest::say ("$name , see you later.");
quest::movepc(225, 518,431,5);
 }
}

sub EVENT_ITEM {
	my $gaveitem = 0;

foreach my $itemturnin ( sort keys %{ $itemturnins{$class} } ) {
	if (plugin::check_handin(\%itemcount, $itemturnin => 1)) {
	$gaveitem = 1;
      quest::summonitem($itemturnins{$class}{$itemturnin}{reward});
      quest::emote("Works to make a piece of armor from the instructions you provided to her." );
      quest::say ("Here you go $name.  Here is your new $itemturnins{$class}{$itemturnin}{type}");
    }
}
	if ($gaveitem == 0) {
		quest::say("I didn't ask for this! Take your garbage elsewhere, I am not a miracle worker!");
	}
		plugin::return_items(\%itemcount);

}

Last edited by trevius; 09-08-2008 at 11:30 AM.. Reason: use code boxes, please
Reply With Quote
  #12  
Old 09-08-2008, 03:42 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Strait writes quests in a completely different way than I do, so that is a little hard for me to read. But, you might want to start by removing all of the elsifs from your EVENT_SAY, and change them to just plain "if" instead. I am pretty sure elsif will break the quest completely using it like that.

The best way to troubleshoot a problem like that is to start with just the EVENT_SAY section and test to make sure that works. Then, add in the rest in small examples piece by piece until you get it all working. That hash looks a little complex to me lol.

I don't think Strait tested his code at all, but if you use the code I posted in this thread, it works perfectly. Though, mine could probably use better commenting to make it easier to understand. But it is pretty straight forward.

If I was to write it all over again now, I am sure it would be much smaller and cleaner lol. I have learned a lot since that submission.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #13  
Old 09-09-2008, 09:54 AM
Frothel
Fire Beetle
 
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 10
Default

I modified your code to work for my server, and it still does not work, am I missing something?

Code:
#An Armor Quest for all classes
sub EVENT_SAY
{
if ($text =~/Hail/i)
 {
quest::say ("Good day to you, $name. The Pirates in Dulak are a menace to the sea-faring travelers in Norrath and must be stopped!  They will occasionally drop armor molds/patterns that I can change into [armor] suitable for your class.  I can send you there [now] if you like.");
 }
if ($text =~/armor/i)
 {
quest::say ("Yes, it is said that some of the Pirates of Dulak 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 patterns? ");
 }
 if ($text =~/rumors/i)
 {
quest::say ("I hear the easier parts to make are kept by the common Pirates you will find there, but the harder leggings and chest instructions are only to be had by Captain Varns himself, and Quigli.");
 }
if ($text =~/now/i)
 {
quest::say ("$name , see you later.");
quest::movepc(225, 518,431,5);
 }
}

sub EVENT_ITEM {
if ($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') {
  if (plugin::check_handin(\%itemcount, 16298 => 1)) {
    my %rewards = (
"Warrior" => 19440, "Shadowknight" => 19546, "Paladin" => 19449, "Bard" => 19549, "Cleric" => 20074
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
if ($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') {
  if (plugin::check_handin(\%itemcount, 16344 => 1)) {
    my %rewards = (
"Warrior" => 16693, "Shadowknight" => 16763, "Paladin" => 16757, "Bard" => 16771, "Cleric" => 16797
    );

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

if ($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') {
  if (plugin::check_handin(\%itemcount, 16299 => 1)) {
    my %rewards = (
"Warrior" => 9629, "Shadowknight" => 9815, "Paladin" => 9812, "Bard" => 9818, "Cleric" => 9827
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
if ($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') {
  if (plugin::check_handin(\%itemcount, 16346 => 1)) {
    my %rewards = (
"Warrior" => 47642, "Shadowknight" => 47645, "Paladin" => 47644, "Bard" => 47643, "Cleric" => 47646
    );

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

if ($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') {
  if (plugin::check_handin(\%itemcount, 16343 => 1)) {
    my %rewards = (
"Warrior" => 11429, "Shadowknight" => 11441, "Paladin" => 11438, "Bard" => 11444, "Cleric" => 32012
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
if ($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') {
  if (plugin::check_handin(\%itemcount, 16345 => 1)) {
    my %rewards = (
"Warrior" => 12595, "Shadowknight" => 12637, "Paladin" => 12627, "Bard" => 12664, "Cleric" => 13563
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
if ($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') {
  if (plugin::check_handin(\%itemcount, 16297 => 1)) {
    my %rewards = (
"Warrior" => 11138, "Shadowknight" => 11173, "Paladin" => 11163, "Bard" => 11178, "Cleric" => 11199
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
if ($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') {
  if (plugin::check_handin(\%itemcount, 16296 => 1)) {
    my %rewards = (
"Berserker" => 55509, "Ranger" => 19838, "Rogue" => 19443, "Shaman" => 20078
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') {
  if (plugin::check_handin(\%itemcount, 16295 => 1)) {
    my %rewards = (
"Berserker" => 55512, "Ranger" => 16777, "Rogue" => 16717, "Shaman" => 16803
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') {
  if (plugin::check_handin(\%itemcount, 16290 => 1)) {
    my %rewards = (
"Berserker" => 55513, "Ranger" => 9821, "Rogue" => 9806, "Shaman" => 9830
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') {
  if (plugin::check_handin(\%itemcount, 16291 => 1)) {
    my %rewards = (
"Berserker" => 55511, "Ranger" => 47647, "Rogue" => 47648, "Shaman" => 47649
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') {
  if (plugin::check_handin(\%itemcount, 16292 => 1)) {
    my %rewards = (
"Berserker" => 55508, "Ranger" => 11447, "Rogue" => 11432, "Shaman" => 11529
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') {
  if (plugin::check_handin(\%itemcount, 16294 => 1)) {
    my %rewards = (
"Berserker" => 55514, "Ranger" => 12598, "Rogue" => 12598, "Shaman" => 13579
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') {
  if (plugin::check_handin(\%itemcount, 16293 => 1)) {
    my %rewards = (
"Berserker" => 55510, "Ranger" => 11193, "Rogue" => 11141, "Shaman" => 11278
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Enchanter' || $class == 'Magician' || $class == 'Necromancer' || $class == 'Wizard') {
  if (plugin::check_handin(\%itemcount, 16360 => 1)) {
    my %rewards = (
"Enchanter" => 20425, "Magician" => 20428, "Necromancer" => 20431, "Wizard" => 20434
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Enchanter' || $class == 'Magician' || $class == 'Necromancer' || $class == 'Wizard') {
  if (plugin::check_handin(\%itemcount, 16359 => 1)) {
    my %rewards = (
"Enchanter" => 16931, "Magician" => 19021, "Necromancer" => 19024, "Wizard" => 19027
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Enchanter' || $class == 'Magician' || $class == 'Necromancer' || $class == 'Wizard') {
  if (plugin::check_handin(\%itemcount, 16354 => 1)) {
    my %rewards = (
"Enchanter" => 9836, "Magician" => 9944, "Necromancer" => 9947, "Wizard" => 9950
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Enchanter' || $class == 'Magician' || $class == 'Necromancer' || $class == 'Wizard') {
  if (plugin::check_handin(\%itemcount, 16355 => 1)) {
    my %rewards = (
"Enchanter" => 47656, "Magician" => 47655, "Necromancer" => 47653, "Wizard" => 47654
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Enchanter' || $class == 'Magician' || $class == 'Necromancer' || $class == 'Wizard') {
  if (plugin::check_handin(\%itemcount, 16356 => 1)) {
    my %rewards = (
"Enchanter" => 11578, "Magician" => 11598, "Necromancer" => 11618, "Wizard" => 11876
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Enchanter' || $class == 'Magician' || $class == 'Necromancer' || $class == 'Wizard') {
  if (plugin::check_handin(\%itemcount, 16358 => 1)) {
    my %rewards = (
"Enchanter" => 13614, "Magician" => 13619, "Necromancer" => 13623, "Wizard" => 13627
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Enchanter' || $class == 'Magician' || $class == 'Necromancer' || $class == 'Wizard') {
  if (plugin::check_handin(\%itemcount, 16357 => 1)) {
    my %rewards = (
"Enchanter" => 11298, "Magician" => 11303, "Necromancer" => 11306, "Wizard" => 11309
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') {
  if (plugin::check_handin(\%itemcount, 16353 => 1)) {
    my %rewards = (
"Beastlord" => 20032, "Druid" => 20422, "Monk" => 19446
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') {
  if (plugin::check_handin(\%itemcount, 16352 => 1)) {
    my %rewards = (
"Beastlord" => 16787, "Druid" => 16811, "Monk" => 16727
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') {
  if (plugin::check_handin(\%itemcount, 16347 => 1)) {
    my %rewards = (
"Beastlord" => 9824, "Druid" => 9833, "Monk" => 9809
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') {
  if (plugin::check_handin(\%itemcount, 16348 => 1)) {
    my %rewards = (
"Beastlord" => 47652, "Druid" => 47651, "Monk" => 47650
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') {
  if (plugin::check_handin(\%itemcount, 16349 => 1)) {
    my %rewards = (
"Beastlord" => 11450, "Druid" => 11575, "Monk" => 11435
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
}
if ($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') {
  if (plugin::check_handin(\%itemcount, 16351 => 1)) {
    my %rewards = (
"Beastlord" => 13553, "Druid" => 13603, "Monk" => 12624
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
if ($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') {
  if (plugin::check_handin(\%itemcount, 16350 => 1)) {
    my %rewards = (
"Beastlord" => 1196, "Druid" => 11281, "Monk" => 11146
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
Reply With Quote
  #14  
Old 09-09-2008, 05:07 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Any time you are only checking for certain classes and not all classes, then you have to do a Not Equal check as well for the other classes you don't want to use that turn in.

Don't ask me why it doesn't work the other way, as I have no clue. I also don't know why for equals you have to use ==, but for not equals, you have to use "ne". It doesn't make sense to me, but it does work.

Here is an example of what I mean:

Code:
if (($class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') && ($class ne 'Warrior' && $class ne 'Rogue' && $class ne 'Monk' && $class ne 'Berserker' && $class ne 'Shadowknight' && $class ne 'Paladin' && $class ne 'Ranger' && $class ne 'Bard' && $class ne 'Beastlord' && $class ne 'Cleric' && $class ne 'Druid' && $class ne 'Shaman'))
So, for every if(class) check, you have to include every class and just ne the ones you don't want.

Also, don't forget to add this at the bottom as shown in my example:
Code:
else {
 	    plugin::return_items(\%itemcount);
	}
Or the NPC will eat any incorrect items turned into it.

I imagine there are much better ways of doing this, but I haven't really gone back and tried lately. The next time I make a similar armor quest using better code, I will definitely post it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 09-10-2008 at 01:10 AM..
Reply With Quote
  #15  
Old 09-09-2008, 08:48 PM
Frothel
Fire Beetle
 
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 10
Default

Now my code has changed to the below code, thanks to your suggestions =) However, it is still not working in game for some reason:

Code:
#An Armor Quest for all classes
sub EVENT_SAY
{
if ($text =~/Hail/i)
 {
quest::say ("Good day to you, $name. The Pirates in Dulak are a menace to the sea-faring travelers in Norrath and must be stopped!  They will occasionally drop armor molds/patterns that I can change into [armor] suitable for your class.  I can send you there [now] if you like.");
 }
if ($text =~/armor/i)
 {
quest::say ("Yes, it is said that some of the Pirates of Dulak 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 patterns? ");
 }
 if ($text =~/rumors/i)
 {
quest::say ("I hear the easier parts to make are kept by the common Pirates you will find there, but the harder leggings and chest instructions are only to be had by Captain Varns himself, and Quigli.");
 }
if ($text =~/now/i)
 {
quest::say ("$name , see you later.");
quest::movepc(225, 518,431,5);
 }
}

sub EVENT_ITEM {
if (($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') && ($class ne 'Berserker' && $class ne 'Ranger' && $class ne 'Rogue' && $class ne 'Shaman' && $class ne 'Druid' && $class ne 'Beastlord' && $class ne 'Monk' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16298 => 1)) {
    my %rewards = (
"Warrior" => 19440, "Shadowknight" => 19546, "Paladin" => 19449, "Bard" => 19549, "Cleric" => 20074
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
}
if (($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') && ($class ne 'Berserker' && $class ne 'Ranger' && $class ne 'Rogue' && $class ne 'Shaman' && $class ne 'Druid' && $class ne 'Beastlord' && $class ne 'Monk' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16344 => 1)) {
    my %rewards = (
"Warrior" => 16693, "Shadowknight" => 16763, "Paladin" => 16757, "Bard" => 16771, "Cleric" => 16797
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
}
if (($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') && ($class ne 'Berserker' && $class ne 'Ranger' && $class ne 'Rogue' && $class ne 'Shaman' && $class ne 'Druid' && $class ne 'Beastlord' && $class ne 'Monk' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16299 => 1)) {
    my %rewards = (
"Warrior" => 9629, "Shadowknight" => 9815, "Paladin" => 9812, "Bard" => 9818, "Cleric" => 9827
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
}
if (($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') && ($class ne 'Berserker' && $class ne 'Ranger' && $class ne 'Rogue' && $class ne 'Shaman' && $class ne 'Druid' && $class ne 'Beastlord' && $class ne 'Monk' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16346 => 1)) {
    my %rewards = (
"Warrior" => 47642, "Shadowknight" => 47645, "Paladin" => 47644, "Bard" => 47643, "Cleric" => 47646
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
}
if (($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') && ($class ne 'Berserker' && $class ne 'Ranger' && $class ne 'Rogue' && $class ne 'Shaman' && $class ne 'Druid' && $class ne 'Beastlord' && $class ne 'Monk' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16343 => 1)) {
    my %rewards = (
"Warrior" => 11429, "Shadowknight" => 11441, "Paladin" => 11438, "Bard" => 11444, "Cleric" => 32012
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
}
if (($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') && ($class ne 'Berserker' && $class ne 'Ranger' && $class ne 'Rogue' && $class ne 'Shaman' && $class ne 'Druid' && $class ne 'Beastlord' && $class ne 'Monk' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16345 => 1)) {
    my %rewards = (
"Warrior" => 12595, "Shadowknight" => 12637, "Paladin" => 12627, "Bard" => 12664, "Cleric" => 13563
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
}
if (($class == 'Warrior' || $class == 'Shadowknight' || $class == 'Paladin' || $class == 'Bard' || $class == 'Cleric') && ($class ne 'Berserker' && $class ne 'Ranger' && $class ne 'Rogue' && $class ne 'Shaman' && $class ne 'Druid' && $class ne 'Beastlord' && $class ne 'Monk' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16297 => 1)) {
    my %rewards = (
"Warrior" => 11138, "Shadowknight" => 11173, "Paladin" => 11163, "Bard" => 11178, "Cleric" => 11199
    );

    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    } 
}  
}
if (($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Druid' && $class ne 'Monk' && $class ne 'Beastlord' && $class ne 'Magician' && $class ne 'Enchanter' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16296 => 1)) {
    my %rewards = (
"Berserker" => 55509, "Ranger" => 19838, "Rogue" => 19443, "Shaman" => 20078
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Druid' && $class ne 'Monk' && $class ne 'Beastlord' && $class ne 'Magician' && $class ne 'Enchanter' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16295 => 1)) {
    my %rewards = (
"Berserker" => 55512, "Ranger" => 16777, "Rogue" => 16717, "Shaman" => 16803
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Druid' && $class ne 'Monk' && $class ne 'Beastlord' && $class ne 'Magician' && $class ne 'Enchanter' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16290 => 1)) {
    my %rewards = (
"Berserker" => 55513, "Ranger" => 9821, "Rogue" => 9806, "Shaman" => 9830
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Druid' && $class ne 'Monk' && $class ne 'Beastlord' && $class ne 'Magician' && $class ne 'Enchanter' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16291 => 1)) {
    my %rewards = (
"Berserker" => 55511, "Ranger" => 47647, "Rogue" => 47648, "Shaman" => 47649
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Druid' && $class ne 'Monk' && $class ne 'Beastlord' && $class ne 'Magician' && $class ne 'Enchanter' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16292 => 1)) {
    my %rewards = (
"Berserker" => 55508, "Ranger" => 11447, "Rogue" => 11432, "Shaman" => 11529
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Druid' && $class ne 'Monk' && $class ne 'Beastlord' && $class ne 'Magician' && $class ne 'Enchanter' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16294 => 1)) {
    my %rewards = (
"Berserker" => 55514, "Ranger" => 12598, "Rogue" => 12598, "Shaman" => 13579
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Berserker' || $class == 'Rogue' || $class == 'Ranger' || $class == 'Shaman') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Druid' && $class ne 'Monk' && $class ne 'Beastlord' && $class ne 'Magician' && $class ne 'Enchanter' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16293 => 1)) {
    my %rewards = (
"Berserker" => 55510, "Ranger" => 11193, "Rogue" => 11141, "Shaman" => 11278
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') && ($class ne 'Warrior' && $class ne 'Rogue' && $class ne 'Monk' && $class ne 'Berserker' && $class ne 'Shadowknight' && $class ne 'Paladin' && $class ne 'Ranger' && $class ne 'Bard' && $class ne 'Beastlord' && $class ne 'Cleric' && $class ne 'Druid' && $class ne 'Shaman')) {
  if (plugin::check_handin(\%itemcount, 16360 => 1)) {
    my %rewards = (
"Enchanter" => 20425, "Magician" => 20428, "Necromancer" => 20431, "Wizard" => 20434
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') && ($class ne 'Warrior' && $class ne 'Rogue' && $class ne 'Monk' && $class ne 'Berserker' && $class ne 'Shadowknight' && $class ne 'Paladin' && $class ne 'Ranger' && $class ne 'Bard' && $class ne 'Beastlord' && $class ne 'Cleric' && $class ne 'Druid' && $class ne 'Shaman')) {
  if (plugin::check_handin(\%itemcount, 16359 => 1)) {
    my %rewards = (
"Enchanter" => 16931, "Magician" => 19021, "Necromancer" => 19024, "Wizard" => 19027
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') && ($class ne 'Warrior' && $class ne 'Rogue' && $class ne 'Monk' && $class ne 'Berserker' && $class ne 'Shadowknight' && $class ne 'Paladin' && $class ne 'Ranger' && $class ne 'Bard' && $class ne 'Beastlord' && $class ne 'Cleric' && $class ne 'Druid' && $class ne 'Shaman')) {
  if (plugin::check_handin(\%itemcount, 16354 => 1)) {
    my %rewards = (
"Enchanter" => 9836, "Magician" => 9944, "Necromancer" => 9947, "Wizard" => 9950
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') && ($class ne 'Warrior' && $class ne 'Rogue' && $class ne 'Monk' && $class ne 'Berserker' && $class ne 'Shadowknight' && $class ne 'Paladin' && $class ne 'Ranger' && $class ne 'Bard' && $class ne 'Beastlord' && $class ne 'Cleric' && $class ne 'Druid' && $class ne 'Shaman')) {
  if (plugin::check_handin(\%itemcount, 16355 => 1)) {
    my %rewards = (
"Enchanter" => 47656, "Magician" => 47655, "Necromancer" => 47653, "Wizard" => 47654
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') && ($class ne 'Warrior' && $class ne 'Rogue' && $class ne 'Monk' && $class ne 'Berserker' && $class ne 'Shadowknight' && $class ne 'Paladin' && $class ne 'Ranger' && $class ne 'Bard' && $class ne 'Beastlord' && $class ne 'Cleric' && $class ne 'Druid' && $class ne 'Shaman')) {
  if (plugin::check_handin(\%itemcount, 16356 => 1)) {
    my %rewards = (
"Enchanter" => 11578, "Magician" => 11598, "Necromancer" => 11618, "Wizard" => 11876
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') && ($class ne 'Warrior' && $class ne 'Rogue' && $class ne 'Monk' && $class ne 'Berserker' && $class ne 'Shadowknight' && $class ne 'Paladin' && $class ne 'Ranger' && $class ne 'Bard' && $class ne 'Beastlord' && $class ne 'Cleric' && $class ne 'Druid' && $class ne 'Shaman')) {
  if (plugin::check_handin(\%itemcount, 16358 => 1)) {
    my %rewards = (
"Enchanter" => 13614, "Magician" => 13619, "Necromancer" => 13623, "Wizard" => 13627
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') && ($class ne 'Warrior' && $class ne 'Rogue' && $class ne 'Monk' && $class ne 'Berserker' && $class ne 'Shadowknight' && $class ne 'Paladin' && $class ne 'Ranger' && $class ne 'Bard' && $class ne 'Beastlord' && $class ne 'Cleric' && $class ne 'Druid' && $class ne 'Shaman')) {
  if (plugin::check_handin(\%itemcount, 16357 => 1)) {
    my %rewards = (
"Enchanter" => 11298, "Magician" => 11303, "Necromancer" => 11306, "Wizard" => 11309
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Berserker' && $class ne 'Rogue' && $class ne 'Ranger' && $class ne 'Shaman' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16353 => 1)) {
    my %rewards = (
"Beastlord" => 20032, "Druid" => 20422, "Monk" => 19446
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Berserker' && $class ne 'Rogue' && $class ne 'Ranger' && $class ne 'Shaman' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16352 => 1)) {
    my %rewards = (
"Beastlord" => 16787, "Druid" => 16811, "Monk" => 16727
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Berserker' && $class ne 'Rogue' && $class ne 'Ranger' && $class ne 'Shaman' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16347 => 1)) {
    my %rewards = (
"Beastlord" => 9824, "Druid" => 9833, "Monk" => 9809
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Berserker' && $class ne 'Rogue' && $class ne 'Ranger' && $class ne 'Shaman' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16348 => 1)) {
    my %rewards = (
"Beastlord" => 47652, "Druid" => 47651, "Monk" => 47650
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Berserker' && $class ne 'Rogue' && $class ne 'Ranger' && $class ne 'Shaman' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16349 => 1)) {
    my %rewards = (
"Beastlord" => 11450, "Druid" => 11575, "Monk" => 11435
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
}
}
if (($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Berserker' && $class ne 'Rogue' && $class ne 'Ranger' && $class ne 'Shaman' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16351 => 1)) {
    my %rewards = (
"Beastlord" => 13553, "Druid" => 13603, "Monk" => 12624
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
} 
}
if (($class == 'Beastlord' || $class == 'Druid' || $class == 'Monk') && ($class ne 'Warrior' && $class ne 'Cleric' && $class ne 'Bard' && $class ne 'Paladin' && $class ne 'Shadowknight' && $class ne 'Berserker' && $class ne 'Rogue' && $class ne 'Ranger' && $class ne 'Shaman' && $class ne 'Enchanter' && $class ne 'Magician' && $class ne 'Necromancer' && $class ne 'Wizard')) {
  if (plugin::check_handin(\%itemcount, 16350 => 1)) {
    my %rewards = (
"Beastlord" => 1196, "Druid" => 11281, "Monk" => 11146
    );
    
    if(defined($rewards{$class})) {
      quest::summonitem($rewards{$class});
$client->Message(6, "Sheley Courilan works to make a piece of armor from the instructions you provided to her." );
      quest::exp(10);
      quest::say ("Here you go, $name.");
    }
}
else {
 	    plugin::return_items(\%itemcount);
	}
}
}
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:54 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3