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
  #6  
Old 08-07-2011, 03:32 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

This should work better:
Code:
######
#Name: Task
#Author: Kingmen
######

sub EVENT_SAY
{
 #Saylinks
        my $job = quest::saylink("job");

        if($text=~/Hail/i) {
                quest::say("Hi $name, I have a [$job] for you.");
        }
        elsif($text=~/job/i)
        {
                if(!quest::istaskcompleted(quest::lasttaskinset(1)))
                {
                        if(quest::enabledtaskcount(1) == 0)
                        {
                                plugin::Whisper("I haven't seen you before!");
                                quest::enabletask(quest::firsttaskinset(1));
                        }
                        else
                        {
                                $task = quest::activespeaktask();
                                if($task != 0)
                                {
                                        $activity = quest::activespeakactivity($task);
                                        quest::updatetaskactivity($task, $activity);
                                        plugin::Whisper("Well Done!");
                                        if(!quest::istaskactive($task))
                                        {
                                                quest::disabletask($task);
                                                if($task != quest::lasttaskinset(1))
                                                {
                                                        plugin::Whisper("Well done, I ahve another task if you are willing.");
                                                        quest::enabletask(quest::nexttaskinset(1, $task));

                                                }
                                                else
                                                {
                                                        plugin::Whisper("Thank you for all your work.");
                                                }
                                        }
                                }
                                else
                                {
                                }
                        }
                        if(quest::activetasksinset(1) == 0)
                        {
                                quest::tasksetselector(1);
                        }
                }
                else
                {
                        plugin::Whisper("Hail, Conqueror!");
                }
        }
}
I replaced your elseifs with else where appropriate, fixed the typo I mentioned above, and also you had activetaskinset instead of activetasksinset.

I changed the taskset number from 500 to 1, since I already had a taskset 1 I could use for testing, so you will need to change them back to 500. I tested as far as completing the first task and getting assigned the next one.
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 12:13 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