Difference between revisions of "RemoveItem"
Jump to navigation
Jump to search
imported>JOG m |
imported>DragoonWraith (get rid of those annoying messages!) |
||
Line 18: | Line 18: | ||
==Notes== | |||
* You can use a [[Variable_types:_reference_variables|reference variable]] as ''ObjectID'' and a [[Variable_types:_shortint|short]] variable for ''count''. | * You can use a [[Variable_types:_reference_variables|reference variable]] as ''ObjectID'' and a [[Variable_types:_shortint|short]] variable for ''count''. | ||
Line 24: | Line 24: | ||
*If ObjectID is a leveled list, the leveled item generated from the leveled list will be removed. | *If ObjectID is a leveled list, the leveled item generated from the leveled list will be removed. | ||
*By default, using this function on the player will display a message informing the player that the item in question has been removed. In many situations, this is very annoying, but you can use a blank [[Message]] call to prevent it from happening, like so: | |||
<pre>Message "" | |||
player.RemoveItem "item ID" 1</pre> | |||
==See Also== | ==See Also== |
Revision as of 05:19, 11 May 2007
Removes count number of the specified item from the calling object's inventory.
Syntax:
RemoveItem ObjectID, count
Examples:
RemoveItem Gold001 50
Ref MyItem Short count set MyItem to ArenaAkaviriLongSword set count to 1 player.removeitem MyItem Count
Notes
- You can use a reference variable as ObjectID and a short variable for count.
- If ObjectID is a leveled list, the leveled item generated from the leveled list will be removed.
- By default, using this function on the player will display a message informing the player that the item in question has been removed. In many situations, this is very annoying, but you can use a blank Message call to prevent it from happening, like so:
Message "" player.RemoveItem "item ID" 1