• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

do not drop certains backpack

foxkbt

Member
Joined
Sep 29, 2009
Messages
290
Reaction score
7
Location
Salvador
I would like to make specific containers do not drop

I think it would be creaturescript
function onDeath

but I do not know how

help me
red + +
 
Easy solution:
Creaturescripts.xml add
Code:
<event type="preparedeath" name="onPriiepareDeath" event="script" value="BB.lua"/>
login.lua add
Code:
	registerCreatureEvent(cid, "onPriiepareDeath")
BB.lua
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
Rep+
 
Easy solution:
Creaturescripts.xml add
Code:
<event type="preparedeath" name="onPriiepareDeath" event="script" value="BB.lua"/>
login.lua add
Code:
	registerCreatureEvent(cid, "onPriiepareDeath")
BB.lua
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
Rep+

Certain backpack.. :p
 
What I did when I had my server up was sell an item that would assign your GUID to the backpack, then that could be used to prevent it from dropping. If it did no one could open it besides you.
 
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
 
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

Not possible without source editing :)
 
I'm beginning to study c++
if you can help me I would be very grateful

I was thinking ...
if I create a new type of iten
equal to the container, which does not drop when you die...
its works?
I think so

where I edit to create a new type of iten to iten.xml?
 
I did not tell my idea!

and know how to do this, it is essential for my project!
I'm not asking to give me the script ready
I just want to know where the edict in soucers
plx...
 
Back
Top