EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Task/Quest Syntax help request (https://www.eqemulator.org/forums/showthread.php?t=40378)

Warking 02-04-2016 07:51 AM

Task/Quest Syntax help request
 
This is probably a simple fix but I have been all over the Wiki and forums and I am still missing what needs to be done here.

I keep Getting the below error when a task is enabled. I created the task through the EoC and it works fine, except for this request error:

Code:

Unable to find NPC to send EVENT_TASKACCEPTD to. Report this bug.
Below is the npc.pl code

Code:

sub EVENT_TASKACCEPTED
{
quest::say("You accepted task $273");
quest::say("You accepted task $274");
}

sub EVENT_SAY
{
if ($text =~/Hail/i)
 {
quest::say ("[test]! [testE]! Listen to this [song] .");
 }
 if($text=~/test/i)
{
plugin::AssignTask("solo", 273); #::: This will enable task 273
plugin::MM("test " . $name . "!"); #::: This will push a client side Yellow message in the screen
}
if($text=~/testE/i)
{
plugin::AssignTask("solo", 274); #::: This will assign solo Kill task 274
quest::say ("test");
plugin::MM("test"); #::: This will push a client side Yellow message in the screen
}
#The below statement will play a song to the client. "
if($text=~/song/i){
$client->PlayMP3("compton.mp3");
}
}
#The below setion handles how a character hands in the items for the task.  This will grant a small amount of exp and give grp currency on turn in
sub EVENT_ITEM
{
if(plugin::check_handin(\%itemcount, 132492 => 1))
  {
  quest::say("test!");
  quest::exp(20);
  quest::summonitem(132491);
  }
}
#End of File - erudinnext test.pl NPC_Type ID:xxxxx


joligario 02-04-2016 08:09 AM

You're probably going to need to show the database entries for the task and activities.

Warking 02-04-2016 02:57 PM

Activities Table:
Code:

taskid        activityid        step        activitytype        text1        text2          text3          goalid        goalmethod        goalcount        delivertonpc        zoneid        optional
273        0                1          1              test        diamond                132492              0                100                24307                  24        0

Task Table:
Code:

id        duration        title        description                                  reward        rewardid        cashreward        xpreward        rewardmethod        startzone        minlevel        maxlevel        repeatable
273        0                test3  [1,Kill guards, Bring me 100 diamonds]        testitem        132493                0                4000                0                24                  0                  0                  1

I created a new custom diamond so that is 132492

joligario 02-04-2016 06:42 PM

What does it say in yellow just before this error? "Task Giver ID is"...

Warking 02-04-2016 07:47 PM

'Task Giver ID is 0' There must be some code or table I need to enter the npcID I guess but I cannot find where. Unless my thinking is way off?

Quest_Globals table?

joligario 02-04-2016 07:56 PM

It gets the NPC ID from the npc_types table. So, yes it does need to be entered and the NPC ID cannot be 0. The normal format starts at the zone id * 1000. So in PoK, for example, the NPC IDs usually are 202xxx. The editor will help sort in that format.

Warking 02-04-2016 08:01 PM

This NPCID=24307 in NPC_Types table there are no npcs with 0. Do I need to define it in the .pl file somewhere?

joligario 02-04-2016 08:07 PM

Oh, using the plugin, you must specify the NPC ID.

EDIT: plugin::AssignTask("solo", 273, $npc->GetID());

Warking 02-04-2016 08:53 PM

Ah, Awesome! A million thanks for the help on this one!

Should probably update the wiki on the plugin use

(http://wiki.eqemulator.org/p?Perl_Pl...rence&frm=Main)


All times are GMT -4. The time now is 08:36 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.