From 105ebf13243ec5607273690f634e7fc1608a447d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 11 Apr 2017 19:01:03 +0300 Subject: Update to latest hercules. --- server/items/item_db.txt | 1 + server/scripts/constants.md | 25 ++++++++++++ server/scripts/script_commands.txt | 78 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+) (limited to 'server') diff --git a/server/items/item_db.txt b/server/items/item_db.txt index 2b0d860..19ed126 100644 --- a/server/items/item_db.txt +++ b/server/items/item_db.txt @@ -33,6 +33,7 @@ item_db: ( EquipLv: Equip required level (int, defaults to 0) EquipLv: [min, max] (alternative syntax with min / max level) Refine: Refineable (boolean, defaults to true) + DisableOptions: true/false (boolean, defaults to false !!for equipments only!!) [Smokexyz] View: View ID (int, defaults to 0) BindOnEquip: true/false (boolean, defaults to false) ForceSerial: true/false (boolean, defaults to false) diff --git a/server/scripts/constants.md b/server/scripts/constants.md index 22d2854..c666512 100644 --- a/server/scripts/constants.md +++ b/server/scripts/constants.md @@ -3799,6 +3799,16 @@ - `EQP_SHADOW_ACC_R`: 1048576 - `EQP_SHADOW_ACC_L`: 2097152 +### Item Option Types + +- `IT_OPT_INDEX`: 0 +- `IT_OPT_VALUE`: 1 +- `IT_OPT_PARAM`: 2 + +### Maximum Item Options + +- `MAX_ITEM_OPTIONS`: 5 + ### Navigation constants, use with *navigateto* - `NAV_NONE`: 0 @@ -3810,6 +3820,21 @@ - `NAV_KAFRA_AND_SCROLL`: 110 - `NAV_ALL`: 111 +### BL types + +- `BL_PC`: 1 +- `BL_MOB`: 2 +- `BL_PET`: 4 +- `BL_HOM`: 8 +- `BL_MER`: 16 +- `BL_ITEM`: 32 +- `BL_SKILL`: 64 +- `BL_NPC`: 128 +- `BL_CHAT`: 256 +- `BL_ELEM`: 512 +- `BL_CHAR`: 539 +- `BL_ALL`: 4095 + ### Renewal - `RENEWAL`: 1 diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt index 581ec18..e7a8d77 100644 --- a/server/scripts/script_commands.txt +++ b/server/scripts/script_commands.txt @@ -3162,6 +3162,50 @@ Check sample in doc/sample/getiteminfo.txt --------------------------------------- +*getequipisenableopt() + +This function checks if the equipped item allows the use of bonus options. + +Returns 1 if allowed, 0 if not. + +--------------------------------------- + +*getequippedoptioninfo(); + +This function is to be used with the scripts of contents listed in +db/item_options.conf only. + +Returns the value of the current equipment being parsed. +If the equip was not found or the type is invalid, -1 is returned. + +--------------------------------------- + +*getequipoptioninfo(,,); + +Gets the option information of an equipment. + + For a list of equipment indexes see getequipid(). + can range from 1 to MAX_ITEM_OPTIONS + can be IT_OPT_INDEX (the ID of the option bonus, @see "Id" or "Name" in db/item_options.conf) + or IT_OPT_VALUE (the value of the bonus script of the equipment, @see "Script" in db_item_options.conf). + +returns the value of the slot if exists or -1 for invalid slot, type or slots. + +--------------------------------------- + +*setequipoption(,,,); + +Set an equipment's option index or value for the specified option slot. + + For a list of equipment indexes see getequipid(). + can range from 1 to MAX_ITEM_OPTIONS + can be IT_OPT_INDEX (the ID of the option bonus, @see "Id" or "Name" in db/item_options.conf) + The value of the type to be set. + +returns 0 if value couldn't be set, 1 on success. + +--------------------------------------- + *getequipcardid(, ) Returns value for equipped item slot in the indicated slot (0, 1, 2, or 3). @@ -3229,6 +3273,40 @@ Notice that NPC objects disabled with disablenpc() will still be located. --------------------------------------- +*getunits(, , , ""{, , , , }) + +This function searches a whole map or area for units and adds their GID to +the provided array. It filters units by and stops searching +after units have been found. Set to false (0) if you wish to +disable the limit altogether. + +Type is the type of unit to search for: + + BL_PC - Character object + BL_MOB - Monster object + BL_PET - Pet object + BL_HOM - Homunculus object + BL_MER - Mercenary object + BL_IEM - Item object (item drops) + BL_SKILL - Skill object (skill fx & sfx) + BL_NPC - NPC object + BL_CHAT - Chat object + BL_ELEM - Elemental object + BL_CHAR - Shorthand for (BL_PC|BL_MOB|BL_HOM|BL_MER|BL_ELEM) + BL_ALL - Any kind of object + +** Do NOT use UNITTYPE_ constants here, they have different values. + +Example: + + .@count = getunits((BL_PC | BL_NPC), .@units, false, "prontera"); + +The above example would search the map "prontera" for all PC and NPC units and +add them to the .@units array, while setting .@count to the amount of units +added to the array (useful in for() loops). + +--------------------------------------- + *getgmlevel() This function will return the (GM) level of player group the account to -- cgit v1.2.3-60-g2f50