Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monster = "el monster"
- function onPrepareDeath(cid, deathList)
- if isMonster(deathList[1]) and string.lower(getCreatureName(deathList[1])) == monster then
- doCreatureSetDropLoot(cid, false)
- doCreatureAddHealth(cid,getCreatureMaxHealth(cid))
- doCreatureAddMana(cid,getCreatureMaxMana(cid))
- doItemSetAttribute(doCreateItem(corpse[getPlayerSex(cid)], 1, getThingPos(cid)), "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by " .. (isMonster(deathList[1]) and "a " .. string.lower(getCreatureName(deathList[1])) or isCreature(deathList[1]) and getCreatureName(deathList[1]) or "a field item") .. ".\nHis soul was protected.")
- doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid)))
- return false
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement