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

Loot on corpse

poii

Member
Joined
Nov 11, 2008
Messages
188
Reaction score
8
Can u help me with a simple script but I don't know much about creatureevents just want that when a player dies in his corpse appear x item or x item (50%,%50%) if killer is a player
for example If player A kill player B then on playerB corpse besides his loot appear a skull or a piece of ham (just an example not the exact idea )
 
Code:
function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
    local container = Container(corpse)
    if not Player(killer) or not container then
        return
    end

    container:addItem(math.random(100) > 50 and 2671 or 2229, 1)
end
 
Back
Top