From f6bca33e1524354a28223f14e45d4765fcb06c92 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 30 May 2013 22:20:57 -0300 Subject: Memory Slasher | May 30 Patch http://hercules.ws/board/topic/928-memory-slasher-may-30-patch/ Signed-off-by: shennetsind --- doc/script_commands.txt | 122 +++++++++++++++++++++++++++++++++--------------- src/map/map.h | 32 ++++++------- 2 files changed, 100 insertions(+), 54 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 5fbf652a4..af3d90262 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -7610,10 +7610,9 @@ This will open a book item at the specified page. ======================== --------------------------------------- -*instance_create("",); +*instance_create("",{,}); -Create an instance using the name "" for the Party of -. +Create an instance using the name "" for the of owner_type (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. @@ -7644,30 +7643,32 @@ Example: *instance_destroy {}; Destroys instance with the ID . If no ID is specified, the -instance the script is attached to is used. If the script is not attached -to an instance, the instance of the currently attached player's party is -used. If no player is currently attached, the command fails and causes the -script to halt. +instance the script is attached to is used. If in the end no instance_id, +is found the command halts the script execution. --------------------------------------- -*instance_attachmap("",{,}); +*instance_attachmap("",{,{,""}}); Attaches the map "" to the instance specified with . The optional parameter specifies, whether a map requires -emulation for instancing (1) or not (0 = default). +emulation for instancing (1) or not (0 = default). if use base name is specified, +and "" too the server will instance the map under the "", +name. Returns the resulting map name on success or an empty string on failure. +Example: + instance_attachmap("prontera", .@instance_id,1,"via"); +^ the above creates a instance (or clone) of prontera, on a map called "via" + --------------------------------------- *instance_detachmap ""{,}; Detach the map "" to the instance with the . If no -ID is specified, the instance the script is attached to is used. If the -script is not attached to an instance, the instance of the currently -attached player's party is used. If no player is currently attached, the -command fails and causes the script to halt. +ID is specified, the instance the script is attached to is used. If in the +end no instance_id is found the command halts the script execution. --------------------------------------- @@ -7681,10 +7682,8 @@ the source maps to the instanced maps. *instance_announce ,"",{,{,{,{,{,}}}}}; Works like announce, but has the parameter. If instance id -is 0, the instance the script is attached to is used. If the script is not -attached to an instance, the instance of the currently attached player's -party is used. If no player is currently attached, the command fails and -causes the script to halt. +is -1, the instance the script is attached to is used. If in the +end no instance_id is found the command halts the script execution. --------------------------------------- @@ -7698,10 +7697,8 @@ Attaches the current script to the instance given by . Retrieves the unique name given to a copy of an NPC given by "" in an instance specified . If no ID is specified, the -instance the script is attached to is used. If the script is not attached -to an instance, the instance of the currently attached player's party is -used. If no player is currently attached, the command fails and causes the -script to halt. +instance the script is attached to is used. If in the end no instance_id, +is found the command halts the script execution. --------------------------------------- @@ -7709,22 +7706,18 @@ script to halt. Checks whether or not the given map belongs to specified instance. If no ID is specified, the instance the script is attached to is used. If the -script is not attached to an instance, the instance of the currently -attached player's party is used. If no player is currently attached, the -command fails and causes the script to halt. +script is not attached to an instance, it'll try to check whether the, +player attached to the script possesses an instance with a map matching +"". If in the end no instance_id is found the command halts the, +script execution. Returns name of the instanced map on success, otherwise an empty string. --------------------------------------- -*instance_id({}); +*instance_id(); -Retrieves the instance id, depending on . If type is not given, it -defaults to 0. - -Type: - 0 - Instance ID the script is attached to. - 1 - Instance ID of the currently attached player's party. +Retrieves the instance id of the script it is being run on. --------------------------------------- @@ -7732,19 +7725,16 @@ Type: Warps all players in the instance to at given coordinates. If no ID is specified, the instance the script is attached to -is used. If the script is not attached to an instance, the instance of the -currently attached player's party is used. If no player is currently -attached, the command fails and causes the script to halt. +is used. If in the end no instance_id is found the command halts the, +script execution. --------------------------------------- *instance_set_timeout ,{,}; Sets the timeout values for an instance given by . If no ID -is specified, the instance the script is attached to is used. If the -script is not attached to an instance, the instance of the currently -attached player's party is used. If no player is currently attached, the -command fails and causes the script to halt. +is specified, the instance the script is attached to is used. If in the end, +no instance_id is found the command halts the script execution. Parameter specifies the total amount of time the instance will exist. Parameter specifies how long players have, when @@ -8080,3 +8070,59 @@ If the character does not have a mercenary, the command returns "" for name and 0 for all other types. ---------------------------------------- + +========================== +|11.- Queue Commands .| +========================== +--------------------------------------- +Queue Author's note: the following sucks, probably breaks formatting, please fix if you're willing to (you may remove this note) +--------------------------------------- +*queue() +creates a new queue instance, returns created queue id + +--------------------------------------- +*queuesize() +returns the amount of entries in queue instance of . + +--------------------------------------- +*queueadd(,) +adds to queue of , returns 1 if is already present in the queue, 0 otherwise. + +--------------------------------------- +*queueremove(,) +removes from queue of , returns 1 if is not present in the queue, 0 otherwise. + +--------------------------------------- +*queueopt(,,{Optional