Tenta assim.
function onKill(cid, target, lastHit)
if isPlayer(target)
doSendMagicEffect(target.pos, 65)
end
end
<event type="kill" name="phantasm" event="script" value="morteefeito.lua"/>
e no login.lua use, a mesma tag do outro post.
data/creaturescripts/scripts e crie um arquivo chamado morteefeito.lua e adicione
function onDeath(cid, corpse, deathList)
doSendMagicEffect(corpse.pos, 65)
end
em creaturescripts.xml
<event type="death" name="phantasm" event="script" value="morteefeito.lua"/>
em data/creaturescripts/scripts abra o login.lua e adicione a tag
registerCreatureEvent(cid, "phantasm")