diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-04-08 19:52:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-04-08 19:52:55 +0300 |
commit | 2fa40bf20f63ef7c65f5ff104a8f7c851285ccef (patch) | |
tree | da8390dc048274b70fc5f428aadcb99df77fc67c /server | |
parent | 8902e53ea350e3418dbdc8b73a76df0f5c91273d (diff) | |
download | docs-2fa40bf20f63ef7c65f5ff104a8f7c851285ccef.tar.gz docs-2fa40bf20f63ef7c65f5ff104a8f7c851285ccef.tar.bz2 docs-2fa40bf20f63ef7c65f5ff104a8f7c851285ccef.tar.xz docs-2fa40bf20f63ef7c65f5ff104a8f7c851285ccef.zip |
Update from hercules
Updated constants and script commands.
Diffstat (limited to 'server')
-rw-r--r-- | server/scripts/constants.md | 29 | ||||
-rw-r--r-- | server/scripts/script_commands.txt | 53 |
2 files changed, 58 insertions, 24 deletions
diff --git a/server/scripts/constants.md b/server/scripts/constants.md index 9225ce9..aedb175 100644 --- a/server/scripts/constants.md +++ b/server/scripts/constants.md @@ -1407,13 +1407,13 @@ - `e_panic`: 79 - `e_whisp`: 80 -### petstat +### petstat - deprecated, use *getpetinfo -- `PET_CLASS`: 1 -- `PET_NAME`: 2 -- `PET_LEVEL`: 3 -- `PET_HUNGRY`: 4 -- `PET_INTIMATE`: 5 +- `PET_CLASS`: 1 **(DEPRECATED)** +- `PET_NAME`: 2 **(DEPRECATED)** +- `PET_LEVEL`: 3 **(DEPRECATED)** +- `PET_HUNGRY`: 4 **(DEPRECATED)** +- `PET_INTIMATE`: 5 **(DEPRECATED)** ### getmonsterinfo @@ -3989,6 +3989,7 @@ - `MAX_BG_MEMBERS`: 30 - `MAX_CHAT_USERS`: 20 - `MAX_REFINE`: 20 +- `MAX_ITEM_ID`: 65535 - `MAX_MENU_OPTIONS`: 255 - `MAX_MENU_LENGTH`: 2048 - `MOB_CLONE_START`: 4001 @@ -4294,6 +4295,22 @@ - `MERCINFO_LEVEL`: 7 - `MERCINFO_GID`: 8 +### getpetinfo options + +- `PETINFO_ID`: 0 +- `PETINFO_CLASS`: 1 +- `PETINFO_NAME`: 2 +- `PETINFO_INTIMACY`: 3 +- `PETINFO_HUNGRY`: 4 +- `PETINFO_RENAME`: 5 +- `PETINFO_GID`: 6 +- `PETINFO_EGGITEM`: 7 +- `PETINFO_FOODITEM`: 8 +- `PETINFO_ACCESSORYITEM`: 9 +- `PETINFO_ACCESSORYFLAG`: 10 +- `PETINFO_EVO_EGGID`: 11 +- `PETINFO_AUTOFEED`: 12 + ### monster skill states - `MSS_ANY`: -1 diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt index 19f189f..b53dda2 100644 --- a/server/scripts/script_commands.txt +++ b/server/scripts/script_commands.txt @@ -716,6 +716,7 @@ MAX_BANK_ZENY - Maximum Zeny in the bank MAX_BG_MEMBERS - Maximum BattleGround members MAX_CHAT_USERS - Maximum Chat users MAX_REFINE - Maximum Refine level +MAX_ITEM_ID - Maximum Item ID MAX_MENU_OPTIONS - Maximum NPC menu options MAX_MENU_LENGTH - Maximum NPC menu string length MOB_CLONE_START - Clone ID start from this range @@ -3115,6 +3116,7 @@ invoking character has in its inventory, including all the data needed to recreate these items perfectly if they are destroyed. Here's what you get: @inventorylist_id[] - array of item ids. +@inventorylist_idx[] - array of item inventory index. @inventorylist_amount[] - their corresponding item amounts. @inventorylist_equip[] - will return the slot the item is equipped on, if at all. @inventorylist_refine[] - for how much it is refined. @@ -3531,20 +3533,21 @@ Examples : --------------------------------------- -*gettimestr(<format string>, <max length>) +*gettimestr(<format string>, <max length>{, <timestamp>}) This function will return a string containing time data as specified by the format string. -This uses the C function 'strfmtime', which obeys special format +This uses the C function 'strftime', which obeys special format characters. For a full description see, for example, the description of -'strfmtime' at http://www.delorie.com/gnu/docs/glibc/libc_437.html +'strftime' at http://www.delorie.com/gnu/docs/glibc/libc_437.html All the format characters given in there should properly work. Max length is the maximum length of a time string to generate. The example given in Hercules sample scripts works like this: mes(gettimestr("%Y-%m/%d %H:%M:%S", 21)); + mes(gettimestr("%Y-%m/%d %H:%M:%S", 21, getcalendartime(0, 0))); This will print a full date and time like 'YYYY-MM/DD HH:MM:SS'. @@ -3833,26 +3836,34 @@ how many skills a character has. *getpetinfo(<type>) -This function will return pet information for the pet the invoking -character currently has active. Valid types are: +This command will return the currently active pet information of the invoking character. +These fields are associate in 'db/(pre-)re/pet_db.conf'. Valid types are: - 0 - Unique pet ID number as stored by the char server and distinguishing - it from all other pets the characters actually have. This value is - currently useless, at most you can use it to tell pets apart reliably. - 1 - Pet class number as per 'db/pet_db.txt' - will tell you what kind of - a pet it is. - 2 - Pet name. Will return "null" if there's no pet. - 3 - Pet friendly level (intimacy score). 1000 is full loyalty. - 4 - Pet hungry level. 100 is completely full. - 5 - Pet rename flag. 0 means this pet has not been named yet. - -If the invoking player doesn't own a pet, this command will return -"null" for type 2, and return 0 for other types. + PETINFO_ID - Pet Database ID, stored in `pet` table to distinguish from other pets. + PETINFO_CLASS - Pet class ID. (Id field) + PETINFO_NAME - Pet Name, return "null" if there's no active pet. + PETINFO_INTIMACY - Pet Intimacy level. 1000 is full loyalty. + PETINFO_HUNGRY - Pet hungry level. 100 is completely full. + PETINFO_RENAME - Pet rename flag. 0 means this pet has not been named yet. + PETINFO_GID - Pet Game ID + PETINFO_EGGITEM - Pet EggItem + PETINFO_FOODITEM - Pet FoodItem + PETINFO_ACCESSORYITEM - Pet AccessoryItem + PETINFO_ACCESSORYFLAG - return 1 if the pet currently equipping accessory, return 0 otherwise. + PETINFO_EVO_EGGID - Pet Evolve EggID + PETINFO_AUTOFEED - Pet AutoFeed flag. + +If the invoking player doesn't own a pet, this command will +return "null" for type PETINFO_NAME, and return 0 for other types. --------------------------------------- *petstat(<flag>) + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + @ /!\ This command is deprecated @ + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + Returns current pet status, all are integers except name. Returns 0 or "" if the player doesn't have pets. @@ -3866,6 +3877,9 @@ PET_INTIMATE Example: .@i = petstat(PET_CLASS); +This command is deprecated and it should not be used in new scripts, as it is +likely to be removed at a later time. Please use 'getpetinfo' instead. + --------------------------------------- *getmonsterinfo(<mob ID>, <type>) @@ -4443,11 +4457,14 @@ if <color> field is left out. --------------------------------------- -*showscript("<message>"{, <GID>}) +*showscript("<message>"{, <GID>{, <send_target>}}) Makes the attached player or GID, display a message similiar to a chat, this will be seen by everyone near the invoking character but will not be displayed in the chat window. +send_target: (optional) + AREA: show the message to everyone within the view range (default) + SELF: show the message to the given unit GID only --------------------------------------- |