galera alguem de ajuda com esse script.
preciso que 1 desses bicho ao morrer remova 3 paredes, como faço isso ?
function onDeath(cid, corpse, killer)
local M ={
["Guarda"] = {Pos = {x=552,y=77,z=4},id= 9486 ,time = 60},
["Orc"] = {Pos = {x=553, y=77, z=4},id= 9486 ,time = 60},
}
local x = M[getCreatureName(cid)]
function criar()
local parede = getTileItemById(x.Pos, x.id)
doCreateItem(x.id, 1, x.Pos)
end
if x then
local parede = getTileItemById(x.Pos, x.id)
if parede then
doRemoveItem(parede.uid, 1)
doCreatureSay(cid, "A parede Será criada Novamente em "..x.time.." segundos.", TALKTYPE_ORANGE_1)
addEvent(criar, x.time*1000)
end
end
return TRUE
end
está dando esse erro: