Log in

View Full Version : Mob Kill Quests


Warking
10-08-2012, 10:03 PM
Hello Everyone,

I have been reading the tutorials and a lot of sample quests and even looking at code of existing quests and I can't for life of me figure out where I can define the Mob ID I want to kill and the number of them I want to kill.

I've already done turn in quests but I want to do a quest where you kill X amount of MobID XXXX , then hail or get a reward once kills have completed.

Anyone have some sample code to toss my way showing where to define those variables?

trevius
10-09-2012, 07:40 AM
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.php?wakka=QuestTutorial

wolfwalkereci
10-09-2012, 01:43 PM
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.

Warking
10-11-2012, 12:46 AM
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.

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:

#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

Warking
02-02-2016, 04:30 AM
In the task system I want to reward xAlt Currency for completing the task in addition to exp. When I go and add the reward I can only add 1x Alt currency. How do I set it to give a stack of currency?