This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
remove_item [2020/02/23 21:13] – justin | remove_item [2023/04/26 12:22] (current) – justin | ||
---|---|---|---|
Line 6: | Line 6: | ||
====Signature: | ====Signature: | ||
<code python> | <code python> | ||
- | remove_item(item_id, | + | remove_item(item_id, |
</ | </ | ||
Line 12: | Line 12: | ||
|item_name|ID of the [[item]] (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| | |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: | ||
<code bauxite> | <code bauxite> | ||
- | 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. |
</ | </ | ||