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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-12-2015, 09:30 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

Script One:
Code:
sub EVENT_SAY {
    if ($text=~/hail/i) {
        if (defined $qglobals{"Ruko"} && $qglobals{"Ruko"} >= 1 && $qglobals{"Ruko"} <= 5) {
            plugin::Whisper("Hello $name. You are currently ready for your next task, are you " . quest::saylink("prepared", 1) . "?");
        } elsif (defined $qglobals{"Epicz"} && $qglobals{"Epicz"} == 1) {
            plugin::Whisper("Speak with Commander Tazen, I feel your skills will be of great use to him!");
        } else {
            plugin::Whisper("Hello $name, are you a " . quest::saylink("ranger", 1) . "?");
        }
    } elsif ($text=~/prepared/i) {
        if (defined $qglobals{"Ruko"} && $qglobals{"Ruko"} >= 1 && $qglobals{"Ruko"} <= 5) {        
            plugin::Whisper("Very Well!");
            quest::assigntask(($qglobals{"Ruko"} + 4));
            quest::zone("brellsarena");
        } else {
            plugin::Whisper("I can do nothing for you.");
        }
    } elsif ($text=~/archery/i && $class eq "Ranger") {
        plugin::Whisper("Wonderful! While out on your adventures you may find many various items that can be used to fashion new arrows or bows! This is doable with the skill " . quest::saylink("fletching", 1) . " . I also have a series of tasks you can do to receive various useful items! What do ya say, will you " . quest::saylink("help", 1) . " me?");
        quest::setglobal("Ruko", 1, 5, "F");
    } elsif ($text=~/fletching/i && $class eq "Ranger") {
        plugin::Whisper("To get started with fletching first take this.... Now look over the recipes and look out for items throughout your travels. When you have the items required to create a item simply combine them in your fletching kit. Deep within the Basement you can also find my supplier he should have everything you need!");
        quest::summonitem(17910);
    } elsif ($text=~/help/i) {
        plugin::Whisper("Wonderful I offer a series of Five tasks. Each one getting progressively more difficult. The risk is great but the reward is worth it! So tell me, are you " . quest::saylink("prepared", 1) . " ?");
    } elsif ($text=~/ranger/i && $class eq "Ranger") {
        plugin::Whisper("Hello young Ranger! Allow me to outfit you with your first bow!");
        quest::summonitem(4066);
        plugin::Whisper("Would you be interested in further improving your " . quest::saylink("archery", 1) . "?");    
    }
}

sub EVENT_ITEM {
    if (plugin::check_handin(\%itemcount, 4089 => 1)) {
        quest::summonitem($_) for (4142, 4150);
    } elsif (plugin::check_handin(\%itemcount, 4090 => 1)) {
        quest::summonitem($_) for (4143, 4151);
    } elsif (plugin::check_handin(\%itemcount, 4092 => 1)) {
        quest::summonitem($_) for (4144, 4160);
    } elsif (plugin::check_handin(\%itemcount, 4117 => 1)) {
        quest::summonitem($_) for (4145, 4197);
    } elsif (plugin::check_handin(\%itemcount, 4140 => 1)) {
        quest::summonitem($_) for (4149, 4198);
    }
    plugin::return_items(\%itemcount);
}
Script Two:
Code:
$rnd = quest::ChooseRandom(1..12, 128, 130, 330, 522);
sub EVENT_SAY {
    if($text=~/hail/i) {
        plugin::Whisper("Hello $name. Do you seek to change your " . quest::saylink("race", 1) . "? Or Perhaps you would like a " . quest::saylink("redo", 1) . "?");
        quest::setglobal("Race", 1, 5, "F");
    } elsif($text=~/sure/i) {
        if(defined $qglobals{"Race"} && $qglobals{"Race"} >= 1 && $qglobals{"Race"} <= 4) {
            plugin::Whisper("Very Well");
            quest::permarace($rnd);
            quest::setglobal("Race", ($qglobals{"Race"} + 1), 5, "F");
        } else {
            plugin::Whisper("I can do nothing for you at this time.");
        }
    } elsif($text=~/race/i) {
        plugin::Whisper("I can change your race for you if you bring me a " . quest::varlink(3856) . " . I believe Relkor was said to have them in his possesion. Please note that this change is permanent and completely random!");
    } elsif($text=~/redo/i) {
        plugin::Whisper("Please note I can only ever do this for you 4 times. Are you " . quest::saylink("sure", 1) . " you want a redo?");
    }
}
    
sub EVENT_ITEM { 
    if(plugin::check_handin(\%itemcount, 3856 => 1)) {
        plugin::Whisper("As promised!");
        quest::permarace($rnd);
        quest::setglobal("Race", 1, 5, "F");
    }
}
Make sure to enable quest globals on these NPCs if you haven't already.

Also, make sure to always check if the quest global is defined, that way if it isn't it just defaults out.
Reply With Quote
 


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