quest::QGVarDuration? quest::timeleft? Do these work?
Trying to track a timer independent of any zone. However I am having trouble extracting the time remaining in a global or a task, either of which would work.
Take a look at these examples and tell me what I am doing wrong, neither will export the variable $Check. sub EVENT_SAY { quest::setglobal("vxed_Instance_Flag", 1, 5, "D3"); my $Check = quest::QGVarDuration($qglobals{vxed_Instance_Flag} ); quest::emote("Duration is : $Check"); } sub EVENT_SAY { #Used within the zone the task is set. #quest::assigntask(50); my $Check = quest::timeleft(50); quest::emote("$Check"); } |
Never used those before, but did you enable globals on the NPC you are testing this on?
|
Yes, globals are enabled.
|
$qglobals{vxed_Instance_Flag} should return the value of the global, not the global object. Maybe try quest::QGVarDuration("vxed_Instance_Flag")
EDIT: Maybe not. It looks like (according to the wiki) that function will only return the amount of seconds based on a duration input. For example: quest::QGVarDuration("D3") should return 259200. |
Figured it out at least the task one.
The correct function is quest::tasktimeleft(id); It's just incorrect in the wiki. I found this saved on a random notepad file. Code:
void quest::taskselector(int taskcount, int *tasks) { - |
All times are GMT -4. The time now is 04:29 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.