add this message (boosted loot) in this script, when the monster is killed.
ex: Loot of a bear: meat (boosted loot).
ex: Loot of a bear: meat (boosted loot).
local BOOSTED_MONSTER = 56404
local boostedMonstersList = {"rat"}
local experienceBonus = 8.0
function onDeath(cid, corpse, deathList)
local master = getCreatureMaster(cid)
if (master and master ~= cid) then
return true
end
local boostedMonster = boostedMonstersList[getGlobalStorageValue(BOOSTED_MONSTER)]
if getCreatureName(cid):lower() == boostedMonster then
for i = 1, #deathList do
-- exp bonus
local bonusExperience = getMonsterInfo(getCreatureName(cid)).experience/i * getPlayerRates(deathList)[SKILL__LEVEL] * experienceBonus
doPlayerAddExperience(deathList, bonusExperience)
doSendAnimatedText(getPlayerPosition(deathList), bonusExperience, 215)
-- loot bonus
local lootList = getMonsterLootList(getCreatureName(cid))
for i, _ in pairs(lootList) do
if lootList.count > 1 then
local numb = math.random(1, lootList.count)
doAddContainerItem(corpse.uid, lootList.id, numb)
elseif math.random(1,100000) <= lootList.chance then
doAddContainerItem(corpse.uid, lootList.id, 1)
end
end
end
end
return true
end