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 -- Inicializa a mensagem de loot local lootMessage = "Loot of " .. getCreatureName(cid):lower() .. ": " local lootList = getMonsterLootList(getCreatureName(cid)) local firstLoot = true for _, loot in pairs(lootList) do if loot.count > 1 then local numb = math.random(1, loot.count) doAddContainerItem(corpse.uid, loot.id, numb) if firstLoot then lootMessage = lootMessage .. numb .. " " .. getItemNameById(loot.id) firstLoot = false else lootMessage = lootMessage .. ", " .. numb .. " " .. getItemNameById(loot.id) end elseif math.random(1, 100000) <= loot.chance then doAddContainerItem(corpse.uid, loot.id, 1) if firstLoot then lootMessage = lootMessage .. getItemNameById(loot.id) firstLoot = false else lootMessage = lootMessage .. ", " .. getItemNameById(loot.id) end end end -- Adiciona "(boosted loot)" ao final da mensagem lootMessage = lootMessage .. ". (boosted loot)" -- Envia a mensagem de loot para todos os jogadores for i = 1, #deathList do doPlayerSendTextMessage(deathList[i], MESSAGE_INFO_DESCR, lootMessage) end end return true end






info
Grupo: Artesão
Registrado: 01/07/18
Posts: 118
Reputação: +1
Gênero: Masculino
nao estou conseguir deixa que seja exibido apenas uma mensagem de loot quando a criatura morre , gostaria de deixar aparecer apenas a mensagem debaixo e colocar (boosted loot) . usei a I.A para fazer o script e ela nao resolve essa parte
ai como esta sendo exibido.
13:08 Loot of rat: 3 gold coin, (boosted loot)
13:08 Loot of a rat: cheese, 3 gold coins, 3 gold coins.
gostaria que fosse assim.
13:08 Loot of a rat: cheese, 3 gold coins, 3 gold coins. (boosted loot)