diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-11 19:01:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-11 19:01:03 +0300 |
commit | 105ebf13243ec5607273690f634e7fc1608a447d (patch) | |
tree | 828e0c14311e89ebc076f1fb43d11cae211e53bb /server/scripts/script_commands.txt | |
parent | 64cb36f312f82196ce0e601bc8c87851ed9a42f5 (diff) | |
download | docs-105ebf13243ec5607273690f634e7fc1608a447d.tar.gz docs-105ebf13243ec5607273690f634e7fc1608a447d.tar.bz2 docs-105ebf13243ec5607273690f634e7fc1608a447d.tar.xz docs-105ebf13243ec5607273690f634e7fc1608a447d.zip |
Update to latest hercules.
Diffstat (limited to 'server/scripts/script_commands.txt')
-rw-r--r-- | server/scripts/script_commands.txt | 78 |
1 files changed, 78 insertions, 0 deletions
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(<equipment slot>) + +This function checks if the equipped item allows the use of bonus options. + +Returns 1 if allowed, 0 if not. + +--------------------------------------- + +*getequippedoptioninfo(<info_type>); + +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(<equip_index>,<slot>,<type>); + +Gets the option information of an equipment. + +<equipment_index> For a list of equipment indexes see getequipid(). +<option_slot> can range from 1 to MAX_ITEM_OPTIONS +<type> 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(<equip_index>,<slot>,<opt_index>,<value>); + +Set an equipment's option index or value for the specified option slot. + +<equipment_index> For a list of equipment indexes see getequipid(). +<option_slot> can range from 1 to MAX_ITEM_OPTIONS +<type> can be IT_OPT_INDEX (the ID of the option bonus, @see "Id" or "Name" in db/item_options.conf) +<value> The value of the type to be set. + +returns 0 if value couldn't be set, 1 on success. + +--------------------------------------- + *getequipcardid(<equipment slot>, <card slot>) 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(<type>, <variable>, <limit>, "<map>"{, <x1>, <y1>, <x2>, <y2>}) + +This function searches a whole map or area for units and adds their GID to +the provided <variable> array. It filters units by <type> and stops searching +after <limit> units have been found. Set <limit> 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 |