• 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 !Do item not remove!

killing

Member
Joined
Feb 23, 2012
Messages
815
Reaction score
11
Location
BIH
hello i need help with this Script

LUA:
local vocations = {1, 2, 5, 6}
 
function onUse(cid, item, frompos, item2, topos)
    local vocation = getPlayerVocation(cid)
    if not isInArray(vocations, vocation) then
        doSendMagicEffect(frompos, CONST_ME_MAGIC_POFF)
        doPlayerSendCancel(cid, "Your vocation cannot use this rune. It can be used by bla bla bla..")
        return true
    end
 
    local mLvl = getPlayerMagLevel(cid)
    if mLvl >= 0 then
        doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
        doCreatureSay(cid, "Mixed Rune", TALKTYPE_MONSTER)
        doPlayerAddMana(cid, 50000)
        doCreatureAddHealth(cid, 30000)
        if item.type > 1 then
            doChangeTypeItem(item.uid, item.type-1)
        end
    else
        doSendMagicEffect(frompos, CONST_ME_MAGIC_POFF)
        doPlayerSendCancel(cid, "You don't have the required magic level to use that rune.")
    end
    return true
end

I want when player use Mixed rune to do not Lose one Rune!

I hope you understand,sorry for my language
 
Last edited:
LUA:
local vocations = {1, 2, 5, 6}
 
function onUse(cid, item, frompos, item2, topos)
    local vocation = getPlayerVocation(cid)
    if not isInArray(vocations, vocation) then
        doSendMagicEffect(frompos, CONST_ME_MAGIC_POFF)
        doPlayerSendCancel(cid, "Your vocation cannot use this rune. It can be used by bla bla bla..")
        return true
    end
 
    local mLvl = getPlayerMagLevel(cid)
    if mLvl >= 0 then
        doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
        doCreatureSay(cid, "Mixed Rune", TALKTYPE_MONSTER)
        doPlayerAddMana(cid, 50000)
        doCreatureAddHealth(cid, 30000)
    else
        doSendMagicEffect(frompos, CONST_ME_MAGIC_POFF)
        doPlayerSendCancel(cid, "You don't have the required magic level to use that rune.")
    end
    return true
end
 
Back
Top