perfection
FATAL DAMAGE
- Joined
- Aug 27, 2011
- Messages
- 196
- Reaction score
- 8
This is an Action Script that contains 4 spell scrolls i hope u like it
and in actions.xml add:
Lua:
-- Credits To Perfection --
local spell1 = "" -- Name Of First Spell Here --
local spell2 = "" -- Name Of Second Spell Here --
local spell3 = "" -- Name Of Third Spell Here --
local spell4 = "" -- Name Of Fourth Spell Here --
function onUse(cid, item, frompos, itemEx, topos)
if item.itemid == 6087 and (getPlayerLearnedInstantSpell(cid, spell1)) == FALSE then
doPlayerLearnInstantSpell(cid, spell1)
doSendMagicEffect(getCreaturePosition(cid), 39)
doPlayerSendTextMessage(cid,20,"You Successfully Learned "..spell1..".")
doRemoveItem(cid, item.uid, 1)
elseif item.itemid == 6088 and (getPlayerLearnedInstantSpell(cid, spell2)) == FALSE then
doPlayerLearnInstantSpell(cid, spell2)
doSendMagicEffect(getCreaturePosition(cid), 39)
doPlayerSendTextMessage(cid,20,"You Successfully Learned "..spell2..".")
doRemoveItem(cid, item.uid, 1)
elseif item.itemid == 6089 and (getPlayerLearnedInstantSpell(cid, spell3)) == FALSE then
doPlayerLearnInstantSpell(cid, spell3)
doSendMagicEffect(getCreaturePosition(cid), 39)
doPlayerSendTextMessage(cid,20,"You Successfully Learned "..spell3..".")
doRemoveItem(cid, item.uid, 1)
elseif item.itemid == 6090 and (getPlayerLearnedInstantSpell(cid, spell4)) == FALSE then
doPlayerLearnInstantSpell(cid, spell4)
doSendMagicEffect(getCreaturePosition(cid), 39)
doPlayerSendTextMessage(cid,20,"You Successfully Learned "..spell4..".")
doRemoveItem(cid, item.uid, 1)
else
doCreatureSay(cid,"I Already Know This Spell",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 2)
end
return TRUE
end
and in actions.xml add:
Lua:
<action itemid="6087;6088;6089;6090" event="script" value="Spell Scrolls.lua"/>
Last edited: