function onDeath(cid, corpse, deathList, mostDamageKiller)
local createpos = { x = 571, y = 1009, z = 7}
fromPos = {x = 471, y = 1361, z = 7} canto superior esquerdo
toPos = {x = 483, y = 1373, z = 7} canto inferior direito
pos = {x = 578, y = 1014, z = 7} templo
if getCreatureName(cid) == "Tower Event" then
doRemoveItem(getTileItemById(createpos, 1387).uid)
doSendAnimatedText(createpos, "BOSS",130)
addEvent(doSendAnimatedText,800,createpos, "MORTO",130)
doSendMagicEffect(createpos, CONST_ME_POFF)
if isPlayer(cid) and isInArea(getCreaturePosition(cid), fromPos, toPos) then
setGlobalStorageValue(bloodconfig.playersStorage, getPlayersInBlood()-1)
end
end
return true
end