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 12-14-2010, 02:08 PM
Bdiddy
Sarnak
 
Join Date: Sep 2010
Posts: 77
Default

thx, anyway this can be explained a little simpler for someone w/a novice programming background? thx
Reply With Quote
  #2  
Old 12-14-2010, 02:36 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

To assign the task, add a Perl quest to the NPC. E.g. if I wanted V'Lynn Renloe in PoK to assign the task, I would put this:
Code:
sub EVENT_SAY
{
        if($text=~/hail/i)
        {
                if(!quest::istaskactive(1000) && !quest::istaskcompleted(1000))
                {
                        quest::say("Assigning you task to kill Fennin Ro,");
                        quest::assigntask(1000);
                }
        }
}
in quests\poknowledge\V-Lynn_Renloe.pl

Note the Perl checks if you already have the task in your active tasks, or if you have completed it before.
Reply With Quote
  #3  
Old 12-14-2010, 02:55 PM
Bdiddy
Sarnak
 
Join Date: Sep 2010
Posts: 77
Default

thx, when i try it out and hail the npc i get Invalide TaskID 303. 303 is the id of the task in my tasks table.
Reply With Quote
  #4  
Old 12-14-2010, 03:08 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

If you added the task to the task table but did not restart your server, issuing the GM command #task reloadall will make it available.

Also to address your other point about rewards, the task system currently is designed for single player tasks.

Shared Tasks, which reward a group of players are not currently implemented.

You could reward members of the group, by having the task RewardMethod set to 2 and using something like this:
Code:
sub EVENT_TASK_STAGE_COMPLETE
{
        if(($task_id == 1000) && ($activity_id == 0))
        {
                $g = $client->GetGroup();

                if(!$g)
                {
                        quest::say("You are not in a group, just rewarding you.");
                        $client->SummonItem(5500);      # SSoY
                }
                else
                {
                        for($i = 0; $i < 6; ++$i)
                        {
                                $c = $g->GetMember($i);
                               
                                if($c)
                                {
                                        $name = $c->GetName();
                                        quest::say("Rewarding group member $name");
                                        $c->SummonItem(5500);
                                }
                        }
                }
        }
}
in the player.pl of the zone the final activity takes place in (e.g. quests\pofire\player.pl), but if two or more players in the group have the task active, then all group members will get rewarded two or more times using that code.
Reply With Quote
  #5  
Old 12-14-2010, 03:16 PM
Bdiddy
Sarnak
 
Join Date: Sep 2010
Posts: 77
Default

for the reward if each player in the group/raid gets the task and they are all grouped/raid together will each player get the reward on the kill then? instead of just getting one task for the entire group/raid
Reply With Quote
  #6  
Old 12-14-2010, 03:30 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Yes, if every player in the group/raid has been assigned the task, by hailing the task giver, or whatever, then they will all get the reward if the final activity is a Kill activity, as all the members of the group or raid get merit for the kill.
Reply With Quote
  #7  
Old 12-14-2010, 03:33 PM
Bdiddy
Sarnak
 
Join Date: Sep 2010
Posts: 77
Default

I restarted the server, did the gm command also and still got the same error Invalid id 303
Reply With Quote
  #8  
Old 12-14-2010, 03:41 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Probably your activity IDs for the task don't start at 0, or are not sequential as Akkadius suggested.

If the Task ID really is 303, then there should be messages in your zone log files detailing why it couldn't load the task, but the above is most likely.

If that isn't the problem, we would need to see the relevant rows from your task and activity table, i.e. the output of:
Code:
select * from tasks where id = 303;
select * from activities where taskid =303;
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 09:55 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