WoW:API UseInventoryItem: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
Line 13: Line 13:


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.
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.
[[Category:API Functions|UseInventoryItem]]
[[Category:API Inventory Functions|UseInventoryItem]]

Revision as of 18:28, 29 August 2005

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)

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.