• 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 Changes in the Script

killing

Member
Joined
Feb 23, 2012
Messages
815
Reaction score
11
Location
BIH
I want to player can not loss items when he use it (I do not want to Item delete when player use it)
Script
LUA:
local vocations = {4, 8, 3, 7}
 
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 Paladins and Knights.")
        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, 15000)
        doCreatureAddHealth(cid, 35000)
        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
 
Last edited:
LUA:
local vocations = {4, 8, 3, 7}
 
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 Paladins and Knights.")
        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, 15000)
        doCreatureAddHealth(cid, 35000)
    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

Did you even think 1 second about doing this yourself?
It is not like it is hard to do.
 
LUA:
local vocations = {4, 8, 3, 7}
 
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 Paladins and Knights.")
        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, 15000)
        doCreatureAddHealth(cid, 35000)
    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

Did you even think 1 second about doing this yourself?
It is not like it is hard to do.

is easier to ask for money on the street to work for win it, many people think the minimum just being lazy :) (my father always says that)
 
Back
Top