summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorEmistry Haoyan <Equinox1991@gmail.com>2016-08-31 02:49:04 +0800
committerEmistry Haoyan <Equinox1991@gmail.com>2016-08-31 02:49:04 +0800
commit99a36a426b7d2adb6a0f417e02e92366939e5d22 (patch)
tree74a0fef908f373c3c6674821a150e866a2afb4c3 /doc/script_commands.txt
parentac6fd81810e6afb1ef60e7f2c7f8fc6e03408724 (diff)
parent0f1d03f505fdc03533122db8ba19fa55f64f11b7 (diff)
downloadhercules-99a36a426b7d2adb6a0f417e02e92366939e5d22.tar.gz
hercules-99a36a426b7d2adb6a0f417e02e92366939e5d22.tar.bz2
hercules-99a36a426b7d2adb6a0f417e02e92366939e5d22.tar.xz
hercules-99a36a426b7d2adb6a0f417e02e92366939e5d22.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules into scriptcommand_makeitem2
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 92d5a0a4e..9ac287d19 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -2363,11 +2363,11 @@ using only numbers reduces script readability
This function will return the various parts of the name of the calling NPC.
Whatever it returns is determined by type.
- 0 - The NPC's display name (visible#hidden)
- 1 - The visible part of the NPC's display name
- 2 - The hidden part of the NPC's display name
- 3 - The NPC's unique name (::name)
- 4 - The name of the map the NPC is in.
+(0) NPC_NAME - The NPC's display name (visible#hidden)
+(1) NPC_NAME_VISIBLE - The visible part of the NPC's display name
+(2) NPC_NAME_HIDDEN - The hidden part of the NPC's display name
+(3) NPC_NAME_UNIQUE - The NPC's unique name (::name)
+(4) NPC_MAP - The name of the map the NPC is in.
---------------------------------------
@@ -6479,7 +6479,7 @@ mechanism (like sleep()).
Example:
<NPC Header> {
dispbottom("Starting a 5 second timer...");
- addtimer(5000, strnpcinfo(3)+"::On5secs");
+ addtimer(5000, strnpcinfo(NPC_NAME_UNIQUE)+"::On5secs");
end;
On5secs:
dispbottom("5 seconds have passed!");
@@ -7528,7 +7528,7 @@ When a user types the command "@test", an angel effect will be shown.
- script atcmd_example FAKE_NPC,{
OnInit:
- bindatcmd("test", strnpcinfo(3)+"::OnAtcommand");
+ bindatcmd("test", strnpcinfo(NPC_NAME_UNIQUE)+"::OnAtcommand");
end;
OnAtcommand:
specialeffect2(EF_ANGEL2);
@@ -7566,7 +7566,7 @@ case it expects spaces. For example:
- script atcmd_example FAKE_NPC,{
OnInit:
- bindatcmd("test", strnpcinfo(3)+"::OnAtcommand");
+ bindatcmd("test", strnpcinfo(NPC_NAME_UNIQUE)+"::OnAtcommand");
end;
OnAtcommand:
// This command expects a character name (that may contain spaces) as