Skip to content

Modify Item API: Edit Item

Pilus edited this page Aug 11, 2015 · 1 revision

.AddSimpleAction

Syntax

obj.AddSimpleAction(action)

Arguments

action
''Table''
A table containing the action data.

.IncreaseVersion

Syntax

obj.IncreaseVersion() =## Notes= '''Call this when done editing an item within a script to increase the version as a normal edit would.'''

.RemoveSimpleAction

Syntax

obj.RemoveSimpleAction(index)

Arguments

index
''Number''
The index number of the simple action you want to remove.

.Save

Syntax

obj.Save()

Arguments

destGuid
''String''
The GUID of the bag you wish to create the item in. If blank it will create it in the main backpack.
=## Notes= '''This function is called after all other functions and you are ready for a script created item to appear in the backpack'''

.SetComment

Syntax

obj.SetComment(comment)

Arguments

comment
''String''
The Yellow text line of the item.

.SetConsumed

Syntax

obj.SetConsumed(consumed)

Arguments

consumed
''Boolean''
Flags the item to be consumed on use. If not set it defaults to false.

.SetCooldown

Syntax

obj.SetCooldown(secs)

Arguments

secs
''Number''
The time, in seconds, that is the length of the cooldown. If not set it defaults to 1.

.SetCopyable

Syntax

obj.SetCopyable(copyable)

Arguments

copyable
''Boolean''
Flags the item to be able to be copied by anyone. Defaults to false.

.SetEditable

Syntax

obj.SetEditable(editable)

Arguments

editable
''Booleans''
Flags the item to be edited by anyone. Defaults to false.

.SetIcon

Syntax

obj.SetIcon(iconPath)

Arguments

iconPath
''String''
The icon path for the item. Make sure to use double \ when manually entering the path.

.SetLastCastTime

Syntax

obj.SetLastCastTime(time)

Arguments

time
''Number''
The time you wish to set for the previous cast time of the item. Enter manually, or use an in game function to find the time.[http://wowprogramming.com/docs/api/time][http://wowprogramming.com/docs/api/GetTime]

.SetName

Syntax

obj.SetName (name)

Arguments

name
''String''
The name if the item.

.SetQuality

Syntax

obj.SetQuality(quality)

Arguments

quality
''Number''
From 0 to 6. 0 being Grey items, 6 being Heirloom

.SetStackSize

Syntax

obj.SetStackSize (size)

Arguments

size
''Number''
The number you wish the item to stack to.
### Notes '''Setting this while creating an item will create copies equal to the stack size.'''

.SetUseText

Syntax

obj.SetUseText(useText)

Arguments

useText
''String''
The Green on use text of the item.

.SetWhite1

Syntax

obj.SetWhite1(white1)

Arguments

white1
''String''
The first line of white text of the item.

.SetWhite2

Syntax

obj.SetWhite2(white2)

Arguments

white2
''String''
The second line of white text of the item.
Clone this wiki locally