• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Magic Level bug tfs 0.3.6

metiu11

Member
Joined
Mar 26, 2011
Messages
94
Solutions
2
Reaction score
5
Hello,
I was create some new vocations and spells.
When i used spell my magic level got 10% to next lvl and waste 250mana
So i was test it and when i used spells in 1mlvl or 50mlvl or 100mlvl etc. he give me 10% every time....
I dont know how to repair it to give lvl like
1mlvl - 10%
2mlvl - 9%
10mlvl - 2% etc..
Can someone tell me how to fix it?
 
yes, it's like exp stages also check your config lua you must had put the ml stage really high in config.lua
and obviusly change the values in the new script you must play with them check/test , etc
 
well i had in config 0.2x mlvl, if i want to give some "normal" magic leveling i need put to script x0.004 mlvl

Its okay? or its can be bugged with more players?
 
doPlayerAddSpentMana(cid, amount[, useMultiplier = true])

-- use false, so your server multipliers are not calculated when adding the mana spent.
ex: doPlayerAddSpentMana(cid, 250, false)
 
@Felipe93 i dont think so. Have no idea why its so broken
@Xikini well, where can i find it? Add to spells or what? i dont get it

EDIT:
I found this:
Code:
function doPlayerAddMagLevel(cid, amount)
        for i = 1, amount do
                doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid, getPlayerMagLevel(cid, true) + 1) - getPlayerSpentMana(cid)) / getConfigInfo('rateMagic'))
        end
        return true
end

function doPlayerAddSkill(cid, skill, amount, round)
        if(skill == SKILL__LEVEL) then
                return doPlayerAddLevel(cid, amount, round)
        elseif(skill == SKILL__MAGLEVEL) then
                return doPlayerAddMagLevel(cid, amount)
        end

        return doPlayerAddSkillTry(cid, skill, (getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)) / getConfigInfo('rateSkill'))
end

function getPartyLeader(cid)
    local party = getPartyMembers(cid)
    if(type(party) ~= 'table') then
        return 0
    end

    return party[1]
end

I am not sure but maybe here its answer why mlvl is broken
 
Last edited:
Back
Top