Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Self.Dequip(itemid, slot, container)
- itemid = Item.GetItemIDFromDualInput(itemid)
- if (not table.contains(EQUIPMENT_SLOTS, slot)) then
- error(slot .. "' is not a valid slot.")
- return false
- end
- container = container or Container.GetFirst()
- if (type(container) == 'number') then
- container = Container.New(container)
- end
- if (container:isOpen()) then
- if (container:ItemCount() == container:Capacity()) then
- return false
- end
- slotMoveItemToContainer(slot, container._index, container:Capacity() - 1)
- else
- return false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement