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

Solved onpreparedeath error

Tropix

Like a BAuZZ
Joined
Jan 6, 2009
Messages
116
Reaction score
4
[Warning - Event::loadScript] Event onPrepareDeath not found (data/creaturescripts/scripts/preparedeath.lua)

Code:
function onDeath(cid, lastHitKiller, mostDamageKiller)
    if(isPlayer(cid) and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
        for i = 1, 5 do
            doPlayerAddBlessing(cid, i)
        end
        doCreatureSetDropLoot(cid, false)     
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        doCreatureSay(cid, "Forever Aol!", TALKTYPE_ORANGE_1)
    end
    return true
end
 
Code:
local bless = {1, 2, 3, 4, 5}   
function onDeath(cid, lastHitKiller, mostDamageKiller)
if(getPlayerSlotItem(cid, 2).itemid == 10719) then
doCreatureSetDropLoot(cid, false)
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless)
end
end
return true
end

i will back in 20 min pray time when back i will help u if its not work
 
It cannot find the function onPrepareDeath.

Replace function onDeath(cid, lastHitKiller, mostDamageKiller) with function onPrepareDeath(cid, deathList)
 
Back
Top