diff options
author | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-09-08 00:50:14 +0000 |
---|---|---|
committer | brianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-09-08 00:50:14 +0000 |
commit | 1e720ea4015c89a5661c85a73a8b8381f140f675 (patch) | |
tree | 9eaca3e56b439ea149612ad657b9661d10856ef3 | |
parent | c5b4a8858a9cab1e11ec1e2a5d490172fc7d0afa (diff) | |
download | hercules-1e720ea4015c89a5661c85a73a8b8381f140f675.tar.gz hercules-1e720ea4015c89a5661c85a73a8b8381f140f675.tar.bz2 hercules-1e720ea4015c89a5661c85a73a8b8381f140f675.tar.xz hercules-1e720ea4015c89a5661c85a73a8b8381f140f675.zip |
- Clarified documentation for 'addtimer'.
- Fixed a typo in a gonryun NPC (Wi -> Wu).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14047 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | doc/script_commands.txt | 23 | ||||
-rw-r--r-- | npc/cities/gonryun.txt | 2 |
2 files changed, 18 insertions, 7 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 1cca99f28..b681a2fbc 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3153,7 +3153,7 @@ currently work due to a bug. ======================== ------------------------- -*playerattached; +*playerattached() Returns the ID of the player currently attached to the script. It will return 0 if noone is attached, or if the attached player no longer exists on the map @@ -3164,7 +3164,7 @@ account ID. --------------------------------------- -*isloggedin(<account id>{,<char id>}); +*isloggedin(<account id>{,<char id>}) This function returns 1 if the specified account is logged in and 0 if they aren't. You can also pass the char_id to check for both account and char id. @@ -5168,14 +5168,15 @@ Since trunk r11779 *deltimer "<NPC object name>::<event label>"; *addtimercount <ticks>,"<NPC object name>::<event label>"; -These commands will create, destroy, and delay a countdown timer - 'addtimer' to +These commands will create and manage a player-based 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. +that timer. A player can have multiple timers running at the same time, and +there can even be multiple timers referencing the same label. When this timer runs out, a new execution thread will start in the specified NPC -object at the specified label. If no such label is found in the NPC object, it -will run as if clicked. In either case, the script runs with no RID attached. +object at the specified label, and the script will run attached to that player. +If the specified label is not found, the map server will happily print an error. The ticks are given in 1/1000ths of a second. @@ -5183,6 +5184,16 @@ One more thing. These timers are stored as part of player data. If the player logs out, all of these get immediately deleted, without executing the script. If this behavior is undesirable, use some other timer mechanism (like 'sleep'). +Example 1: +<NPC Header> { + dispbottom "Starting a 5 second timer..."; + addtimer 5000, strnpcinfo(3)+"::On5secs"; + end; +On5secs: + dispbottom "5 seconds have passed!"; + end; +} + --------------------------------------- *initnpctimer{ "<NPC name>" {, <Attach Flag>} } | diff --git a/npc/cities/gonryun.txt b/npc/cities/gonryun.txt index b5452ee02..d294ddbb9 100644 --- a/npc/cities/gonryun.txt +++ b/npc/cities/gonryun.txt @@ -361,7 +361,7 @@ gonryun,166,196,3 script Soldier#gon 780,{ mes "looked human. I wonder"; mes "what it was..."; next; - mes "[Wa Qiu Wi]"; + mes "[Wa Qiu Wu]"; mes "It might have been the"; mes "thief, but it moved"; mes "so fast, it seemed like"; |