local starting = {x = 0, y = 0, z = 0} -- edit this to the top left
local ending = {x = 0, y = 0, z = 0} -- edit this to the bottom right
function onUse(cid, item, fromPosition, itemEx, toPosition)
local checking = {x = starting.x, y = starting.y, z = starting.z, stackpos = 253}
local id = {}
while checking.y <= ending.y do
local thing = getThingFromPos(checking, false).uid
if isCreature(thing) then
return false
end
if checking.x == ending.x then
checking.x = starting.x
checking.y = checking.y + 1
end
checking.x = checking.x + 1
end
for _, items in ipairs(id) do
doRemoveItem(items)
end
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end