Stack.SetAttribute

Pilus edited this page Aug 11, 2015 · 1 revision
Clone this wiki locally

Syntax:

stack.SetAttribute(attributeName, value, itemInstanceIndex)

'''Note:''' This should be used with an attribute defined in the item interface.

Arguments:

stack.SetAttribute() has 2 required arguments and 1 optional argument

attributeName
''String''
The number you wish to increase the instance stack by.
value
''Any''
The contents of the attribute.
itemInstanceIndex
''number''
The number item instance.

Example:

local strRate = UnitStat("player", 1)

stack.SetAttribute("str", strRate)

print("Strength: "..strRate)