• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

No Vocation

DedicatedOT

New Member
Joined
Jun 13, 2009
Messages
977
Reaction score
4
Location
USA
Well, this is really odd, but how come there's a few players that, according to phpMyAdmin have a vocation that is correct, but in game when you right click their names, it shows that they have no vocation?

How is this possible? And when they attack something, it crashes the server...
 
Alright, in your server do you use custom vocations / second promotions? Do you use a premium account system ingame, if so when 2nd / custom vocations loose premium they can sometimes be sent back to an old vocation such as 'fromvoc="x"' You need to set the from voc the same as the vocation, if your using full custom vocations. So voc 1 comes from voc 1, 2 comes from 2, and so on
 
Updates: Check whole post.
Okay so i changed what you asked me to, now it promotes them but if they log off, it resets them back to the first promotions.
Example: When a Shadow Rouge logs off it changes him back to rogue.
When i use the script it says "You are ." When i try to look at my vocation.
I use custom vocations, not the super vocations. They are promoted by a talkaction.
Here is my vocations.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
	<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="1" name="Mage" description="a mage" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="1">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="2" name="Priest" description="a priest" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="2">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="75" gainmanaticks="4" gainmanaamount="75" manamultiplier="1.4" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="3">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="4" name="Warrior" description="a warrior" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="100" gainmanaticks="6" gainmanaamount="50" manamultiplier="3.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="4">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="5" name="Undead Mage" description="an undead mage" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="6" name="Unholy Priest" description="an unholy priest" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="7" name="Blood Elf Paladin" description="a blood elf paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="150" gainmanaticks="3" gainmanaamount="150" manamultiplier="1.4" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="8" name="Death Knight" description="a death knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="200" gainmanaticks="4" gainmanaamount="100" manamultiplier="3.0" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="9" name="Rogue" description="a rogue" needpremium="0" gaincap="15" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="75" gainmanaticks="4" gainmanaamount="75" manamultiplier="1.4" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="9">
		<formula meleeDamage="0.8" distDamage="0.8" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="10" name="Jugger" description="a jugger" needpremium="0" gaincap="30" gainhp="20" gainmana="3" gainhpticks="3" gainhpamount="100" gainmanaticks="6" gainmanaamount="50" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="10">
		<formula meleeDamage="2.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="11" name="Shadow Rogue" description="a shadow rogue" needpremium="1" gaincap="15" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="150" gainmanaticks="4" gainmanaamount="150" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="9" lessloss="30">
		<formula meleeDamage="0.8" distDamage="0.8" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="12" name="Juggernaut" description="a juggernaut" needpremium="1" gaincap="30" gainhp="20" gainmana="3" gainhpticks="2" gainhpamount="200" gainmanaticks="4" gainmanaamount="100" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="10" lessloss="30">
		<formula meleeDamage="2.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="13" name="Necro" description="a necro" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="13">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="14" name="Necromancer" description="a necromancer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="13" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="15" name="Apocalypse" description="an apocalypse" needpremium="0" gaincap="25" gainhp="25" gainmana="30" gainhpticks="2" gainhpamount="200" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="15" lessloss="30">
		<formula meleeDamage="2.0" distDamage="1.0" wandDamage="2.0" magDamage="2.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
</vocations>
Here is my promotion script
Code:
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


Updated:
So now i changed my stuff to...
Vocations.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
	<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="1" name="Mage" description="a mage" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="1">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="2" name="Priest" description="a priest" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="2">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="75" gainmanaticks="4" gainmanaamount="75" manamultiplier="1.4" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="3">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="4" name="Warrior" description="a warrior" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="100" gainmanaticks="6" gainmanaamount="50" manamultiplier="3.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="4">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="5" name="Undead Mage" description="an undead mage" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="6" name="Unholy Priest" description="an unholy priest" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.1" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="7" name="Blood Elf Paladin" description="a blood elf paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="150" gainmanaticks="3" gainmanaamount="150" manamultiplier="1.4" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="8" name="Death Knight" description="a death knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="200" gainmanaticks="4" gainmanaamount="100" manamultiplier="3.0" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="9" name="Rogue" description="a rogue" needpremium="0" gaincap="15" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="75" gainmanaticks="4" gainmanaamount="75" manamultiplier="1.4" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="9">
		<formula meleeDamage="0.8" distDamage="0.8" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="10" name="Jugger" description="a jugger" needpremium="0" gaincap="30" gainhp="20" gainmana="3" gainhpticks="3" gainhpamount="100" gainmanaticks="6" gainmanaamount="50" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="10">
		<formula meleeDamage="2.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="11" name="Shadow Rogue" description="a shadow rogue" needpremium="1" gaincap="15" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="150" gainmanaticks="4" gainmanaamount="150" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="11" lessloss="30">
		<formula meleeDamage="0.8" distDamage="0.8" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="12" name="Juggernaut" description="a juggernaut" needpremium="1" gaincap="30" gainhp="20" gainmana="3" gainhpticks="2" gainhpamount="200" gainmanaticks="4" gainmanaamount="100" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="12" lessloss="30">
		<formula meleeDamage="2.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="13" name="Necro" description="a necro" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="50" gainmanaticks="3" gainmanaamount="100" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="13">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="14" name="Necromancer" description="a necromancer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="100" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="14" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="15" name="Apocalypse" description="an apocalypse" needpremium="0" gaincap="25" gainhp="25" gainmana="30" gainhpticks="2" gainhpamount="200" gainmanaticks="2" gainmanaamount="200" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="15" lessloss="30">
		<formula meleeDamage="2.0" distDamage="1.0" wandDamage="2.0" magDamage="2.0" magHealingDamage="1.3" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
</vocations>
Promotion Script
Code:
function onSay(cid, words, param)
local vocation = getPlayerVocation(cid)
	if vocation == 1 then
        	if getPlayerLevel(cid) >= 20 then
			if doPlayerRemoveMoney(cid,20000) == TRUE then
				doPlayerSetVocation(cid, 5)
				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
				doPlayerSetVocation(cid, 6)
				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
				doPlayerSetVocation(cid, 7)
				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
				doPlayerSetVocation(cid, 8)
				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
				doPlayerSetVocation(cid, 11)
				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
				doPlayerSetVocation(cid, 12)
				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
				doPlayerSetVocation(cid, 14)
				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
 
Last edited:
Back
Top