From a7d28720038070b6f8a15c707b38a0ce746c8206 Mon Sep 17 00:00:00 2001 From: Inkfish Date: Sat, 9 May 2009 01:45:11 +0000 Subject: * Fixed some known and unknown player attached NPC timer problems - Attached timer now can be stopped properly. - Attached timer will now stop if the NPC is unloaded. (bugreport:2510) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13744 54d463be-8e91-2dee-dedb-b68131a5f0ec --- doc/script_commands.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'doc/script_commands.txt') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 22076b342..c34a08dff 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -5110,8 +5110,8 @@ The 'setnpctimer' command will explicitly set the timer to a given tick. 0 - Will return the current tick count of the timer. 1 - Will return 1 if there are remaining "OnTimer:" labels in the specified NPC waiting for execution. - 2 - Will return the number of times the timer has triggered an "OnTimer:" - label in the specified NPC. + 2 - Will return the number of times the timer has triggered and will trigger + an "OnTimer:" label in the specified NPC. Example 1: @@ -5135,7 +5135,7 @@ Example 1: npctalk "1"; end; OnTimer10000: - stopnpctimer; + stopnpctimer; // This command is indeed not neccessary here because timer automaticly stopped due to no remaining events. mes "[Man]"; mes "Ok we can talk now"; } @@ -5143,8 +5143,10 @@ Example 1: Example 2: OnTimer15000: - npctalk "Another 15 seconds have passed."; - setnpctimer 0; + npctalk "Another 15 seconds have passed."; + initnpctimer; // You have to use 'initnpctimer' instead of 'setnpctimer 0'. + // This is equal to 'setnpctimer 0' + 'startnpctimer'. + // Alternatively, you can also insert another 'OnTimer15001' label so that the timer won't stop. end; // This OnInit label will run when the script is loaded, so that the timer -- cgit v1.2.3-60-g2f50