<event type="preparedeath" name="onPriiepareDeath" event="script" value="BB.lua"/>
registerCreatureEvent(cid, "onPriiepareDeath")
function onPrepareDeath(cid)
local m = {2160} --Item ID
if getPlayerSlotItem(cid, 3).itemid == m[1] then
doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0)
end
return 1
end
Easy solution:
Creaturescripts.xml add
login.lua addCode:<event type="preparedeath" name="onPriiepareDeath" event="script" value="BB.lua"/>
BB.luaCode:registerCreatureEvent(cid, "onPriiepareDeath")
Rep+LUA:function onPrepareDeath(cid) local m = {2160} --Item ID if getPlayerSlotItem(cid, 3).itemid == m[1] then doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0) end return 1 end
Certain backpack..![]()
Source edit is easiest![]()
thx for every help
but...
if you have a backpack inside the other which does not drop ...
it will drop?
example of what I want:
in slot 3 has the backpack 2160
inside the backpack 2160 has backpack 2161, 2162, 2163 and 2164
2160, 2162, 2163, 2164 does not drop
2161 drop
thx for advanced