User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
remove_item [2018/03/16 09:47]
remove_item [2020/02/23 22:10] (current)
Line 2: Line 2:
 ---- ----
-Removes the specified item from the player'​s inventory. ​Only one instance is removed if the player has more than one of the item.+Removes ​one or more of the specified ​[[item]] from the player'​s ​[[inventory]]The ID of the [[item]] is case-sensitive and should match the name assigned to it in the [[Item Editor]].
 ====Signature:​==== ====Signature:​====
 <code python> <code python>
-remove_item(item_name)+remove_item(item_id, count)
 </​code>​ </​code>​
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|item_name|Name of the item to remove ​(as defined in the [[Item Editor]]).|[[String]]|Yes|+|item_name|ID of the [[item]] (as defined in the [[Item Editor]]).|[[String]]|Yes
 +|count|How many of the [[item]] to take from the player (defaults to 1).|[[Number]]|No|
 ====Example:​==== ====Example:​====
-<​code ​python+<​code ​bauxite
-remove_item("​Gold Key")+remove_item("​ITEM_0008", 1)
 </​code>​ </​code>​
-//​Results:// ​gold key is removed from the player'​s inventory.+//​Results:// ​One of ITEM_0008 (a gold keyis removed from the player'​s ​[[inventory]].
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Remove Item** function when turning in a quest item for an NPC or opening a container with a key that's only good for one use.+Use the **Remove Item** function when turning in a quest [[item]] for an [[NPC]] or opening a [[item_container|container]] with a key that's only good for one use.
 </​WRAP>​ </​WRAP>​
remove_item.1521218830.txt.gz · Last modified: 2018/03/16 09:47 by justin