local m,p,l,s = -300,300,25,5-- [1] manacost, use negative. [2] manacost, positive. (needed for formula), [3] = level, [4] soul
function onSay(cid,words,param)
local voc,tmp,pos = getPlayerVocation(cid),getCreatureOutfit(cid),getThingPos(cid)
if getPlayerLevel(cid) >= l then
if getCreatureMana(cid) >= (m+(p*2)) then
if voc == 1 then
if getPlayerSoul(cid) >= s then
doPlayerAddSoul(cid,(s-(s*2)))
doCreatureAddMana(cid,m)
doPlayerSetVocation(cid,2)
doPlayerSendTextMessage(cid,MESSAGE_FIRST,'You are now a '..voc..'!')
tmp.Looktype = 50
doCreatureChangeOufit(cid,tmp)
for x=-1,1 do
for y=-1,1 do
for i = 5,15 do
doSendMagicEffect({x=pos.x+x,y=pos.y+y,z=pos.z},i)
end
end
end
else
doPlayerSendCancel(cid,'You have too less soul.')
doSendMagicEffect(pos,CONST_ME_POFF)
end
else
doPlayerSendCancel(cid,'You\'re vocation can\'t use this spell.')
doSendMagicEffect(pos,CONST_ME_POFF)
end
else
doPlayerSendCancel(cid,'You don\'t have enough mana.')
doSendMagicEffect(pos,CONST_ME_POFF)
end
else
doPlayerSendCancel(cid,'You\'re level is too low.')
doSendMagicEffect(pos,CONST_ME_POFF)
end
return true
end