- Clarified documentation for 'addtimer'.
- Fixed a typo in a gonryun NPC (Wi -> Wu). git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14047 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
f14d98c005
commit
75bc9caf0e
@ -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>} } |
|
||||
|
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user