Você precisa configurar os ID's dos tile e as coordenadas...
function getMonstersInArea(area)
local monsters = {}
for x = area.fromx, area.tox do
for y = area.fromy, area.toy do
for z = area.fromz, area.toz do
monsterpos = {x=x,y=y,z=z,stackpos=253}
monster = getThingFromPos(monsterpos)
if isMonster(monster.uid) == true then
table.insert(monsters, monster.uid)
end
end
end
end
return monsters
end
function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then return false end
local positions = {
[TILE_ID_1] = {fromx = ..., fromy = ..., fromz = ..., tox = ..., toy = ..., toz = ...},
[TILE_ID_2] = {fromx = ..., fromy = ..., fromz = ..., tox = ..., toy = ..., toz = ...}
}
local monsters = getMonstersInArea(positions[item.itemid])
if #monsters > 0 then
for i, #monsters do
doRemoveCreature(monsters[i])
end
end
return true
end






info
Grupo: Conde
Registrado: 18/07/08
Posts: 545
Reputação: +21
Char no Tibia: Nem eu sei
Checar se tem algum monstro nesta área
local fromPos,toPos = {x=1586,y=1761,z=12},{x=1598,y=1773,z=12}
local fromPos2,toPos2 = {x=1323,y=721,z=6},{x=1333,y=725,z=6}
caso tenha, ele sera removido
obs: é um movement, o player pisa no sqm e é teleportado para uma arena, caso tenha monstro na arena ele tem que ser removido na hora que o player pisar no tile
Editado Novembro 4 por roriscrave