summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-03-15 11:02:32 -0400
committergumi <mekolat@users.noreply.github.com>2017-03-28 15:41:35 -0400
commit9c0abf37f912ff2a4192ec72ac8d48da0d84ba33 (patch)
tree110b8dc6e0f3b03e4feec0cca348b0c9d0650c85 /doc/script_commands.txt
parent1eb26bfc0c32864bc3bef0ad7b5d853adda1bed6 (diff)
downloadhercules-9c0abf37f912ff2a4192ec72ac8d48da0d84ba33.tar.gz
hercules-9c0abf37f912ff2a4192ec72ac8d48da0d84ba33.tar.bz2
hercules-9c0abf37f912ff2a4192ec72ac8d48da0d84ba33.tar.xz
hercules-9c0abf37f912ff2a4192ec72ac8d48da0d84ba33.zip
add gettimer() buildin
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt49
1 files changed, 39 insertions, 10 deletions
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(<ticks>, "NPC::OnLabel"{, <account id>})
-*deltimer("NPC::OnLabel"{, <account id>})
-*addtimercount("NPC::OnLabel", <ticks>{, <account id>})
-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 <acccount id> 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 <acccount id> 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"{, <account id>})
+
+Deletes timers created by addtimer() that matches the given event
+label. Refer to addtimer() for additional information.
+
+---------------------------------------
+
+*addtimercount("NPC::OnLabel", <ticks>{, <account id>})
+
+Delays a timer that was created with addtimer() by <ticks> ticks
+if it matches the given event label. Refer to addtimer() for additional
+information.
+
+---------------------------------------
+
+*gettimer(<type>{, <account id>{, "<event>"}})
+
+Returns informations on timers that were created by addtimer().
+
+valid <type> for gettimer() are:
+
+(0) TIMER_COUNT
+ Will return the total number of timers for the specified or
+ attached player. Can be filtered by <event>.
+(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 <event>.
+(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 <event>.
+
+---------------------------------------
+
*initnpctimer({ "<NPC name>" {, <Attach Flag>} } |
{ "<NPC name>" | <Attach Flag> })
*stopnpctimer({ "<NPC name>" {, <Detach Flag>} } |