function onDeath(cid, corpse, killer)
local M ={
["rat"] = {Pos = {x=177,y=40,z=7},id= 1058 ,time = 600},
}
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, "The wall will appears in "..x.time.." seconds.", TALKTYPE_ORANGE_1)
addEvent(criar, x.time*1000)
end
end
return TRUE
end