Herro,
Well here is another issue I am having that I graciously need some advice on.
I noticed in logs that it is saying unable to read perl file player_v0.pl I know there is a coded hierarchy for the global_player > player and so on. I am wondering if that is my issue. I do have a global_player.pl in place in the templates.
Or I noticed in the task information that is you manually assign a task with assigntask then it calls $taskid and if the task is selected by PC then its called with $task_id. If I understood this correctly. I have tried both.
I have also tried both EVENT_TASK_STAGE_COMPLETE and EVENT_TASK_COMPLETE
So what I am trying to accomplish is quest chain npcs for my expansion. Upon completing task 281 I am trying to use player.pl to signal my NPC to continue on. The reason I am doing this is because the task requires 20 turn ins and I could not get it to advance the script because you can only trade non stack items to NPC and the npc did not remember how many I turned in to accomplish a total of 20 to continue the script.
Here are my 2 scripts. Everything works properly and in order besides the Signal part in the my npc script.
player.pl
Code:
sub EVENT_TASK_COMPLETE {
if ($task_id == 281){
quest::updatetaskactivity(286, 2);
quest::signalwith(999267,1,1);
}
}
Thed.pl
Code:
#Thed Creggle Task order
#Hail and asks if i know you
#Say master thaedus sent me
#Say I am worthy varlink
#Assigned Drake Task
#Turn in drake task
#Flagged for Jones and Happy Tree to talk by istaskcomplete
#Recieve Materials Task
#Loot materials and turn in materials
#update task 286 zone quest
#Summon Stack of Potions
#Inform to visit Dwight at next post
#
sub EVENT_SAY {
my $Worthy = quest::saylink("worthy?");
#Flagged from proving thaedus sent you
if ((defined $qglobals{"Moors_Open"}) && ($qglobals{"Moors_Open"} == 2)) {
if (quest::istaskactivityactive(280,1)){
plugin::Whisper("Great Job. Now onto something to give your life meaning. We are collecting materials for potions to cure our sick scouts. Talk to Josh and the Happy tree, I am sure they need something.");
quest::assigntask(281);
}
#if material task active suggest need more materials
elsif (quest::istaskactive(281)){
plugin::Whisper("We need those materials so we can make those potions. Help us.");
}
#if material task commpleted and hail target he retells you to take potions to dwight, failsafe
elsif (quest::istaskcompleted(281)){
if($text=~/hail/i){
plugin::Whisper("Excellent, with these we will save many lives! Take them to Dwight Root, follow the road back east to the Moors Post.");
#quest::summonitem(132584);
}
}
#Hail after flag to get drake task if bugged, failsafe
elsif($text=~/hail/i){
plugin::Whisper("So what do you say? Do you think you are $Worthy");
}
#Varlink to assign drake task
if($text=~/worthy?/i){
quest::assigntask(280);
plugin::Whisper("I am waiting....");
}
#End global bracket
}
#proving who you are for flag to open up chain
elsif($text=~/master thaedus/i){
plugin::Whisper("You are lucky little one, Josh Jones almost ate your face! First you must prove your worth to me, do a little dirty work and only then will I grant you access to Moors Post. So what do you say? Do you think you are $Worthy");
quest::updatetaskactivity(286, 1);
quest::setglobal("Moors_Open",2,5,'F');
}
#initial hail to start chain
elsif($text=~/hail/i){
plugin::Whisper("Do I know you? Maybe you should go back to Master Thaedus before I slay you.");
}
}
sub EVENT_SIGNAL {
#signal recieved from player.pl after material task completed to have thed talk summon potions update
#master quest and tell you to advance to next post
if($signal == 1) {
plugin::Whisper("These will save many lives. Thank you so much. Take these to my assistant Dwight Root at the Moors Post, you can find it dead west down the path from here.");
quest::summonitem(132584);
quest::updatetaskactivity(286, 2);
}
}
sub EVENT_ITEM {
}
Thanks!!!