potinho
Advanced OT User
Hello everyone, everything good? I use the script below as a daily boosted monster, but I would like some help with a change: it is giving half of the monster's base EXP (if a Demon gives 6k EXP, the bonus gives 3k), but I would like it to be half the general EXP , example: My EXP is by stages, if in a certain one my EXP is multiplied by 10 (the Demon would give 60k of EXP) I would like the bonus to be half of the total (30k of exp). can you help me?
Lua:
BOOSTED_MONSTER = 56404
local boostedMonstersList = {"frost behemoth", "giant spider", "hydra", "warlock", "hero", "serpent spawn", "dragon lord", "frost dragon", "demon", "behemoth", "hero king", "red knight", "master warlock", "ancient gargoyle", "ancient dragon", "royal guard", "golden knight", "orshabaal", "demodras", "musashi swordsman", "fire sorcerer", "oriental knight", "perfect troll", "dracola", "undead plague", "cursed lion", "the old widow", "grim reaper", "war golem"}
experienceBonus = 50
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
if isCreature(deathList[i]) then
local bonusExperience = getMonsterInfo(getCreatureName(cid)).experience/i * getPlayerRates(deathList[i])[SKILL__LEVEL] * experienceBonus/100
doPlayerAddExperience(deathList[i], bonusExperience)
doSendAnimatedText(getPlayerPosition(deathList[i]), ""..tonumber(bonusExperience).."", 215)
end
end
end
return true
end