• 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!

Drop items on Death?

Magictibiaman

New Member
Joined
May 25, 2009
Messages
371
Reaction score
0
Drop items on Death?
how would i make myself drop an item if i am killed.
like a kill token.
so everytime i die an extra item drop with my body
 
search here for nugget coins script deathreward its a creatureevent script on kill you get auto reward with your name on it easy to find you have to search for it.
 
If you're using TFS 0.3.4 this should work.

Go to ..data/creaturescripts/scripts/playerdeath.lua

Under this:
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
if(config.deathListEnabled ~= TRUE) then
return
end

Paste this:
if (isPlayer(lastHitKiller) == TRUE) and (getPlayerLevel(cid) >= 100) then
local item = doPlayerAddItem(lastHitKiller, 2157, 1)
doSetItemSpecialDescription(item, "It's a trohpy you gained for killing " .. getCreatureName(cid) .." when he was Level "..getPlayerLevel(cid)..".")
end

If someone kills a level 100+, the lasthit killer will get a golden nugget that says "It's a trohpy you gained for killing <player name> when he was Level <player level>"
 
Back
Top