• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

New event: dieplayer

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
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? :D

@EDIT
It would be great if some item appears in body only if player was killed by other player.
 
It works good but:
it creates infinite amount of items (creating heart again and again);
killed player don't change to body, it's still standing (name and hp bar disappear).
 
Back
Top