Modify Item API: Edit Item
Pilus edited this page Aug 11, 2015
·
1 revision
obj.AddSimpleAction(action)
- action
- ''Table''
- A table containing the action data.
obj.IncreaseVersion() =## Notes= '''Call this when done editing an item within a script to increase the version as a normal edit would.'''
obj.RemoveSimpleAction(index)
- index
- ''Number''
- The index number of the simple action you want to remove.
obj.Save()
- destGuid
- ''String''
- The GUID of the bag you wish to create the item in. If blank it will create it in the main backpack.
obj.SetComment(comment)
- comment
- ''String''
- The Yellow text line of the item.
obj.SetConsumed(consumed)
- consumed
- ''Boolean''
- Flags the item to be consumed on use. If not set it defaults to false.
obj.SetCooldown(secs)
- secs
- ''Number''
- The time, in seconds, that is the length of the cooldown. If not set it defaults to 1.
obj.SetCopyable(copyable)
- copyable
- ''Boolean''
- Flags the item to be able to be copied by anyone. Defaults to false.
obj.SetEditable(editable)
- editable
- ''Booleans''
- Flags the item to be edited by anyone. Defaults to false.
obj.SetIcon(iconPath)
- iconPath
- ''String''
- The icon path for the item. Make sure to use double \ when manually entering the path.
obj.SetLastCastTime(time)
- 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]
obj.SetName (name)
- name
- ''String''
- The name if the item.
obj.SetQuality(quality)
- quality
- ''Number''
- From 0 to 6. 0 being Grey items, 6 being Heirloom
obj.SetStackSize (size)
- size
- ''Number''
- The number you wish the item to stack to.
obj.SetUseText(useText)
- useText
- ''String''
- The Green on use text of the item.
obj.SetWhite1(white1)
- white1
- ''String''
- The first line of white text of the item.
obj.SetWhite2(white2)
- white2
- ''String''
- The second line of white text of the item.