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, 01:17 PM
Bdiddy
Sarnak
 
Join Date: Sep 2010
Posts: 77
Default Task System Quest

I made my first quest with KLS task master. It shows in my my db under the tasks. It's justs a basic raid, go kill one npc and that's it. My question is how do I add the task to the npc I want to have give the task. So say NPC A in PoK gives the task to go kill NPC B in PoFire. The part were NPC A gives the task is were I'm stuck. Also for the reward method I have as single item id. Is that were everyone in the group/raid gets the reward on their cursor upon a successful kill? That's basically what I'm trying to accomplish, give out task, kill raid npc, everyone gets reward. Thanks
Reply With Quote
  #2  
Old 12-14-2010, 01:37 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by Bdiddy View Post
I made my first quest with KLS task master. It shows in my my db under the tasks. It's justs a basic raid, go kill one npc and that's it. My question is how do I add the task to the npc I want to have give the task. So say NPC A in PoK gives the task to go kill NPC B in PoFire. The part were NPC A gives the task is were I'm stuck. Also for the reward method I have as single item id. Is that were everyone in the group/raid gets the reward on their cursor upon a successful kill? That's basically what I'm trying to accomplish, give out task, kill raid npc, everyone gets reward. Thanks
quest::assigntask(taskid);

quest::taskselector(taskcount, taskid1, taskid2, taskid3);

You can find more task related quest objects here:

http://www.eqemulator.net/wiki/wikka...uestCheatSheet

Also, before you say the task isn't working. Make sure you start your task with activity id 0, 1, 2, 3, 4 chronologically. Your steps can be whatever you wish.

Then you must make sure that if you are rewarding your players via item ID you need to define that in the editor, or know what values equal what in the schema Derision designed it for here:

http://www.eqemulator.net/wiki/wikka...goryTaskSystem
Reply With Quote
  #3  
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
  #4  
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
  #5  
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
  #6  
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
  #7  
Old 12-14-2010, 04:11 PM
Bdiddy
Sarnak
 
Join Date: Sep 2010
Posts: 77
Default

yeah, goalcount, goalid, goalmethod are all at 0
I also realized that i dont think i have anything set or code that lets the quest know that the npc has been killed and to update the quest.
Reply With Quote
  #8  
Old 12-14-2010, 04:15 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

OK, well you want goalcount = 1, to specify the player needs to kill 1 of the NPC.

In goalid you want the ID of the NPC (from the npc_types table), e.g. Fennin Ro is npc_type id 217054.

goalmethod 0 is correct for the task system to automatically provide the reward when the NPC is killed.

Also you want activitytype 2 (Kill).

Whenever you change anything in the task/activity table you should do a #task reloadall to have the zone re-read the data.
Reply With Quote
  #9  
Old 12-14-2010, 04:39 PM
Bdiddy
Sarnak
 
Join Date: Sep 2010
Posts: 77
Default

Ok success. Now i just need to figure out how to actually write a raid quest instead of npc has X amount of hp hits X hard. Any threads you can point me to?
And thx for your help.
Reply With Quote
  #10  
Old 12-14-2010, 04:50 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

If I understand you correctly you want to write some sort of encounter, such as a boss spawns adds when it gets to x% of health and other things like that.

If so, that's not my area of expertise, so I recommend you either look at existing raid encounters (look at the .pl files in the zone
a particular raid mob spawns in), or post more details of what you want to do and wait for one of the gurus in that area to come along
Reply With Quote
  #11  
Old 12-14-2010, 08:08 PM
Bdiddy
Sarnak
 
Join Date: Sep 2010
Posts: 77
Default

got a slight hiccup, I wanted to make the task repeatable but it doesn't seem to work. I've made the repeatable field in the tasks table both 1 and then 0 and restarted the server both times and i couldn't get the quest again. Also tried #task reloadall
Reply With Quote
  #12  
Old 12-15-2010, 03:31 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

If you want it to be repeatable, just remove the !quest::istaskcompleted() check in the EVENT_SAY.

As for making a fight more than just tank and spank, there is no simple answer to that question and I would suggest starting a new thread once you figure out what you want it to do if you can't figure out how to do it yourself. That said; it isn't likely people are just going to write your encounters for you. If you are trying to learn on your own, then Derision's suggestion is probably your best bet. You will want to find a similar existing encounter that works something like what you want to create, and then examine that .pl file to see how the PEQ team did it. There are endless possibilities for special encounters. They can range from simple stuff like spawning adds or casting spells at certain times to more complex stuff that involves multiple NPCs, and special strats to beat the encounter. You definitely want to start simple and work your way up from there as you learn more. The wiki is full of great quest information to help guide you along the way.

Some of this stuff can be pretty complicated, and the wiki can help if you take the time to really read through it and try to figure out what is needed. For complex stuff like the task system, there is no simple way to explain it well enough and cover enough information.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


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 01:08 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