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

Canary 0 Blessings drop items

Lucas38

New Member
Joined
Aug 7, 2024
Messages
12
Reaction score
3
Currently i have 0 blessings and don't drop all my items on death, how can i make it drop everything?
 
I want to make it 100% to drop all items.

blessings.lua

Blessings.DropLoot = function(player, corpse, chance, skulled)
local multiplier = 100 -- Improve the loot randomness spectrum
math.randomseed(os.time()) -- Improve the loot randomness spectrum
chance = chance * multiplier
Blessings.DebugPrint(chance, "DropLoot chance")
for i = CONST_SLOT_HEAD, CONST_SLOT_AMMO do
local item = player:getSlotItem(i)
if item then
local thisChance = chance
local thisRandom = math.random(100 * multiplier)
if not item:isContainer() then
thisChance = chance / 10
end
Blessings.DebugPrint(thisChance / multiplier .. "%" .. " | thisRandom " .. thisRandom / multiplier .. "%", "DropLoot item " .. item:getName() .. " |")
if skulled or thisRandom <= thisChance then
Blessings.DebugPrint("Dropped " .. item:getName())
item:moveTo(corpse)
end
end
end
if skulled and Blessings.Config.SkulledDeathLoseStoreItem then
local inbox = player:getStoreInbox()
local toBeDeleted = {}
if inbox and inbox:getSize() > 0 then
for i = 0, inbox:getSize() do
local item = inbox:getItem(i)
if item then
toBeDeleted[#toBeDeleted + 1] = item.uid
end
end
if #toBeDeleted > 0 then
for i, v in pairs(toBeDeleted) do
local item = Item(v)
if item then
item:remove()
end
end
end
end
end
end
 

Similar threads

  • Question Question
RevScripts droplist show
Replies
2
Views
212
Back
Top