function onUse(cid, item, fromPosition, itemEx, toPosition) -- Mooosie
local spell = "Light Healing" -- The spell name you want to learn
if getPlayerLearnedInstantSpell(cid, spell) == false then
doSendMagicEffect(getCreaturePosition(cid), 12)
doPlayerSendTextMessage(cid, 22, "You just learned a new spell ".. spell .."!")
doPlayerLearnInstantSpell(cid, spell)
else
doPlayerSendCancel(cid, "You already know the ".. spell .." spell.")
doSendMagicEffect(getCreaturePosition(cid),2)
end
return true
end
LUA:function onUse(cid, item, fromPosition, itemEx, toPosition) -- Mooosie local spell = Light Healing -- The spell name you want to learn if getPlayerLearnedInstantSpell(cid, spell) == false then doPlayerLearnInstantSpell(cid, spell) else doPlayerSendCancel(cid, "You already know the ".. spell .." spell.") doSendMagicEffect(getCreaturePosition(cid),2) end return true end
Remember next time post your requests at the Requesting Board.
function onUse(cid, item, fromPosition, itemEx, toPosition) -- Mooosie
local spell = "Light Healing" -- The spell name you want to learn
if getPlayerLearnedInstantSpell(cid, spell) == false then
doPlayerLearnInstantSpell(cid, spell)
else
doPlayerSendCancel(cid, "You already know the ".. spell .." spell.")
doSendMagicEffect(getCreaturePosition(cid),2)
end
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition) -- Mooosie
local spell = "Light Healing" -- The spell name you want to learn
if getPlayerLearnedInstantSpell(cid, spell) == false then
doSendMagicEffect(getCreaturePosition(cid), 12)
doPlayerSendTextMessage(cid, 22, "You just learned a new spell ".. spell .."!")
doPlayerLearnInstantSpell(cid, spell)
else
doPlayerSendCancel(cid, "You already know the ".. spell .." spell.")
doSendMagicEffect(getCreaturePosition(cid),2)
end
return true
end
<action itemid="SPELLSCROLLITEMID" event="script" value="spell_scroll.lua"/>
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action itemid="SPELLSCROLLITEMID" event="script" value="spell_scroll.lua"/>
function onUse(cid, item, fromPosition, itemEx, toPosition) -- Mooosie
local spell = "Light Healing" -- The spell name you want to learn
if getPlayerLearnedInstantSpell(cid, spell) == false then
doSendMagicEffect(getCreaturePosition(cid), 12)
doPlayerSendTextMessage(cid, 22, "You just learned a new spell ".. spell .."!")
doPlayerLearnInstantSpell(cid, spell)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid, "You already know the ".. spell .." spell.")
doSendMagicEffect(getCreaturePosition(cid),2)
end
return true
end
local spell = Light Healing
local spell = "Light Healing"