• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Spell Scroll

imback1

Unknown member
Joined
Jul 11, 2013
Messages
785
Solutions
1
Reaction score
46
Hello

i need a script action XXXX use that scroll to give me SPELL
i hope you understand me :D i can't explain what i need
 
use tis ....[xxxx] is items id and "Spell-words" name spell
Code:
local spells = {
    [xxxx] = "Spell-words",
    [xxxx] = "Spell-words",
    [xxxx] = "Spell-words",
    [xxxx] = "Spell-words",
}
function onUse(cid, item, frompos, itemEx, topos)
    if(spells[item.itemid]) then
        if(not(getPlayerLearnedInstantSpell(cid, spells[item.itemid]))) then
            doPlayerLearnInstantSpell(cid, spells[item.itemid])
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
            doPlayerSendTextMessage(cid, 20, "Congratulations! You have successfully learnes " .. spells[item.itemid])
            doRemoveItem(cid, item.uid, 1)
        else
            doPlayerSendCancel(cid, "You already know this spell.")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
        end
    end
    return true
end
Code:
<action itemid="xxx;xxxx;xxxx;xxxx" event="script" value="Spell Scrolls.lua"/>
and next time when need help post in support or request i can't remove ur post but limos will do it @Limos
 
Back
Top