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 10-09-2012, 07:40 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

The best way to handle that type of quest is to use tasks. You would create a task in your DB and can reference the task information in the wiki, which is quite good.

You could do it in quest scripts as well. It isn't that hard to do. You could just use EVENT_DEATH in your NPC scripts for that NPC ID (ie. 12345.pl) in the specified zone. You would then need to keep track of the total kills using quest globals, which you can read about in the quest wiki page at the bottom here:

http://www.eqemulator.net/wiki/wikka...=QuestTutorial
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 10-09-2012, 01:43 PM
wolfwalkereci
Discordant
 
Join Date: Dec 2005
Posts: 435
Default

Trevius's advice is how I would handle it. Create a task, you can find examples if you look through the default tasks and if you want to use a perl quest to handle the reward just set the task as appropriate.
Mine are far from simple or I would post them as an example.
Reply With Quote
  #3  
Old 10-11-2012, 12:46 AM
Warking
Hill Giant
 
Join Date: Mar 2012
Location: Norrath
Posts: 132
Default

Thanks for the feedback! So I made the below task and assigned an NPC to give the task in the zone. It seems to assign the task into the quest task window just fine. I tested it out and the quest is updating per kill. Will see if the itemID I specified in the goalid is given when the task reaches 20 kills.

Code:
500 0	Destroy the Conscripts	[1,Kill 20 Sarnak Conscripts in the Field of Scale.]	Loot	110273	0	0	2	452	80	85	1


INSERT INTO `activities` (`taskid`, `activityid`, `step`, `activitytype`, `text1`, `text2`, `text3`, `goalid`, `goalmethod`, `goalcount`, `delivertonpc`, `zoneid`, `optional`) 

VALUES 
(500, 0, 1, 2, 'a sarnak conscript', '', '', 452041, 0, 20, 0, 452, 0),


Updated tasksets table  12  500
Quest Giver:

Code:
#Killer Bob NPCID: 999216
#will assign kill quests in the Field of Scale (oldfieldofbone)
#TaskID 500: Destroy the Conscripts- Kill 20 Sarnak Conscripts NPCID: 452041

sub EVENT_SAY 
 {
   if($text=~/hail/i) 
    {  
       quest::say("What do you want?  I [hate] everyone here!");
    }
   if($text=~/hate/i) 
    {  
       quest::say("Oh I hate them all... Look at them!  Hey, would you [like] to kill them for me?");  
    }
   if($text=~/like/i)
    {  
       quest::say("Take your pick of who you want to kill! The [sarnaks]?");  
    }
   if($text=~/sarnaks/i) 
    {  
       quest::say("Good! Now go kill 20 of them!");
	    quest::assigntask(500);  
    }


 }

Edit: Looks like i needed to change the rewardmethod = 0 for the item to be rewarded via the task system
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 04:44 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