Haha I found my old thread and realized I need help with this subject again. Basically I am trying to do a task where after you complete it, it will update a global variable, but I don't know how to do that just using the task system.
I have this in player.pl and I want it to trigger after you deliver 20 objects to an NPC. The task itself ends and has the "Task Completed" Message pop up, but nothing in the player.pl happens.
Code:
sub EVENT_TASK_STAGE_COMPLETE{
if ($task_id == 140 && $activity_id == 1){
$client->Message(3,"Fantastic! That will save me lots of time. Come back when you want more $tasks.");
quest::setglobal("blacksmith", $qglobals{blacksmith} + 1, 5, "F");
}
if ($task_id == 141 && $activity_id == 1){
$client->Message(3,"Ehh, these will do. Come back soon for more $tasks.");
quest::setglobal("blacksmith", $qglobals{blacksmith} + 1, 5, "F");
}
}