<item id="2173" article="an" name="amulet of loss">
<attribute key="weight" value="420" />
<attribute key="slotType" value="necklace" />
<attribute key="charges" value="0" />
<attribute key="preventDrop" value="1" />
</item>
<attribute key="charges" value="0" />
<attribute key="charges" value="1" />
function onPrepareDeath(cid, killer)
local position = getCreaturePosition(cid)
if getPlayerItemCount(cid, 2196) >= 1 then
if getCreatureSkullType(cid) < 5 then
doSetCreatureDropLoot(cid, 0)
if getCreatureSkullType(cid) == 4 then
doSendAnimatedText(position, 'AOL Ownz', 180)
elseif getCreatureSkullType(cid) < 4 then
doSendAnimatedText(position, 'AOL Owns', 215)
end
end
end
return TRUE
end
I have a script at home that I made for this, give me a couple hours and I'll post it here...
LUA:function onPrepareDeath(cid, killer) local position = getCreaturePosition(cid) if getPlayerItemCount(cid, 2196) >= 1 then if getCreatureSkullType(cid) < 5 then doSetCreatureDropLoot(cid, 0) if getCreatureSkullType(cid) == 4 then doSendAnimatedText(position, 'AOL Ownz', 180) elseif getCreatureSkullType(cid) < 4 then doSendAnimatedText(position, 'AOL Owns', 215) end end end return TRUE end
function onPrepareDeath(cid, deathList)
if getCreatureSkullType(cid) < 5 and doPlayerRemoveItem(cid, 2196, 1) then
doSetCreatureDropLoot(cid, false)
doSendAnimatedText(getThingPos(cid), 'AOL Ownz', getCreatureSkullType(cid) == 4 and 180 or 215)
end
return true
end
if getCreatureSkullType(cid) < 5 then
doSetCreatureDropLoot(cid, false)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).uid) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 2)
return true
end