summaryrefslogtreecommitdiff
path: root/doc
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
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')
-rw-r--r--doc/constants.md8
-rw-r--r--doc/sample/npc_test_duplicate.txt2
-rw-r--r--doc/script_commands.txt16
3 files changed, 17 insertions, 9 deletions
diff --git a/doc/constants.md b/doc/constants.md
index 0651c7b2a..89d4969c0 100644
--- a/doc/constants.md
+++ b/doc/constants.md
@@ -3563,6 +3563,14 @@
- `PC_GUILD`: 2
- `PC_MAP`: 3
+### strnpcinfo
+
+- `NPC_NAME`: 0
+- `NPC_NAME_VISIBLE`: 1
+- `NPC_NAME_HIDDEN`: 2
+- `NPC_NAME_UNIQUE`: 3
+- `NPC_MAP`: 4
+
### sc_start
- `SCFLAG_NONE`: 0
diff --git a/doc/sample/npc_test_duplicate.txt b/doc/sample/npc_test_duplicate.txt
index 4e07e38c4..38670d4d5 100644
--- a/doc/sample/npc_test_duplicate.txt
+++ b/doc/sample/npc_test_duplicate.txt
@@ -19,7 +19,7 @@
OnInit:
getmapxy(.map$, .x, .y, 1);
- debugmes strnpcinfo(0);
+ debugmes strnpcinfo(NPC_NAME);
end;
OnTouch:
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