• Vote in May Mapping Competition to select a winner!
  • 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

New Member
Joined
Mar 26, 2011
Messages
94
Best answers
2
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,611
Best answers
9
Reaction score
244
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

New Member
Joined
Mar 26, 2011
Messages
94
Best answers
2
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,611
Best answers
9
Reaction score
244
Location
Chile
try with 1 or 1.0
 
Last edited:

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,611
Best answers
9
Reaction score
244
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
Joined
Nov 17, 2010
Messages
4,206
Best answers
182
Reaction score
2,264
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

New Member
Joined
Mar 26, 2011
Messages
94
Best answers
2
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