|
|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
| Quests::Custom Custom Quests here |
 |
|
 |

07-21-2008, 02:34 PM
|
|
Sarnak
|
|
Join Date: Aug 2006
Posts: 60
|
|
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
|
 |
|
 |
 |
|
 |

09-08-2008, 02:11 AM
|
|
Fire Beetle
|
|
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 10
|
|
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
|
 |
|
 |
 |
|
 |

09-08-2008, 03:42 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
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.
|
 |
|
 |
 |
|
 |

09-09-2008, 09:54 AM
|
|
Fire Beetle
|
|
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 10
|
|
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.");
}
}
}
|
 |
|
 |
 |
|
 |

09-09-2008, 05:07 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
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.
Last edited by trevius; 09-10-2008 at 01:10 AM..
|
 |
|
 |
 |
|
 |

09-09-2008, 08:48 PM
|
|
Fire Beetle
|
|
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 10
|
|
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);
}
}
}
|
 |
|
 |
 |
|
 |

09-09-2008, 09:58 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
The best way to solve a quest issue is to copy your entire quest into notepad so you don't lose it and then start with just 1 very small section at a time to make sure they work. Eventually you will get to a point where it doesn't work at all and you will know that the last thing you added is what caused it.
Try just using this from your code as the entire quest:
Code:
sub EVENT_ITEM {
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);
}
}
}
Test that and see if it works. If it doesn't, the I think you probably have a plugin problem. You will need to make sure that you moved your plugins from the quests/plugins folder into your eqemu/plugins folder. Without the plugins in the right place, these item exchanges can't work. Also, you might want to run the check syntax button on GeorgeS quest editor tool to verify that you aren't missing any brackets. Remember that a single extra bracket or quote missing or in the wrong place can break the entire quest.
|
 |
|
 |
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 07:20 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |