Changed formatting a little for my eyes, line 55 I didnt think was supposed to check for another "stop" (or whatever it was). Curious, line 59 is checking to see if Epicz is not defined, yet, also checking to see if it has a value of 1?
Code:
%hash = (
"Warrior" => [2275, 2277],
"Cleric" => [2376, 2275],
"Paladin" => [2275, 2277],
"Ranger" => [2277, 2379],
"Shadowknight" => [2275, 2277],
"Druid" => [2370, 2372, 2376],
"Monk" => [2277, 2379],
"Bard" => [2277, 2372, 2377],
"Rogue" => [2277, 2379],
"Shaman" => [2298, 2376, 2372],
"Necromancer" => [2278, 2372],
"Wizard" => [2298, 2370, 2378],
"Magician" => [2278, 2370, 2378],
"Enchanter" => [2377..2378],
"Beastlord" => [2277..2278, 2298],
"Berserker" => [2277, 2379]
);
%spells = (
2372 => 2385,
2298 => 2380,
2378 => 2381,
2376 => 2383,
2377 => 2393,
2370 => 2381
);
sub EVENT_SAY {
if ($text=~/hail/i) {
if ($ulevel > 69) {
plugin::Whisper("Hello $name! A item of great power await all those that are willing to " . quest::saylink("slay", 1) . " their demons.");
}
elsif (defined $qglobals{"Epicz"} && $qglobals{"Epicz"} >= 2) {
plugin::Whisper("You are a great adventurer $name.");
}
else {
plugin::Whisper("You are not ready fur such an adventure. Find the Slayer's near the temple entrance,perhaps they could use someone ".
"of your stature. Return to me when you have gained more strength!");
}
}
elsif($text=~/slay/i) {
plugin::Whisper("An ancient demon known as Azgraeth has chosen to take the form of a powerful master. Azgraeth quickly used his new body ".
"to unleash his images upon a section of norrath. In an last minute effort to destroy Azgraeth once and for all a group of ".
"powerful adventurers banished him to a horrid chamber. Though that seemed to be all they could do. Once there Azgraeth ".
"mastered his magic and is now preparing to attempt to wreak havoc on Norrath again! Do you think you are strong enough ".
"to ".quest::saylink("stop", 1)." him?");
}
elsif($text=~/stop/i) {
plugin::Whisper("I will send you to the chamber and allow you to face Azgraeth. Please be prepared, you should bring many friends as ".
"this fight will test your skills to the limits! If you should happen to win this battle bring me back ".quest::varlink(4332).
" as proof. When you are " . quest::saylink("ready", 1) . " I will send you.");
}
elsif($text=~/ready/i) {
plugin::Whisper("Very well $name!");
quest::zone("chambersa");
}
elsif($text=~/pick/i && !defined $qglobals{"Epicz"} && $qglobals{"Epicz"} == 1) {
plugin::Whisper("Just pick which item you want young $class.");
$client->Message(315, quest::varlink($_)." ".quest::saylink($_, 1, "Choose")) for @{$hash{$class}};
}
elsif($text=~/pick/i && defined $qglobals{"Epicz"} && $qglobals{"Epicz"} >= 2) {
plugin::Whisper("You have already chosen your path!");
}
elsif (int($text) > 0 && int($text) < 999999 && defined $qglobals{"Epicz"} && $qglobals{"Epicz"} == 1) {
if (int($text) ~~ @{$hash{$class}}) {
quest::setglobal("Epicz", int($text), 5, "F");
quest::summonitem(int($text));
if (defined $spells{int($text)}) {
quest::summonitem($spells{int($text)});
}
}
}
}
sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 4332 => 1)) {
plugin::Whisper("As promised! Just ".quest::saylink("pick", 1)." your item.");
quest::setglobal("Epicz", 1, 5, "F");
}
plugin::return_items(\%itemcount);
}