Odp: Nauka czaru z papieru
W spells.xml (Musisz zmienic needlearn=1):
<instant name="Rage of the Skies" words="exevo gran mas vis" lvl="55" mana="650" selftarget="1" prem="1" exhaustion="2000" needlearn="1" event="script" value="attack/rage of the skies.lua">
Do actions.xml dopisz:
<action itemid="7846" event="script" value="NaukaCzaru1.lua" />
w actions/scripts stworz plik:
NaukaCzaru1.lua
a w nim:
[lua]
function onUse(cid, item, fromPosition, itemEx, toPosition)
local spellname = "NAZWA_CZARU"
if(getPlayerLearnedInstantSpell(cid,spellname)) == 1 then
doPlayerSendTextMessage(cid,18 , "Ty juz znasz ten czar.")
doSendMagicEffect(getCreaturePosition(cid), 2)
else
playerLearnInstantSpell(cid,spellname)
doPlayerSendTextMessage(cid, 18, 'Quest Zakonczony. | Wlasnie nauczyles sie nowego czaru "NAZWA_CZARU"!.')
doSendMagicEffect(getCreaturePosition(cid), 6)
end
return true
end
[/lua]