You are viewing an old version of this page. Return to the latest version.
Version of 17:11, 7 May 2013 by I need to Update My Profile
No categories assigned
LUA:RemoveItem
- Last edited 9 years ago by I need to Update My Profile
Removes 1 of an item from a target, and returns a true or false if successful or not.
Syntax
RemoveItem(target, item_id)
Usage
function Deleted(Quest, QuestGiver, Player)
if HasItem(Player, 46842) then
if RemoveItem(46842) == true then
Say(Player, "item removed")
end
end
end
This will delete an item with the id of 46842 from a player if they have that item, when a quest with this function is deleted, and have the player say "item removed" if the item was removed correctly.