summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAsheraf <acheraf1998@gmail.com>2016-08-28 17:03:57 +0100
committerhemagx <ibrahem.h.basyone@gmail.com>2016-08-29 01:03:42 +0200
commit86977d79269408a371384e61111c3a9cf6e87b0c (patch)
tree4f2a9b1f9a3ee6436a0b857d05caa2be7e99a877 /doc
parent16f998c8a79153ed9f6721c36e129b6080fa59d2 (diff)
downloadhercules-86977d79269408a371384e61111c3a9cf6e87b0c.tar.gz
hercules-86977d79269408a371384e61111c3a9cf6e87b0c.tar.bz2
hercules-86977d79269408a371384e61111c3a9cf6e87b0c.tar.xz
hercules-86977d79269408a371384e61111c3a9cf6e87b0c.zip
*strnpcinfo now uses constants
- NPC_NAME for the whole npc name including hidden part - NPC_NAME_VISIBLE for the visible part of the npc name - NPC_NAME_HIDDEN for the hidden part of the npc name - NPC_NAME_UNIQUE for the npc unique name - NPC_MAP for npc map
Diffstat (limited to 'doc')
-rw-r--r--doc/sample/npc_test_duplicate.txt2
-rw-r--r--doc/script_commands.txt16
2 files changed, 9 insertions, 9 deletions
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 204723905..04d2c0c16 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.
---------------------------------------
@@ -6454,7 +6454,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!");
@@ -7503,7 +7503,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);
@@ -7541,7 +7541,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