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

CreatureEvent Remove Item lose from Red skull players

Xaiman

New Member
Joined
Feb 27, 2010
Messages
94
Reaction score
0
I looked all around the forum and couldn't find anything to fix this problem.

Anyways heres the script (credits to damadgerzz for the script that i edited just a little bit) He made it to work for an amulet so i just set it to work for anyone over lvl 1.

Put this in creaturescripts.
Code:
local corpse_ids = {
    [0] = 3065, -- female
    [1] = 3058  -- male
}
function onPrepareDeath(cid, deathList)
Level = getPlayerLevel(cid)
    if Level > 1 then
        doCreatureSetDropLoot(cid, false)
        local corpse, killers = doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), ""        
        for i = 1, math.min(getConfigInfo('deathAssistCount') + 1, #deathList) do
            killers = killers .. (i == 1 and "" or ", ") .. (isMonster(deathList[i]) and "a " or "") .. getCreatureName(deathList[i])
        end
        doItemSetAttribute(corpse, "specialdescription", "You recognize " .. getCreatureName(cid) .. ". " .. (getPlayerSex(cid) == 0 and "She" or "He") .. " was killed by " .. killers .. ".")
    end
    return true
end

put this in your creaturescripts.xml
Code:
<event type="preparedeath" name="onPrepareDeath" event="script" value="red skull aol.lua"/>

and finally put this in your login.lua
Code:
registerCreatureEvent(cid, "onPrepareDeath")
 
Last edited:
It does not work on my server, but I've found a solution. Just find a line in the source in player.cpp:
Code:
if(skull > SKULL_WHITE || (item->getContainer() && rand < loss) || (!item->getContainer() && rand < itemLoss))
and change SKULL_WHITE to SKULL_RED or SKULL_BLACK.
 
Back
Top