View Full Version : Task_Stage_Complete usage
Randymarsh9
05-05-2009, 05:08 PM
I want to use the sub_EVENT_TASK_STAGE_COMPLETE in one of my quests, but I'm not sure how you would actually use it in a quest. What would I put to make it do something when you complete activity 0 or 1 of a task with an id of something like 20?
Theeper
05-18-2009, 09:39 PM
You could put it in player.pl and use it like this. Then every time a player completed an activity, you'd have the $activity_id and $task_id variables to play with.
sub EVENT_TASK_STAGE_COMPLETE {
quest::say("Yay!, I completed activity $activity_id of task $task_id");
}
Randymarsh9
11-10-2009, 09:00 PM
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.
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");
}
}
Randymarsh9
11-10-2009, 10:37 PM
Nevermind. Fixed it
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.