function onUse(cid, creature, player, item, fromPosition, target, toPosition, isHotkey)
CleamAreaXY()
end
function CleamAreaXY()
local ItensIDS = {1987, 18390, 2420, 2253, 3058, 3059, 3060, 1988, 2269, 2308, 2273, 2262, 7620, 2293, 2261, 2304, 2268, 2278, 8890, 2195, 2579, 2169, 2197}
local p = {from = {x = 1252, y = 1002, z = 4}, to = {x = 1254, y = 1004, z = 4}}
function isCleanAbleArea(pos)
pos.stackpos = 0
local tile = getThingfromPos(pos, false)
if tile ~= 0 and not hasProperty(tile.uid, CONST_PROP_BLOCKSOLID) and not isCreature(getTopCreature(pos).uid) then
return true end end
for x = p.from.x, p.to.x do
for y = p.from.y, p.to.y do
for z = p.from.z, p.to.z do
for c = 0, 7 do
local c = {x = x, y = y, z = c}
if isCleanAbleArea(c) then
local itens = Tile(c):getItems()
for slot = 1, #itens do
for lista = 1, #ItensIDS do
if itens[slot]:getId() == ItensIDS[lista] then itens[slot]:remove() end
end
end
end
end
end
end
end
end