esto data actions/scripts crea cualquier archivo y pega esto dentro
- Código:
local pos = {from = {x=717, y=898, z=10}, to = {x=726, y=908, z=10}} -- for each room
function onUse(cid, item, fromPosition, itemEx, toPosition)
doAreaClean(pos.from, pos.to)
doRemoveItem(item.uid, 1)
return true
end
- Código:
<action itemid="xxxxx" event="script" value="nose.lua"/>
xxxx item que usara para hacer clean en cierta area
agrega esto a tus data/lib en el archivo 0-50 functions
[code]
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
function doAreaClean(frompos, topos)
for x = frompos.x, topos.x do
for y = frompos.y, topos.y do
for z = frompos.z, topos.z do
local p = {x=x,y=y,z=z}
if isCleanAbleArea(p) or created_by_otswe == true then
doCleanTile(p,false)
end
end
end
end
end
[code]