• 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 resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent [1.X] Heart in Corpse when Player kills you

U can change the id as you want :D
And nice to hear, saw that on many evo ots back in 2013 or something
 
I dont think so
just remove the line in items.xml
<attribute key="decayTo" value="0" />
 
Did not see any script for newer version xD
so feel free to use xD
it wont drop any heart if player dies by monster
how it looks like:

View attachment 61094

keep in mind to regist in xml and login lua hehe

LUA:
function onDeath(player, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
    if not killer:isPlayer() then
        return true
    end
    local heart = corpse:addItem(2353, 1)
    heart:setAttribute(ITEM_ATTRIBUTE_NAME, ''..player:getName().."'s Heart")
    heart:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, ''..killer:getName()..' ['..killer:getLevel()..'] has killed '..player:getName()..' ['..player:getLevel()..']')
    return true
end
Hello, how to install this script ? :) there to put and what lines to put to login and registr ? folders ? please help :)
 
<event type="death" name="Heart" script="example.lua" />

player:registerEvent("Heart")
 
Back
Top