Supported In: | ||
---|---|---|
C | D/S/W | W-CD |
? | ? | ? |
The scripting command GiveEnchanted has the opcode (0x2C).
Arguments
- Byte - Item Type
- Byte - Base Enchantment
- Byte - Extra Enchantment
- Byte - ???
Description
Gives an item with an enchantment. Misc items have only a base enchantment, such as "of Cold Ray" or "of Antidote". Equipable items use the base enchantment as their material, such as "wood" or "obsidian", while the extra enchantment is the actual bonus applied to it, such as "Golem Slaying". Purpose of the fourth byte has not yet been determined.
Notes
Gives the item to the first character, if there's room. If there's no room, then it moves on to the second, and so on, until inventory is full. Unlike TakeOrGive, this does not appear to exit if the give failed because of no room, simply returns and continues operation.
If the item is a misc item (item type 0x3C and up, but less than 0x52) then it will be added with a random number from 1 to 8 charges, except for potions (item 46) and scrolls (item 47) which have a charge of 1.
TODO: What is the last byte for? Also flesh out all the items and enchantments. Possibly to their own page.
Event Opcodes
| ||||||||||
|