From 9c0abf37f912ff2a4192ec72ac8d48da0d84ba33 Mon Sep 17 00:00:00 2001 From: gumi Date: Wed, 15 Mar 2017 11:02:32 -0400 Subject: add gettimer() buildin --- doc/script_commands.txt | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index b202f1b6b..581ec182c 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -6479,17 +6479,13 @@ Size is 0 = normal 1 = small 2 = big. --------------------------------------- *addtimer(, "NPC::OnLabel"{, }) -*deltimer("NPC::OnLabel"{, }) -*addtimercount("NPC::OnLabel", {, }) -These commands will create, destroy, and delay a countdown timer - -addtimer() to create, deltimer() to destroy and addtimercount() to delay -it by the specified number of ticks. For all three cases, the event label -given is the identifier of that timer. The timer runs on the character -object that is attached to the script, and can have multiple instances. -If is passed, this player will be used instead. -When the label is run, it is run as if the player that the timer runs on -has clicked the NPC. +This command will create a countdown timer. +The event label given is the identifier of that timer. +The timer runs on the character object that is attached to the script, +and can have multiple instances. If is passed, this player +will be used instead. When the label is run, it is run as if the player +that the timer runs on has clicked the NPC. When this timer runs out, a new execution thread will start in the specified NPC object at the specified label. @@ -6513,6 +6509,39 @@ On5secs: --------------------------------------- +*deltimer("NPC::OnLabel"{, }) + +Deletes timers created by addtimer() that matches the given event +label. Refer to addtimer() for additional information. + +--------------------------------------- + +*addtimercount("NPC::OnLabel", {, }) + +Delays a timer that was created with addtimer() by ticks +if it matches the given event label. Refer to addtimer() for additional +information. + +--------------------------------------- + +*gettimer({, {, ""}}) + +Returns informations on timers that were created by addtimer(). + +valid for gettimer() are: + +(0) TIMER_COUNT + Will return the total number of timers for the specified or + attached player. Can be filtered by . +(1) TIMER_TICK_NEXT + Will return the number of ticks until the next timer runs + for the specified or attached player. Can be filtered by . +(2) TIMER_TICK_LAST + Will return the number of ticks until the last timer runs + for the specified or attached player. Can be filtered by . + +--------------------------------------- + *initnpctimer({ "" {, } } | { "" | }) *stopnpctimer({ "" {, } } | -- cgit v1.2.3-70-g09d2