Editing AddItem
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
|CSWikiPage = AddItem | |CSWikiPage = AddItem | ||
|origin = GECK1 | |||
|summary = Adds Count items of object ObjectID to the calling container's inventory. It has two required parameters (the object to add and the quantity) and one optional parameter (whether to display a message on screen). | |||
|referenceType = <nowiki>ActorID|ContainerID</nowiki> | |||
|arguments = {{FunctionArgument | |||
|Name = ObjectID | |Name = ObjectID | ||
|Type = ref | |Type = ref | ||
Line 16: | Line 15: | ||
|Optional = y | |Optional = y | ||
}} | }} | ||
}} | |||
==Examples== | |||
buddyref.additem Stimpack 11 | |||
Adds 11 stimpacks to Buddy's inventory | Adds 11 stimpacks to Buddy's inventory | ||
player.additem SuperStimpak 10 | player.additem SuperStimpak 10 | ||
Line 22: | Line 23: | ||
player.additem SuperStimpak 10 1 | player.additem SuperStimpak 10 1 | ||
Adds 10 super stimpacks to the player's inventory and no message is displayed | Adds 10 super stimpacks to the player's inventory and no message is displayed | ||
==Notes== | ==Notes== | ||
Line 36: | Line 36: | ||
End</pre></li></ul> | End</pre></li></ul> | ||
*Executing [[AddItem]] function on [[NPC]]s will cause them to review their inventory and equip the best armor and weapon they have. If [[NPC]] already has an armor with [[Object Effect]]s equipped adding an item will make them reequip it, not really unequipping it first. As a result [[Object Effect]]s of the armor will stack after each use of the [[AddItem]] function. Unequipping the armor will revert everything back to normal removing all stacked [[Object Effect]]s. | *Executing [[AddItem]] function on [[NPC]]s will cause them to review their inventory and equip the best armor and weapon they have. If [[NPC]] already has an armor with [[Object Effect]]s equipped adding an item will make them reequip it, not really unequipping it first. As a result [[Object Effect]]s of the armor will stack after each use of the [[AddItem]] function. Unequipping the armor will revert everything back to normal removing all stacked [[Object Effect]]s. | ||
==See Also== | ==See Also== |