diff options
author | Haru <haru@dotalux.com> | 2017-11-18 20:05:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-18 20:05:20 +0100 |
commit | 7b2f685d9fa8a2998b424c003d7a1386f76d45db (patch) | |
tree | a5f118370396e8168c5aa84b4fb105951157d35c /doc/script_commands.txt | |
parent | a63c82c8bd29fd829a5d8cfba7d02d11cf4634c5 (diff) | |
parent | 42248822bf5348c7cbf33efbdf12873bea11ff38 (diff) | |
download | hercules-7b2f685d9fa8a2998b424c003d7a1386f76d45db.tar.gz hercules-7b2f685d9fa8a2998b424c003d7a1386f76d45db.tar.bz2 hercules-7b2f685d9fa8a2998b424c003d7a1386f76d45db.tar.xz hercules-7b2f685d9fa8a2998b424c003d7a1386f76d45db.zip |
Merge pull request #1902 from MishimaHaruna/getiteminfo-fix
getiteminfo() / setiteminfo() fixes
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r-- | doc/script_commands.txt | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 940302982..465804061 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3176,23 +3176,43 @@ Example: --------------------------------------- *getiteminfo(<item ID>, <type>) +*setiteminfo(<item ID>, <type>, <value>) This function will look up the item with the specified ID number in the database and return the info set by TYPE argument. It will return -1 if there is no such item. Valid types are: - 0 - Buy Price; 1 - Sell Price; 2 - Item Type; - 3 - maxchance (Max drop chance of this item e.g. 1 = 0.01% , etc.. + + ITEMINFO_BUYPRICE - Buy Price + ITEMINFO_SELLPRICE - Sell Price + ITEMINFO_TYPE - Item Type + ITEMINFO_MAXCHANCE - Max drop chance of this item e.g. 1 = 0.01% , etc.. if = 0, then monsters don't drop it at all (rare or a quest item) if = 10000, then this item is sold in NPC shops only - 4 - sex; 5 - equip; 6 - weight; 7 - atk; 8 - def; 9 - range; - 10 - slot; 11 - subtype; 12 - elv; 13 - wlv; 14 - view id - - If RENEWAL is defined, 15 - matk + ITEMINFO_SEX - Sex + ITEMINFO_LOC - Equip location + ITEMINFO_WEIGHT - Weight (note: 1/10 of unit) + ITEMINFO_ATK - Attack + ITEMINFO_DEF - Defense + ITEMINFO_RANGE - Range + ITEMINFO_SLOTS - Slots + ITEMINFO_SUBTYPE - Item subtype + ITEMINFO_ELV - Equip min. level + ITEMINFO_WLV - Weapon level + ITEMINFO_VIEWID - View ID ("Sprite" field in the Item DB) + ITEMINFO_MATK - MATK (only relevant if RENEWAL is set) + ITEMINFO_VIEWSPRITE - View Sprite ("ViewSprite" field in the Item DB) Check sample in doc/sample/getiteminfo.txt +The setiteminfo function will, instead, set the item's parameters. It returns +the new value on success, or -1 on failure (item_id not found). + +Example: + + setiteminfo(Stone, ITEMINFO_WEIGHT, 9990); // Stone now weighs 999.0 + --------------------------------------- *getequipisenableopt(<equipment slot>) @@ -8296,26 +8316,6 @@ Example: --------------------------------------- -*setiteminfo(<item id>, <type>, <value>) - -This function will set some value of an item. -Returns the new value on success, or -1 on fail (item_id not found or -invalid type). - -Valid types are: - 0 - Buy Price; 1 - Sell Price; 2 - Item Type; - 3 - maxchance (Max drop chance of this item e.g. 1 = 0.01% , etc.. - if = 0, then monsters don't drop it at all (rare or a quest item) - if = 10000, then this item is sold in NPC shops only - 4 - sex; 5 - equip; 6 - weight; 7 - atk; 8 - def; 9 - range; - 10 - slot; 11 - subtype; 12 - elv; 13 - wlv; 14 - view id - -Example: - -setiteminfo Stone, 6, 9990; // Stone now weighs 999.0 - ---------------------------------------- - *setitemscript(<item id>, <"{ new item script }">{, <type>}) Set a new script bonus to the Item. Very useful for game events. |