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

Learn spell by item

9380023

New Member
Joined
Apr 19, 2010
Messages
37
Reaction score
0
i want a spell that when u press a right click on an item for example (6527) you learn a spell who can help me?/??????
 
Last edited by a moderator:
PHP:
local spell = 'Exori'
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(not isKnight(cid)) then

        doCreatureSay(cid, "Only knights may open this scroll.", TALKTYPE_ORANGE_1, cid)
        return true
    end

    if getPlayerLearnedInstantSpell(cid, spell) == FALSE then
        playerLearnInstantSpell(cid, spell)
        doSendMagicEffect(fromPosition, CONST_ME_MAGIC_BLUE)
        doCreatureSay(cid, 'You have learned the spell ' .. spell .. '.', TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid)
    else
        doPlayerSendCancel(cid, 'You have already know this spell.')
    end
    return TRUE
end

PHP:
	<action itemid="6527" event="script" value="spellscroll.lua"/>
Use search ¬¬
 
Back
Top