diff options
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r-- | doc/script_commands.txt | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 940302982..c8496d227 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 + 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) If RENEWAL is defined, 15 - matk 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. |