Uczenie się spelli ze scrolów.
Do actions.xml:
<action itemid="1949" script="spell_scroll.lua" />
Teraz w spells/scripts
Spell_scroll.lua -------------nazwa .lua
I teraz skrypcik
function onUse(cid, item, frompos, item2, topos) if item.actionid == 12000 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exura') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Light Healing spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12001 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exura gran') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Intense Healing spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12002 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo flam hur') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Fire Wave spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12003 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'utevo res ina') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Creature Illusion spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12004 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exiva') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Find Person spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12005 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'utevo lux') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Light spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12006 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exani tera') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Magic Rope spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12007 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exana pox') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Antidote spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12008 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exori mort') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Force Strike spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12009 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exani hur') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Levitate spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12010 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exori flam') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Fire Strike spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12011 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exori vis') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Energy Strike spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12012 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'utevo gran lux') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Great Light spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12013 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'utamo vita') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Magic Shield spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12014 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'utani hur') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Haste spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12015 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exura sio') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Heal friend spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12016 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exeta res') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Challenge spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12017 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exura vita') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Ultimate Healing spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12018 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'utani gran hur') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Strong Haste spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12019 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exana ina') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Cancel Invisiblity spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12020 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'utevo vis lux') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Ultimate Light spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12021 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo grav vita') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Wild Growth spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12022 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo gran vis lux') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Great Energy Beam spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12023 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo vis lux') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Energy Beam spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12024 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'utana vid') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Invisible spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12025 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exori') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Berserk spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12026 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exura gran mas res') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Mass Healing spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12027 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo mort hur') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Energy Wave spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12028 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo gran mas pox') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Poison Storm spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12029 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo gran mas vis') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Ultimate Explosion spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12030 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exeta vis') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Enchant Staff spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12031 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo pan') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Create Food spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12032 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevon con') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Conjure Arrow spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12033 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo con pox') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Poison Arrow spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12034 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo con mort') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Conjure Bolt spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12035 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo con flam') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Explosive Arrow spell.') doRemoveItem(item.uid,1) elseif item.actionid == 12036 then doSendMagicEffect(frompos,14) doPlayerLearnSpell(cid, 'exevo con vis') doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have learned Power Bolt spell.') doRemoveItem(item.uid,1)
end return 1 end
|