Hello Otland. I need quick help..
I have found that script for learning spell but it seems like it does not work as it should...
even if I write vocation 4 ( KNIGHT ) paladins or mages can still learn the spell for some reasons.. is it possible to fix ? Im using tfs 0.4 + would be nice if it could be edited like so knight and ELITE knight can use that spell
I have found that script for learning spell but it seems like it does not work as it should...
even if I write vocation 4 ( KNIGHT ) paladins or mages can still learn the spell for some reasons.. is it possible to fix ? Im using tfs 0.4 + would be nice if it could be edited like so knight and ELITE knight can use that spell
Lua:
local spell = "death target"
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not getPlayerLearnedInstantSpell(cid, spell) then
doPlayerLearnInstantSpell(cid, spell)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have learned spell " .. spell .. "!")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
elseif getPlayerVocation(cid) ~= 4 then
doCreatureSay(cid, "Only the x vocation can learn this spell.", TALKTYPE_ORANGE_1, nil, cid, getThingPos(cid))
else
doCreatureSay(cid, "You already know this spell!", TALKTYPE_ORANGE_1, nil, cid, getThingPos(cid))
end
return true
end