From 5362e99716abb5e8a4e2b7f057af46a45a1d7cbf Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 18 Jun 2015 03:24:04 +0200 Subject: Deprecated use of numeric NPC view IDs. Use constants instead. Signed-off-by: Haru --- doc/script_commands.txt | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'doc/script_commands.txt') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index ba85c917f..0726630df 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -225,8 +225,8 @@ current scripts have a zero in there. ** Define an NPC object. -,,,%TAB%script%TAB%%TAB%,{} -,,,%TAB%script%TAB%%TAB%,,,{} +,,,%TAB%script%TAB%%TAB%,{} +,,,%TAB%script%TAB%%TAB%,,,{} This will place an NPC object on a specified map at the specified location, and is a top-level command you will use the most in your custom @@ -240,16 +240,17 @@ increments of 45 degrees, where 0 means facing towards the top of the map. (So to turn the sprite towards the bottom of the map, you use facing 4, and to make it look southeast it's facing 5.) -Sprite id is the sprite number used to display this particular NPC. For a -full list of sprite id numbers see http://kalen.s79.xrea.com/npc/npce.shtml -You may also use a monster's ID number instead to display a monster sprite +Sprite is the sprite identifier used to display this particular NPC. For a +full list of sprite numbers see http://kalen.s79.xrea.com/npc/npce.shtml as +well as db/const.txt. +You may also use a monster's ID constant instead to display a monster sprite for this NPC, in npcs that have view ids of mobs it's encouraged to use OnTouch events with a 2,2 range and with an 'end' after the header to avoid bugs (for more info on why see npc_click@map/npc.c). It is possible to use a job sprite as well, but you must first define it as a monster sprite in 'mob_avail.txt', a full description on how to do this is not in the scope of this manual. -A '-1' sprite id will make the NPC invisible (and unclickable). -A '111' sprite id will make an NPC which does not have a sprite, but is +A '-1' sprite will make the NPC invisible (and unclickable). +A 'HIDDEN_NPC' sprite will make an NPC which does not have a sprite, but is still clickable, which is useful if you want to make a clickable object of the 3D terrain. @@ -279,8 +280,8 @@ what these floating NPC objects are for. More on that below. ** Define a shop/cashshop NPC. --%TAB%shop%TAB%%TAB%,:{,:...} -,,,%TAB%shop%TAB%%TAB%,:{,:...} +-%TAB%shop%TAB%%TAB%,:{,:...} +,,,%TAB%shop%TAB%%TAB%,:{,:...} This will define a shop NPC, which, when triggered (which can only be done by clicking) will cause a shop window to come up. No code whatsoever runs @@ -301,7 +302,7 @@ items here. The layout used to define sale items still count, and "" refers to how many points will be spent purchasing the them. ** Define a trader NPC -,,,%TAB%trader%TAB%%TAB%,{} +,,,%TAB%trader%TAB%%TAB%,{} -%TAB%trader%TAB%%TAB%-1,{} All the standards that are valid to script objects are also valid for trader objects @@ -326,16 +327,16 @@ more information regarding how to use this NPC type. ** Define an warp/shop/cashshop/NPC duplicate. warp: ,,{,}%TAB%duplicate(