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

Solved Help LUA MANARUNE VOCATION!

kevin127

New Member
Joined
May 17, 2012
Messages
100
Reaction score
0
I want to have vocation for only Druid, Sorcerer, Paladin! Thanks in Advance!


Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 0 then
doSendMagicEffect(topos,12)
doPlayerAddMana(cid, 1200)
if item.type > 1 then
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
return 1
end
 
:)
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(not isSorcerer(cid) and not isDruid(cid) and not isPaladin(cid)) then
        doCreatureSay(cid, "Only sorcerers , druids and paladins may drink this fluid.", TALKTYPE_ORANGE_1, cid)
        return true
    end
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(not isSorcerer(cid) and not isDruid(cid) and not isPaladin(cid)) then
        doCreatureSay(cid, "Only sorcerers , druids and paladins may drink this fluid.", TALKTYPE_ORANGE_1, cid)
        return true
    end
    if getPlayerMagLevel(cid) >= 1 then
        doPlayerAddMana(cid, 1200)
    else
        doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
    end
end

if you need item remove

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(not isSorcerer(cid) and not isDruid(cid) and not isPaladin(cid)) then
        doCreatureSay(cid, "Only sorcerers , druids and paladins may drink this fluid.", TALKTYPE_ORANGE_1, cid)
        return true
    end
    if getPlayerMagLevel(cid) >= 1 then
        doPlayerAddMana(cid, 1200)
        doRemoveItem(item.uid, 1)
    else
        doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
    end
end

add effects by your self because I use another version ofc.
 
Back
Top