function onSay(cid, words, param)
local vocation = getPlayerVocation(cid)
if vocation == 1 then
if getPlayerLevel(cid) >= 20 then
if doPlayerRemoveMoney(cid,20000) == TRUE then
setPlayerPromotionLevel(cid, 2)
doSendMagicEffect(getPlayerPosition(cid),41)
doSendAnimatedText(position, "You have been promoted to an Undead Mage",49)
else
doPlayerSendCancel(cid,"You do not have enough money!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
else
doPlayerSendCancel(cid,"You are not a high enough level!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
elseif vocation == 2 then
if getPlayerLevel(cid) >= 20 then
if doPlayerRemoveMoney(cid,20000) == TRUE then
setPlayerPromotionLevel(cid, 2)
doSendMagicEffect(getPlayerPosition(cid),41)
doSendAnimatedText(position, "You have been promoted to an Unholy Priest",49)
else
doPlayerSendCancel(cid,"You do not have enough money!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
else
doPlayerSendCancel(cid,"You are not a high enough level!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
elseif vocation == 3 then
if getPlayerLevel(cid) >= 20 then
if doPlayerRemoveMoney(cid,20000) == TRUE then
setPlayerPromotionLevel(cid, 2)
doSendMagicEffect(getPlayerPosition(cid),41)
doSendAnimatedText(position, "You have been promoted to a Blood Elf Paladin",49)
else
doPlayerSendCancel(cid,"You do not have enough money!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
else
doPlayerSendCancel(cid,"You are not a high enough level!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
elseif vocation == 4 then
if getPlayerLevel(cid) >= 20 then
if doPlayerRemoveMoney(cid,20000) == TRUE then
setPlayerPromotionLevel(cid, 2)
doSendMagicEffect(getPlayerPosition(cid),41)
doSendAnimatedText(position, "You have been promoted to a Death Knight",49)
else
doPlayerSendCancel(cid,"You do not have enough money!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
else
doPlayerSendCancel(cid,"You are not a high enough level!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
elseif vocation == 9 then
if getPlayerLevel(cid) >= 20 then
if doPlayerRemoveMoney(cid,20000) == TRUE then
setPlayerPromotionLevel(cid, 2)
doSendMagicEffect(getPlayerPosition(cid),41)
doSendAnimatedText(position, "You have been promoted to a Shadow Rogue",49)
else
doPlayerSendCancel(cid,"You do not have enough money!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
else
doPlayerSendCancel(cid,"You are not a high enough level!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
elseif vocation == 10 then
if getPlayerLevel(cid) >= 20 then
if doPlayerRemoveMoney(cid,20000) == TRUE then
setPlayerPromotionLevel(cid, 2)
doSendMagicEffect(getPlayerPosition(cid),41)
doSendAnimatedText(position, "You have been promoted to a Juggernaut",49)
else
doPlayerSendCancel(cid,"You do not have enough money!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
else
doPlayerSendCancel(cid,"You are not a high enough level!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
elseif vocation == 13 then
if getPlayerLevel(cid) >= 20 then
if doPlayerRemoveMoney(cid,20000) == TRUE then
setPlayerPromotionLevel(cid, 2)
doSendMagicEffect(getPlayerPosition(cid),41)
doSendAnimatedText(position, "You have been promoted to a Necromancer",49)
else
doPlayerSendCancel(cid,"You do not have enough money!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
else
doPlayerSendCancel(cid,"You are not a high enough level!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
else
doPlayerSendCancel(cid,"You are already promoted!")
doSendMagicEffect(getPlayerPosition(cid),2)
end
return 1
end