• 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!

Lua [HELP] Advanced ManaRune

Badoo

New Member
Joined
May 6, 2012
Messages
19
Reaction score
1
Thread Closed
Problem Solved.
Thanks Limos..=)
 
Last edited:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local manamax = getPlayerMaxMana(cid)
    local mana_add = (manamax * 0.07) 
    local storage = 1000
    local time = 1
    
    if exhaustion.check(cid, storage) then    
        doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_POFF)     
        return doPlayerSendCancel(cid, "You are exhausted")
    end
    if(getPlayerVocation(cid) == 1) or (getPlayerVocation(cid) == 5) or (getPlayerVocation(cid) == 2) or (getPlayerVocation(cid) == 6)then
    doPlayerAddMana(cid, mana_add)
    doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
    exhaustion.set(cid, storage, time)
    doSendAnimatedText(getPlayerPosition(cid),""..mana_add.."", TEXTCOLOR_LIGHTBLUE)
 else
 	doPlayerSendTextMessage(cid,22,"This is only for sorcerers and druids.")
end
    return TRUE
end

For the ek you can just change getplayermaxmana into getcreaturemaxhealth, use docreatureaddhealth instead of doplayeraddmana and change 0.07 to 0.14, And ofc the voc part to 4 and 8.
For the spirit rune you can just add the health parts.
If you want to make the exhaustion lower, you can just do for example: local time = 0.5
 
Last edited:
Back
Top