sucibob
Member
- Joined
- Mar 28, 2017
- Messages
- 128
- Reaction score
- 13
I found this script who give a loot bonus when u kill some monster:
But how the bonus actually works?
I would like to understand how it work to increase or decries the bonus, or even play with it
Lua:
function onDeath(cid, corpse, deathList)
local master = getCreatureMaster(cid)
if (master and master ~= cid) then
return true
end
print("monster killed prey system")
for i = 1, #deathList do
-- loot bonus
local lootList = getMonsterLootList(getCreatureName(cid))
for i, _ in pairs(lootList) do
if lootList[i].count > 1 then
local numb = math.random(1, lootList[i].count)
doAddContainerItem(corpse.uid, lootList[i].id, numb)
elseif math.random(1,100000) <= lootList[i].chance then
doAddContainerItem(corpse.uid, lootList[i].id, 1)
end
end
end
return true
end
But how the bonus actually works?
I would like to understand how it work to increase or decries the bonus, or even play with it
Last edited by a moderator: