Ris48198@legacy41567693 (talk | contribs) No edit summary |
Hobinbot@legacy41545296 (talk | contribs) (upgraded deprecated template) |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{wowapi}} |
||
Use an item in a specific inventory slot. |
Use an item in a specific inventory slot. |
||
Line 7: | Line 8: | ||
:;slotID :The inventory slot ID |
:;slotID :The inventory slot ID |
||
− | :You can get the slot ID by using [[API GetInventorySlotInfo|GetInventorySlotInfo(slot)]] |
+ | :You can get the [[API TYPE InventorySlotID|slot ID]] by using [[API GetInventorySlotInfo|GetInventorySlotInfo(slot)]] |
+ | |||
+ | === Return Value === |
||
+ | Always nil. |
||
=== Example=== |
=== Example=== |
||
:/script UseInventoryItem( GetInventorySlotInfo("Trinket0Slot") ); |
:/script UseInventoryItem( GetInventorySlotInfo("Trinket0Slot") ); |
||
+ | |||
+ | After patch 1.6 you cant auto-use items anymore. Addons can no longer activate items without the press of a button. In order to use UseInventoryItem( GetInventorySlotInfo("Trinket0Slot") ) you will have to call it from a button, keypress or icon as you do with spells. |
Revision as of 18:08, 6 January 2007
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Use an item in a specific inventory slot.
Syntax
UseInventoryItem( slotID );
Arguments
- slotID
- The inventory slot ID
- You can get the slot ID by using GetInventorySlotInfo(slot)
Return Value
Always nil.
Example
- /script UseInventoryItem( GetInventorySlotInfo("Trinket0Slot") );
After patch 1.6 you cant auto-use items anymore. Addons can no longer activate items without the press of a button. In order to use UseInventoryItem( GetInventorySlotInfo("Trinket0Slot") ) you will have to call it from a button, keypress or icon as you do with spells.