Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 04-14-2015, 10:42 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

Check this line:
Code:
elsif($text=~/pick/i && !defined $qglobals{"Epicz"} && $qglobals{"Epicz"} == 1) {
You're checking if it's not defined then checking its value even though this line sets it to 1:
Code:
quest::setglobal("Epicz", 1, 5, "F");
Also, you're checking for $hash{$class} even though they all have at least 2 elements in their array, here's my re-write (keep in mind it is untested):
Code:
sub EVENT_SAY {
    my %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]);
    my %spells = (2372 => 2385,
    2298 => 2380,
    2378 => 2381,
    2376 => 2383,
    2377 => 2393,
    2370 => 2381);
    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=~/stop/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);
}

Last edited by Kingly_Krab; 04-15-2015 at 05:49 PM..
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:19 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3