Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
mNo edit summary
(Also works with itemId and itemLink!)
Line 1: Line 1:
{{wowapi}}
+
{{wowapi}}__NOTOC__
 
Equips an item, optionally into a specified slot.
 
  +
EquipItemByName(itemId or "itemName" or "itemLink"[, slot])
Equips an item by its name, optionally into a specified slot.
 
   
 
== Parameters ==
 
== Parameters ==
 
=== Arguments ===
 
=== Arguments ===
  +
:(itemId or "itemName" or "[[itemLink]]"[, [[inventorySlotId|slot]]])
:;"name" : String - The name of the item, ie "Worn Dagger". Partial names are valid inputs as well, ie "Worn". If several items with same piece of name exists, the first one found will be equipped.
 
  +
:;[[inventorySlotId|slot]] : Numeric - ''(optional)'' - The [[API TYPE InventorySlotID|inventory slot]] to put the item in, obtained via [[API GetInventorySlotInfo|GetInventorySlotInfo]].
 
  +
:;itemId : Integer - The numeric ID of the item. ie. 12345
 
:;itemName : String - The name of the item, ie "Worn Dagger". Partial names are valid inputs as well, ie "Worn". If several items with same piece of name exists, the first one found will be equipped.
  +
:;[[itemLink]] : String - The [[itemLink]], when Shift-Clicking items.
 
:;[[inventorySlotId|slot]] : Numeric - ''(optional)'' - The [[InventorySlotId|inventory slot]] to put the item in, obtained via [[API GetInventorySlotInfo|GetInventorySlotInfo()]].

Revision as of 17:06, 4 June 2008

Equips an item, optionally into a specified slot.

EquipItemByName(itemId or "itemName" or "itemLink"[, slot])

Parameters

Arguments

(itemId or "itemName" or "itemLink"[, slot])
itemId
Integer - The numeric ID of the item. ie. 12345
itemName
String - The name of the item, ie "Worn Dagger". Partial names are valid inputs as well, ie "Worn". If several items with same piece of name exists, the first one found will be equipped.
itemLink
String - The itemLink, when Shift-Clicking items.
slot
Numeric - (optional) - The inventory slot to put the item in, obtained via GetInventorySlotInfo().