-- Created By Avalock
function onUse(cid, item, fromPosition, itemEx, toPosition)
local soul = 10 -- Edit to amount gained by using soul orb.
local playerVoc = getPlayerVocation(cid)
if getPlayerSoul(cid) == 200 and playerVoc == 5 or playerVoc == 6 or playerVoc == 7 or playerVoc == 8 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You already have max soul!")
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
elseif getPlayerSoul(cid) == 100 and playerVoc == 1 or playerVoc == 2 or playerVoc == 3 or playerVoc == 4 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You already have max soul!")
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
else
doPlayerAddSoul(cid, soul)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have gained "..soul.." soul points!")
doSendMagicEffect(getThingPos(cid), CONST_ME_HEARTS)
doChangeTypeItem(item.uid, item.type - 1)
end
return 1
end