From a4492b60cf9012e990233ff4689cbf1ef67274ba Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Sat, 23 May 2020 09:35:47 +0200 Subject: Update documentation of instance_create() script command * Fix some typos. * Add a paragraph about owner types and the corresponding owner ID to use. * Remove nonexistent return value -3 from example. --- doc/script_commands.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 2fc6a95e5..db37ef284 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -9664,13 +9664,19 @@ For examples of usage, see /doc/sample/npc_rodex.txt //===================================== --------------------------------------- -*instance_create("", {, }) +*instance_create("", {, }) -Create an instance using the name "" for the of -owner_type (when not provided, defaults to IOT_PARTY). Most instance_* +Creates an instance using the name "" for the of + (when not provided, defaults to IOT_PARTY). Most instance_* commands are used in conjunction with this command and depend on the ID this command returns. +Valid values: +- IOT_NONE (0) - can be any arbitrary number. +- IOT_CHAR (1) - is account ID. +- IOT_PARTY (2) - is party ID. +- IOT_GUILD (3) - is guild ID. + Example: // Store the Party ID of the invoking character. .@party_id = getcharid(CHAR_ID_PARTY); @@ -9681,11 +9687,9 @@ Example: // ... } else if (.@id == -2) { // Invalid Party ID // ... - } else if (.@id == -3) { // No free instances (MAX_INSTANCE exceeded) - // ... } else if (.@id == -4) { // Already exists // ... - } else (.@id < 0) { // Unspecified error while queuing instance. + } else if (.@id < 0) { // Unspecified error while queuing instance. // ... } -- cgit v1.2.3-70-g09d2