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

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.