Djinni Wiki
Advertisement

function CopyItem (object oItem, object oTargetInventory=OBJECT_INVALID)

duplicates the item and returns a new object

  • oItem: - item to copy
  • oTargetInventory: - create item in this object's inventory. If this parameter is not valid, the item will be created in oItem's location
  • returns the new item
  • returns OBJECT_INVALID for non-items.
  • can only copy empty item containers. will return OBJECT_INVALID if oItem contains other items.
  • if it is possible to merge this item with any others in the target location, then it will do so and return the merged object.
  • Return type: object
  • Include file: nwscriptdefn
Advertisement