Vanitas
Anaerobe
- Joined
- Jul 7, 2008
- Messages
- 34
- Reaction score
- 0
I found nice script: when player dies in his body appears some item (depend on lvl) but I can't find sources for that, I have only lua scripts.
creaturescripts.xml
die1.lua
Could someone add to TFS sources new event "die player" and makes this script work, please?
@EDIT
It would be great if some item appears in body only if player was killed by other player.
creaturescripts.xml
Code:
<event type="dieplayer" name="DIE_PLAYER" script="die1.lua" />
die1.lua
Code:
function onDiePlayer(cid, corpse)
doPlayerSay(cid, "I'll back!", 1)
if doPlayerRemoveItem(cid,2173, 1) == 0 then
else
local pos = getCreaturePosition(cid)
doCreateItem(2148, 1, pos)
end
if getPlayerLevel(cid) >= 150 then
item = doAddContainerItem(corpse, 2353, 1)
doSetItemSpecialDescription(item,"This is the heart of "..getPlayerName(cid).." Who was killed at Level "..getPlayerLevel(cid)..".")
else
item2 = doAddContainerItem(corpse, 2231, 1)
doSetItemSpecialDescription(item2,"This is the Bone of "..getPlayerName(cid).." Who was killed at Level "..getPlayerLevel(cid)..".")
end
end
Could someone add to TFS sources new event "die player" and makes this script work, please?
@EDIT
It would be great if some item appears in body only if player was killed by other player.