• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

help vocations.xml

JoSePh15_

Well-Known Member
Joined
Jan 28, 2010
Messages
1,766
Reaction score
59
There is a vocations.xml problem... :(
thats my script
LUA:
<?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="2000" 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="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="20" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" 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.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="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="20" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" 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.0" 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="20" gainmana="15" gainhpticks="4" gainhpamount="5" gainmanaticks="4" gainmanaamount="5" 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.0" 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="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="23" gainmana="10" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" 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.0" 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="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="10" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
		<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="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="10" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
		<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="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="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="30" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
		<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.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="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="33" gainmana="10" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
		<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.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="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="0" gaincap="10" gainhp="15" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="200" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">
		<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="10" name="Epic Elder Druid" description="an epic elder druid" needpremium="0" gaincap="10" gainhp="15" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="200" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50">
		<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="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="11" name="Epic Royal Paladin" description="an epic royal paladin" needpremium="0" gaincap="20" gainhp="35" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="200" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50">
		<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.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="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="40" gainmana="15" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="200" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50">
		<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.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
</vocations>
When someone becomes vocation 9/10/11/12 it works but after he relogs he looses the vocation and go back to the previous vocation.. help please?

I rep++ :wub:

@edit
i am using this promotion action
LUA:
local level = 5000

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) >= level then
		if getPlayerVocation(cid) == 5 then
			if (doPlayerRemoveItem(cid, 9020, 200) == TRUE) then
				doPlayerSetVocation(cid, 9)
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from master sorcerer to epic master sorcerer!")
				doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
			else
				doPlayerSendCancel(cid, "You don't have 200 promotion coins go loot from the bosses!")
				doSendMagicEffect(getThingPos(cid), 2)
			end
		elseif getPlayerVocation(cid) == 6 then
			if (doPlayerRemoveItem(cid, 9020, 200) == TRUE) then
				doPlayerSetVocation(cid, 10)
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from an elder druid to an epic elder druid!")
				doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
			else
				doPlayerSendCancel(cid, "You don't have 200 promotion coins go loot from the bosses!")
				doSendMagicEffect(getThingPos(cid), 2)
			end
		elseif getPlayerVocation(cid) == 7 then
			if (doPlayerRemoveItem(cid, 9020, 200) == TRUE) then
				doPlayerSetVocation(cid, 11)
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from a royal paladin to an epic royal paladin!")
				doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
			else
				doPlayerSendCancel(cid, "You don't have 200 promotion coins go loot from the bosses!")
				doSendMagicEffect(getThingPos(cid), 2)
			end
		elseif getPlayerVocation(cid) == 8 then
			if (doPlayerRemoveItem(cid, 9020, 200) == TRUE) then
				doPlayerSetVocation(cid, 12)
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been promoted from an elite knight to an epic elite knight!")
				doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
			else
				doPlayerSendCancel(cid, "You don't have 200 promotion coins go loot from the bosses!")
				doSendMagicEffect(getThingPos(cid), 2)
			end 
		elseif getPlayerVocation(cid) >= 9 then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are already promoted!")
			doSendMagicEffect(getThingPos(cid), 2)
		elseif getPlayerVocation(cid) <= 4 then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to get the first promotion from The Forgotten King at the shop tp!")
			doSendMagicEffect(getThingPos(cid), 2)
		end
	else 
		doPlayerSendCancel(cid, "You need to be level " .. level .. " before getting this promotion!")
	end
	return TRUE
end
Thanks
 
Last edited:
Dont think it will make any difference, But worth a try..

Try changing the
LUA:
needpremium="0"
For the last vocs.

To
LUA:
needpremium="1"
 
use doPlayerSetPromotionLevel(cid,2)

Instead of doPlayerSetVocation(cid, 9)
LUA:
local level = 5000
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) < level then
		doPlayerSendCancel(cid, "You need to be level " .. level .. " before getting this promotion!")
	return true
	end
	if getPlayerPromotionLevel(cid) >= 1 and getPlayerPromotionLevel(cid) < 2 then
	  if doPlayerRemoveItem(cid, 9020, 200) then
	        doPlayerSetPromotionLevel(cid,2)
            doPlayerSendTextMessage(cid,21,"You got second pormotion.")
	  else
   	     doPlayerSendCancel(cid, "you need 200 "..getItemNameById(9020).." to get second promotion.")
	  end
	else
	  doPlayerSendCancel(cid,getPlayerPromotionLevel(cid) < 1 and "You need to get first promotion first." or "You already got second promotion.")
	end

	return TRUE
end
 
Last edited:
Back
Top