This scriptmakes a player loot a skull with their name, level and who they were killed buy when they are fragged by another play. The problem is: The script works, but once you move the skull outside of the dead body...it goes back to saying it is just a skull and no longer says the info about the frag.
REP++
LUA:
function onDeath(cid, corpse, deathList)
if isPlayer(cid) and isPlayer(deathList[1]) then
local v = { killer_name = getCreatureName(deathList[1]), killer_level = getPlayerLevel(deathList[1]), target_name = getCreatureName(cid), target_level = getPlayerLevel(cid) }
local reward = doAddContainerItem(corpse.uid, 2320, 1)
doItemSetAttribute(reward, "description", "" .. (getPlayerSex(cid) == 0 and "She" or "He") .. " was killed at level " .. v.target_level .. " by " .. v.killer_name .. " who was level " .. v.killer_level .. " at the time. " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "[Unjustified]" or "[Justified]"))
doItemSetAttribute(reward, "name", v.target_name .."'s Skull")
end
return true
end
REP++
Last edited: