dervin13
Active Member
- Joined
- Apr 26, 2008
- Messages
- 458
- Solutions
- 1
- Reaction score
- 28
I get this script in another place and trying to make it work in globalevent, but already chance to function onThink(interval) but not happens...
Can anyone help? It's to clean a specific area thanks
Can anyone help? It's to clean a specific area thanks
Code:
function cleanmap()
local configClean = {
Map = {
LS = {x = 550, y = 441, z = 7}, -- LIMIT NORT WEST
LI = {x = 720, y = 346, z = 7}, -- LIMIT SUL EAST
},
}
local ItensIDS = {2148, 2152} -- IDS FOR REMOVE
for x = configClean.Map.LS.x, configClean.Map.LI.x do
for y = configClean.Map.LS.y, configClean.Map.LI.y do
for z = 1, 6 do
for lista = 1, #ItensIDS do
local tile = Tile(x, y, z)
if tile then
local field = tile:getItemById(ItensIDS[lista])
if field then
field:remove()
end
end
end
end
end
end
end