• 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!

[How To] Create A Custom Vocation and promotion

Collz

Pandas Go RAWR!!!
Joined
Oct 10, 2008
Messages
2,091
Reaction score
57
Location
New York
This tutorial will show you how to make a custom vocation with a promotion.
first off lets start off with the basic code to creating a custom vocation
if you have the updated TFS the vocation id should stop at 12. now there is 2 ways to do this. you can start your vocation with the vocation id=20 IF you dont want it to appear on the account manager so the first line should look like this

PHP:
<vocation id="20" name="custom vocation" description="a custom vocation" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50">
Now if you do want it to appear on the account manager you can do either two things.
1. you can replace the regular vocations with your custom vocation and go through the trouble of changing everything in spells.xml and weapons.xml etc etc. OR
2. to save you the trouble you can switch the ids of the vocations. instead of your custom vocation id being 20 you can lower it down to 1 and raise the sorcerers voc id to 20.
so if you do want your custom vocation to appear on the account manager but want to save your sorc voc it should look like this
PHP:
<vocation id="1" name="custom vocation" description="a custom vocation" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50">
and the sorcerer voc should look like this
PHP:
	<vocation id="20" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="1">

Ok Moving on
lets learn about the codes in this line(needpremium="0" isnt really needed because premium is free. but if you want it to be a premium voc just change the 0 to 1)
PHP:
gaincap="5" gainhp="5" gainmana="5" gainhpticks="6"
these codes right there are what increases when you lvl. if you want to change them just simply add the amount you want it to raise by(but remember you want to keep the vocations balanced)
PHP:
gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5"
these codes right here are for how much fast does your mana and health regenerate and by how much they regenerate
gainhpticks="6" and gainhpamount="5" is how fast the hp regenerates and by how much
gainmanaticks="3" and gainmanaamount="5" is how fast the mana regenerates and by how much
PHP:
attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="1">
now for the rest of the codes on this line...
attack speed is kindof tricky... the lower you put the number the faster you atk and the higher the number the slower you attack and every 1000 is a second.

now for "gainsoulticks" .. that is how fast your soul regenerates

last but not least for "fromvoc" ... this has to do with promotions... if this is the first vocation then leave fromvoc to the vocation id so it should look like this
PHP:
	<vocation id="1" fromvoc="1">
lets say i have to vocations
PHP:
	<vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" 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" armor="1.0"/>
		<skill id="0" multiplier="1.1"/>
		<skill id="1" multiplier="1.1"/>
		<skill id="2" multiplier="1.1"/>
		<skill id="3" multiplier="1.1"/>
		<skill id="4" multiplier="1.4"/>
		<skill id="5" multiplier="1.1"/>
		<skill id="6" multiplier="1.1"/>
and
PHP:
	<vocation id="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="12" lessloss="50">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
		<skill id="0" multiplier="1.1"/>
		<skill id="1" multiplier="1.1"/>
		<skill id="2" multiplier="1.1"/>
		<skill id="3" multiplier="1.1"/>
		<skill id="4" multiplier="1.4"/>
		<skill id="5" multiplier="1.1"/>
		<skill id="6" multiplier="1.1"/>
if the first vocations vocid is 12 then on the promotional vocation the "fromvoc=?" should equal to 12(the first vocations vocid) so it should look like the code above

ok the final thing you need to know about is the skill id and which is which
PHP:
		<skill id="0" multiplier="1.1"/>
		<skill id="1" multiplier="1.1"/>
		<skill id="2" multiplier="1.1"/>
		<skill id="3" multiplier="1.1"/>
		<skill id="4" multiplier="1.4"/>
		<skill id="5" multiplier="1.1"/>
		<skill id="6" multiplier="1.1"/>
ok for starters
Skill id 0 = Fist Fighting
Skill id 1 = Club Fighting
Skill id 2 = Sword Fighting
Skill id 3 = Axe Fighting
Skill id 4 = Distance Fighting
Skill id 5 = Shielding
Skill id 6 = Fishing

ok now for the multipliers... the lower the number the faster the skill trains
Well that is the basics to creating a vocation and promotion

Now to the more advance stuff...making your promotion sellable
Now the easy way is to edit the promotion.lua script
simply copy this code and edit it to suit your needs
PHP:
local node2 = keywordHandler:addKeyword({'epic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 200000 gold coins. Do you want me to epicize you?'})
	node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! You are now epicized.'})
	node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
]]--
There you have it, If this tutorial helped you feel free to reply

All credits goes to Collz.
 
<vocation id="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="12" lessloss="50">

The epic elite knight is fromvoc = 12 or fromvoc = 8 (elite knight)?

thank you
 
Thats for the promotion, so you get promoted fromvoc 8. It's correct.
 
Keep the good work up, I know theres someones out there who will learn from this tutorial :) You deserve some reputation points :)
 
fromvoc=8 is correct.

Example:
Knight ID = 4
Elite Knight ID = 8 (so your promoted fromvoc 4 to voc 8)
Custom ID= 12 (Same thing, your promoted fromvoc 8 to voc 12)
 
collz
you know why the vocation from mage cant use magic when got the high magic level??
when the promotion of master sorc use magic the server down =s
 
Last edited:
collz
you know why the vocation from mage cant use magic when got the high magic level??
when the promotion of master sorc use magic the server down =s
You have to add the custom vocation to all of the movements, and spells.xml.
 
hi guys. which one is magic level? i know
Skill id 0 = Fist Fighting
Skill id 1 = Club Fighting
Skill id 2 = Sword Fighting
Skill id 3 = Axe Fighting
Skill id 4 = Distance Fighting
Skill id 5 = Shielding
Skill id 6 = Fishing

but where is magic?
manamultiplier?



thanks
 
Back
Top