.Qual servidor ou website você utiliza como base?
Boa noite, estou precisando de ajuda no meu Monstro Boostado Diario, o monstro aparece no local que coloquei na script, a mensagem do monstro boostado tbm aparece certinho, porem o ponto é que a criatura selecionada para ser boostado nao está ganhando os 5% a mais de XP/LOOT que eram pra ganhar. ajudem por favor REP+
Está surgindo algum erro? Se sim coloque-o aqui.
data/creatures/scripts
loot_bonus = 5
ignoredList = {1987}
function addBonusLoot(position, name)
for i = 0, 255 do
position.stackpos = i
corpse = getTileThingByPos(position)
if corpse.uid > 0 and isCorpse(corpse.uid) then
break
end
end
local newRate = (1 + (loot_bonus/100)) * getConfigValue("rateLoot")
local monsterLoot = getMonsterLootList(name)
local mainbp = doCreateItemEx(1987, 1)
for i, loot in pairs(monsterLoot) do
if math.random(1, 100000) <= newRate * loot.chance then
if #ignoredList > 0 then
if (not isInArray(ignoredList, loot.id)) then
doAddContainerItem(mainbp, loot.id, loot.countmax and math.random(1, loot.countmax) or 1)
end
else
doAddContainerItem(mainbp, loot.id, loot.countmax and math.random(1, loot.countmax) or 1)
end
end
doAddContainerItemEx(corpse.uid, mainbp)
end
end
BOOSTED_MONSTER = 56404
boostedMonstersList = {"rat", "spider", "troll", "orc", "minotaur", "dwarf", "elf", "skeleton", "amazon", "valkirie", "dark apprentice", "ghoul", "cyclops", "dwarf guard", "necromancer", "vampire", "werewolf", "dragon", "dragon lord", "wyrm", "giant spider", "hydra", "warlock", "demon"}
experienceBonus = 5
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[i])[SKILL__LEVEL] * experienceBonus/100
doPlayerAddExperience(deathList[i], bonusExperience)
doSendAnimatedText(getPlayerPosition(deathList[i]), bonusExperience, 215)
-- loot bonus
addEvent(addBonusLoot, 10, getCreaturePosition(cid), getCreatureName(cid))
end
end
return true
end
data/creature/scripts
function onLogin(cid)
local BOOSTED_MONSTER = 56404
local boostedMonstersList = {"rat", "spider", "troll", "orc", "minotaur", "dwarf", "elf", "skeleton", "amazon", "valkirie", "dark apprentice", "ghoul", "cyclops", "dwarf guard", "necromancer", "vampire", "werewolf", "dragon", "dragon lord", "wyrm", "giant spider", "hydra", "warlock", "demon"}
local boostedMonster = boostedMonstersList[getGlobalStorageValue(BOOSTED_MONSTER)]
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "O monstro boostado de hoje e: "..boostedMonster.."!")
return true
end
Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.