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

help with health/manarune

Desolation

New Member
Joined
Sep 3, 2007
Messages
13
Reaction score
0
i need it to give health and look for level instead of magic level, but i dont know how to do it :s hopefully i get more help here :s


Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if (itemEx.uid == cid) then
        local mag = getPlayerMagLevel(cid)
        if (mag >= 2) then
            if (item.type > 1) then
                doChangeTypeItem(item.uid, item.type - 1)
            else
                doRemoveItem(item.uid)
            end
            doSendMagicEffect(getCreaturePosition(itemEx.uid), 1)
            doCreatureAddHealth(itemEx.uid, 1000)
        else
            doSendMagicEffect(getCreaturePosition(cid), 2)
            doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
        end
    else
        doPlayerSendCancel(cid,"You can only use this rune on yourself.")
        doSendMagicEffect(getCreaturePosition(cid), 2)
    end
    return TRUE
end
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if (itemEx.uid == cid) then
        local lv = getPlayerLevel(cid)
        if (lv >= [B][COLOR="Red"][U]?[/U][/COLOR][/B]) then
            if (item.type > 1) then
                doChangeTypeItem(item.uid, item.type - 1)
            else
                doRemoveItem(item.uid)
            end
            doSendMagicEffect(getCreaturePosition(itemEx.uid), 1)
            doCreatureAddHealth(itemEx.uid, 1000)
        else
            doSendMagicEffect(getCreaturePosition(cid), 2)
            doPlayerSendCancel(cid,"You don't have the required level to use that rune.")
        end
    else
        doPlayerSendCancel(cid,"You can only use this rune on yourself.")
        doSendMagicEffect(getCreaturePosition(cid), 2)
    end
    return TRUE
end

Change the giant ? for the lv you want to use yer rune
Arr. :D
 
Back
Top