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

TFS 0.X How to make 2 promotes possibles?

sabodden

Member
Joined
Sep 27, 2019
Messages
138
Reaction score
18
You a knight can be promoted to Paladin or Barbarian

How to do it?

Knight
Code:
   <vocation id="1" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="1" gainmanaticks="2" gainmanaamount="1" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="5" 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="5.0" club="1.1" sword="1.1" axe="1.1" distance="5.0" shielding="1.1" fishing="1.1" experience="1.0"/>
   </vocation>


knight promotes
Code:
   <vocation id="4" name="Paladin" description="a knight paladin" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="1" gainmanaticks="2" gainmanaamount="1" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="5" fromvoc="1">
     <formula meleeDamage="0.8" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.2" defense="1.2" magDefense="1.0" armor="1.2"/>
     <skill fist="5.0" club="1.1" sword="1.1" axe="1.1" distance="5.0" shielding="1.1" fishing="1.1" experience="1.0"/>
   </vocation>
   <vocation id="5" name="Barbarian" description="a knight barbarian" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="1" gainmanaticks="2" gainmanaamount="1" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="5" fromvoc="1">
     <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.0" defense="0.6" magDefense="0.8" armor="1.0"/>
     <skill fist="5.0" club="1.1" sword="1.1" axe="1.1" distance="5.0" shielding="1.1" fishing="1.1" experience="1.0"/>
   </vocation>


I tried:
Code:
doPlayerSetVocation(cid, 5)

But when i relog, i back to Knight

So i tried:

Code:
doPlayerSetPromotionLevel(cid, 1)
doPlayerSetVocation(cid, 5)

And when i relog i become a Paladin (vocation 4 instead of 5)
 
Solution
what should i do?
give up the fromvoc="1"?
and use fromvoc="4" on vocation 4, fromvoc="5" on vocation 5?
Correct.

A promotion is a promotion in terms of the players point of view.

However on the scripters side..

You can either do a promotion
doPlayerSetPromotionLevel
knight -> elite knight - fromVoc="1"

or

You can do a class change
doPlayerSetVocation
knight -> elite knight / barbarian - fromVoc="4"/fromVoc="5"
what should i do?
give up the fromvoc="1"?
and use fromvoc="4" on vocation 4, fromvoc="5" on vocation 5?
Correct.

A promotion is a promotion in terms of the players point of view.

However on the scripters side..

You can either do a promotion
doPlayerSetPromotionLevel
knight -> elite knight - fromVoc="1"

or

You can do a class change
doPlayerSetVocation
knight -> elite knight / barbarian - fromVoc="4"/fromVoc="5"
 
Solution
Correct.

A promotion is a promotion in terms of the players point of view.

However on the scripters side..

You can either do a promotion
doPlayerSetPromotionLevel
knight -> elite knight - fromVoc="1"

or

You can do a class change
doPlayerSetVocation
knight -> elite knight / barbarian - fromVoc="4"/fromVoc="5"

ok then, thanks ;)
 
Back
Top