• 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 up full mana

mirak sebata

New Member
Joined
Dec 6, 2017
Messages
135
Reaction score
0
hi i want to change something in script when i level up i get full hp and mana thats correct.... but when my magic level up i get full mana i want to disable my magic up how can i do this?
 
Solution
If you want to remove the mana refill after advancing on magic level (this is what I understood):
Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
    local pos = getCreaturePosition(cid)
    if skill == SKILL__LEVEL then
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
        doCreatureAddMana(cid, getCreatureMaxMana(cid))
        doSendAnimatedText(pos, "Level Up!", 18)
    end
end
If you want to remove the mana refill after advancing on magic level (this is what I understood):
Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
    local pos = getCreaturePosition(cid)
    if skill == SKILL__LEVEL then
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
        doCreatureAddMana(cid, getCreatureMaxMana(cid))
        doSendAnimatedText(pos, "Level Up!", 18)
    end
end
 
Solution
If you want to remove the mana refill after advancing on magic level (this is what I understood):
Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
    local pos = getCreaturePosition(cid)
    if skill == SKILL__LEVEL then
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
        doCreatureAddMana(cid, getCreatureMaxMana(cid))
        doSendAnimatedText(pos, "Level Up!", 18)
    end
end
yes thanks but i wanna keep the message ''Magic level up"
 
Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
    local pos = getCreaturePosition(cid)
    if skill == SKILL__LEVEL then
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
        doCreatureAddMana(cid, getCreatureMaxMana(cid))
        doSendAnimatedText(pos, "Level Up!", 18)
    elseif skill == SKILL__MAGLEVEL then
        doSendAnimatedText(pos, "Magic Up!", 180)
    end
end
 
Back
Top