Magic Level bug tfs 0.3.6

metiu11

Well-Known Member
Joined
Mar 26, 2011
Messages
82
Reaction score
4
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?
 

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,495
Reaction score
209
Location
Chile
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
 
OP
metiu11

metiu11

Well-Known Member
Joined
Mar 26, 2011
Messages
82
Reaction score
4
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?
 

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,495
Reaction score
209
Location
Chile
do you have any script? its super weird that with 250 mana you advance 50% of ml
 

Xikini

I whore myself out for likes
Premium User
Joined
Nov 17, 2010
Messages
4,103
Reaction score
2,176
doPlayerAddSpentMana(cid, amount[, useMultiplier = true])

-- use false, so your server multipliers are not calculated when adding the mana spent.
ex: doPlayerAddSpentMana(cid, 250, false)
 
OP
metiu11

metiu11

Well-Known Member
Joined
Mar 26, 2011
Messages
82
Reaction score
4
@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:
Top