local pos = {
{x = 100, y = 200, z = 7},
{x = 200, y = 300, z = 7},
{x = 300, y = 400, z = 7}
}
local newPosition = {x = 100, y = 200, z = 7}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local success
for _, items in ipairs(pos) do
local it = getTileItemById(items, item).uid
if it > 0 then
doRemoveItem(it)
success = true
end
end
if success then
doCreateItem(1000, 1,newPosition)
end
return true
end