This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
remove_item [2018/03/16 09:47] – justin | remove_item [2023/04/26 12:22] (current) – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | Removes the specified item from the player' | + | Removes |
====Signature: | ====Signature: | ||
<code python> | <code python> | ||
- | remove_item(item_name) | + | remove_item(item_id, count, *character) |
</ | </ | ||
^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
- | |item_name|Name of the item to remove | + | |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| | ||
+ | |character|[[Character]] the [[item]] will be taken from (defaults to main [[player character]]).|[[Entity]]|No| | ||
+ | |||
+ | ^Return Value^Description^Type^ | ||
+ | |Number Removed|Returns the actual number of [[item|items]] that were removed from the player' | ||
====Example: | ====Example: | ||
- | < | + | < |
- | remove_item(" | + | remove_item(" |
</ | </ | ||
- | // | + | // |
<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. |
</ | </ | ||