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

Bug/Problem with vocation login logout 0.3.6Pl1

Matians

New Member
Joined
Dec 5, 2010
Messages
40
Reaction score
1
Hello everybody y have a problem, i create a new vocations, the name of vocations have the name of Game DBZ :D, Ok, my problem is, if i die or i logout, and login my vocation change to 0 (No-Vocation)

Any can help me?

Plis, thanx all :D

Vocation.xml (i never usare te function doPlayerSerPromotionLevel)
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="2" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="1" attackable="no" droploot="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="Martial Artist" description="a human martial artist" needpremium="0" gaincap="70" gainhp="75" gainmana="39" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" attackspeed="1500" soulmax="200" gainsoulticks="120" fromvoc="" droploot="yes">
      <formula meleeDamage="10.0" distDamage="5.0" wandDamage="1.0" magDamage="5.0" magHealingDamage="2.0" defense="10.0" magDefense="6.0" armor="15.0"/>
      <skill fist="2.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="2.5" fishing="2.1" experience="1.5"/>
   </vocation>
   <vocation id="2" name="Spiritualist" description="a human spiritualist" needpremium="0" gaincap="70" gainhp="60" gainmana="90" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="15" manamultiplier="2.1" attackspeed="2000" soulmax="200" gainsoulticks="120" fromvoc="" droploot="yes">
      <formula meleeDamage="3.0" distDamage="1.0" wandDamage="10.0" magDamage="10.0" magHealingDamage="5.0" defense="10.0" magDefense="10.0" armor="10.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.5"/>
   </vocation>
   <vocation id="3" name="Dragon Clan" description="a namek dragon clan" needpremium="0" gaincap="20" gainhp="79" gainmana="101" gainhpticks="8" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="4.1" attackspeed="2000" soulmax="500" gainsoulticks="10" fromvoc="" droploot="yes">
      <formula meleeDamage="3.0" distDamage="1.0" wandDamage="6.0" magDamage="5.0" magHealingDamage="12.7" defense="10.0" magDefense="10.0" armor="1.0"/>
      <skill fist="3.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="4" name="Warrior" description="a namek warrior" needpremium="0" gaincap="40" gainhp="113" gainmana="78" gainhpticks="6" gainhpamount="5" gainmanaticks="6" gainmanaamount="2" manamultiplier="1.5" attackspeed="1700" soulmax="300" gainsoulticks="120" fromvoc="" droploot="yes">
      <formula meleeDamage="8.0" distDamage="15.0" wandDamage="1.0" magDamage="15.0" magHealingDamage="1.0" defense="15.0" magDefense="15.0" armor="15.0"/>
      <skill fist="20.1" club="1.1" sword="5.1" axe="1.1" distance="1.4" shielding="5.1" fishing="2.1" experience="1.5"/>
   </vocation>
    <vocation id="5" name="Wonder Majin" description="a wonder majin" needpremium="0" gaincap="20" gainhp="80" gainmana="95" gainhpticks="8" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="4.1" attackspeed="2000" soulmax="500" gainsoulticks="10" fromvoc="" droploot="yes">
      <formula meleeDamage="4.0" distDamage="1.0" wandDamage="9.0" magDamage="10.0" magHealingDamage="10.0" defense="10.0" magDefense="10.5" armor="4.5"/>
      <skill fist="3.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="6" name="Mighty Majin" description="a magin mighty" needpremium="0" gaincap="20" gainhp="96" gainmana="72" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="2.5" attackspeed="1500" soulmax="300" gainsoulticks="120" fromvoc="" droploot="yes">
      <formula meleeDamage="15.0" distDamage="1.0" wandDamage="1.0" magDamage="6.0" magHealingDamage="7.0" defense="10.0" magDefense="15.0" armor="10.0"/>
      <skill fist="20.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="7" name="Ssj Martial Artist" description="a human super martial artist" needpremium="0" gaincap="30" gainhp="75" gainmana="39" gainhpticks="15" gainhpamount="200" gainmanaticks="3" gainmanaamount="19" manamultiplier="2.0" attackspeed="1000" soulmax="400" gainsoulticks="60" fromvoc="1" droploot="yes">
      <formula meleeDamage="14.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="14.0" magDefense="1.0" armor="19.0"/>
      <skill fist="2.0" club="2.5" sword="2.0" axe="2.0" distance="2.0" shielding="2.5" fishing="2.2" experience="1.5"/>
   </vocation>
   <vocation id="8" name="Ssj Spiritualist" description="a human super spiritualist" needpremium="0" gaincap="70" gainhp="55" gainmana="90" gainhpticks="8" gainhpamount="80" gainmanaticks="3" gainmanaamount="55" manamultiplier="3.5" attackspeed="1500" soulmax="400" gainsoulticks="100" fromvoc="2" droploot="yes">
      <formula meleeDamage="6.0" distDamage="1.5" wandDamage="14.0" magDamage="14.0" magHealingDamage="7.0" defense="14.0" magDefense="14.0" armor="15.0"/>
      <skill fist="1.5" club="1.5" sword="1.0" axe="1.0" distance="1.0" shielding="2.0" fishing="2.2" experience="1.5"/>
   </vocation>
   <vocation id="9" name="Gigant Dragon Clan" description="a gigant namek dragon clan" needpremium="0" gaincap="20" gainhp="85" gainmana="100" gainhpticks="3" gainhpamount="30" gainmanaticks="2" gainmanaamount="20" manamultiplier="4.6" attackspeed="3000" soulmax="500" gainsoulticks="100" fromvoc="3" droploot="yes">
      <formula meleeDamage="150.0" distDamage="2.0" wandDamage="150.5" magDamage="50.5" magHealingDamage="1.5" defense="50.0" magDefense="50.6" armor="30.0"/>
      <skill fist="20.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="10" name="Gigant Warrior" description="a gigant namek warrior" needpremium="0" gaincap="40" gainhp="210" gainmana="110" gainhpticks="6" gainhpamount="35" gainmanaticks="6" gainmanaamount="20" manamultiplier="3.0" attackspeed="3000" soulmax="300" gainsoulticks="100" fromvoc="4" droploot="yes">
      <formula meleeDamage="150.0" distDamage="1.0" wandDamage="1.0" magDamage="150.0" magHealingDamage="1.0" defense="4000.0" magDefense="160.0" armor="1.0"/>
      <skill fist="20.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="11" name="Kid Wonder Majin" description="a wonder kid buu" needpremium="0" gaincap="20" gainhp="100" gainmana="180" gainhpticks="8" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="4.1" attackspeed="2000" soulmax="500" gainsoulticks="10" fromvoc="5" droploot="yes">
      <formula meleeDamage="1.0" distDamage="1.0" wandDamage="6.0" magDamage="50.0" magHealingDamage="1.0" defense="30.0" magDefense="30.0" armor="10.0"/>
      <skill fist="3.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="12" name="Kid Mighty Majin" description="a mighty kid buu" needpremium="0" gaincap="40" gainhp="210" gainmana="110" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" soulmax="300" gainsoulticks="120" fromvoc="6" droploot="yes">
      <formula meleeDamage="15.0" distDamage="1.0" wandDamage="1.0" magDamage="15.0" magHealingDamage="1.0" defense="40.0" magDefense="16.0" armor="30.0"/>
      <skill fist="20.1" club="1.1" sword="5.1" axe="1.1" distance="1.4" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="13" name="Fighter" description="a human fighter" needpremium="0" gaincap="70" gainhp="95" gainmana="45" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="25" manamultiplier="1.5" attackspeed="1005" soulmax="200" gainsoulticks="100" fromvoc="7" droploot="yes">
      <formula meleeDamage="21.5" distDamage="15.0" wandDamage="1.0" magDamage="15.0" magHealingDamage="1.0" defense="24.0" magDefense="6.0" armor="24.0"/>
      <skill fist="3.5" club="5.5" sword="1.0" axe="1.0" distance="1.0" shielding="4.0" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="14" name="Swordman" description="a swordman" needpremium="0" gaincap="30" gainhp="79" gainmana="68" gainhpticks="12" gainhpamount="100" gainmanaticks="3" gainmanaamount="15" manamultiplier="1.1" attackspeed="1500" soulmax="400" gainsoulticks="120" fromvoc="7" droploot="yes">
      <formula meleeDamage="27.0" distDamage="15.0" wandDamage="1.0" magDamage="15.0" magHealingDamage="1.0" defense="20.0" magDefense="7.0" armor="20.0"/>
      <skill fist="4.0" club="1.5" sword="5.5" axe="1.0" distance="1.0" shielding="2.5" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="15" name="Hermit Turtle" description="a turtle hermit" needpremium="0" gaincap="70" gainhp="60" gainmana="95" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="15" manamultiplier="2.1" attackspeed="2000" soulmax="200" gainsoulticks="120" fromvoc="8" droploot="yes">
      <formula meleeDamage="3.0" distDamage="1.0" wandDamage="20.0" magDamage="30.0" magHealingDamage="1.0" defense="10.0" magDefense="30.0" armor="10.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.5"/>
   </vocation>
   <vocation id="16" name="Crane Hermit" description="a crane hermit" needpremium="0" gaincap="70" gainhp="75" gainmana="85" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="15" manamultiplier="2.1" attackspeed="2000" soulmax="200" gainsoulticks="120" fromvoc="8" droploot="yes">
      <formula meleeDamage="3.0" distDamage="1.0" wandDamage="30.0" magDamage="30.0" magHealingDamage="1.0" defense="10.0" magDefense="30.0" armor="10.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.5"/>
   </vocation>
   <vocation id="17" name="Dende Healer" description="a dende healer" needpremium="0" gaincap="20" gainhp="67" gainmana="115" gainhpticks="8" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="4.1" attackspeed="2000" soulmax="500" gainsoulticks="10" fromvoc="9" droploot="yes">
      <formula meleeDamage="3.0" distDamage="1.0" wandDamage="10.0" magDamage="10.0" magHealingDamage="1.0" defense="15.0" magDefense="20.0" armor="15.0"/>
      <skill fist="3.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="18" name="Dende Summoner" description="a dende summoner" needpremium="0" gaincap="20" gainhp="90" gainmana="75" gainhpticks="8" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="4.1" attackspeed="2000" soulmax="500" gainsoulticks="10" fromvoc="9" droploot="yes">
      <formula meleeDamage="4.0" distDamage="1.0" wandDamage="15.0" magDamage="15.0" magHealingDamage="1.0" defense="20.0" magDefense="17.8" armor="17.7"/>
      <skill fist="3.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="19" name="Dark Warrior" description="a namek dark warrior" needpremium="0" gaincap="40" gainhp="120" gainmana="71" gainhpticks="6" gainhpamount="11" gainmanaticks="6" gainmanaamount="10" manamultiplier="2.0" attackspeed="1500" soulmax="400" gainsoulticks="120" fromvoc="10" droploot="yes">
      <formula meleeDamage="18.0" distDamage="5.0" wandDamage="1.0" magDamage="15.9" magHealingDamage="1.0" defense="20.5" magDefense="20.8" armor="20.0"/>
      <skill fist="6.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="6.1" fishing="5.1" experience="1.5"/>
   </vocation>
   <vocation id="20" name="Shadow Knight" description="a namek shadow knight" needpremium="0" gaincap="40" gainhp="90" gainmana="83" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="1700" soulmax="400" gainsoulticks="120" fromvoc="10" droploot="yes">
      <formula meleeDamage="20.0" distDamage="5.0" wandDamage="1.0" magDamage="23.5" magHealingDamage="1.0" defense="15.7" magDefense="15.8" armor="15.0"/>
      <skill fist="2.1" club="1.1" sword="1.1" axe="5.1" distance="1.4" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="25" name="Ssj Fighter" description="a human super fighter" needpremium="0" gaincap="70" gainhp="95" gainmana="45" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="25" manamultiplier="1.5" attackspeed="1005" soulmax="200" gainsoulticks="100" fromvoc="13" droploot="yes">
      <formula meleeDamage="27.9" distDamage="15.0" wandDamage="1.0" magDamage="15.0" magHealingDamage="1.0" defense="24.0" magDefense="6.0" armor="24.0"/>
      <skill fist="4.5" club="7.9" sword="1.0" axe="1.0" distance="1.0" shielding="4.0" fishing="1.1" experience="1.5"/>
   </vocation>
</vocations>

And my script for change the vocation.
Talkaction.xml
Changevocation.lua
Lua:
function onSay(cid, words, param)
   
   local postac1 = { -- human
   [1] = {0,1,2,3,4,5,6,7,8,9,10,1,12,13,14,15,16,17,18,19,20}, -- Klass ID
   [2] = {138,420,138,420,138,420,138,420,138,420,138,420,138,420,138,420,138,420,138,420,70}, -- Skin ID
   [3] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}} -- Level NEED

   local postac2 = { --namek
   [1] = {90,30}, -- Klass ID
   [2] = {371,370}, -- Skin ID
   [3] = {0,0}} -- Level NEED
   
   local postac3 = { --renji
   [1] = {100,40}, -- Klass ID
   [2] = {373,377}, -- Skin ID
   [3] = {0,0}} -- Level NEED
   
   local postac4 = { --toushiro
   [1] = {110,50}, -- Klass ID
   [2] = {6,302}, -- Skin ID
   [3] = {0,0}} -- Level NEED
   
   local postac5 = { --zaraki
   [1] = {120,60}, -- Klass ID
   [2] = {5,6}, -- Skin ID
   [3] = {0,0}} -- Level NEED
   
   local postac6 = { --nell
   [1] = {28,29,30,31,32,33}, -- Klass ID
   [2] = {37,194,33,262,216,160}, -- Skin ID
   [3] = {0,50,120,175,275,350}} -- Level NEED

   local postac7 = { --uluq
   [1] = {34,35,36,37,38,39}, -- Klass ID
   [2] = {103,116,220,219,250,9}, -- Skin ID
   [3] = {0,50,120,175,275,350}} -- Level NEED
   
   local postac8 = { --byakuya
   [1] = {40,41,42,43,44,45}, -- Klass ID
   [2] = {30,289,94,11,119,67}, -- Skin ID
   [3] = {0,50,120,175,275,350}} -- Level NEED
   
   local postac9 = { --ishida
   [1] = {46,47,48,49,50,51}, -- Klass ID
   [2] = {332,329,331,326,327,330}, -- Skin ID
   [3] = {0,50,120,175,275,350}} -- Level NEED
   
   local postac10 = { -- human
   [1] = {80,20}, -- Klass ID
   [2] = {70,420}, -- Skin ID
   [3] = {1,1}} -- Level NEED
   
   transform(cid, postac1)
   transform(cid, postac2)
   transform(cid, postac3)
   transform(cid, postac4)
   transform(cid, postac5)
   transform(cid, postac6)
   transform(cid, postac7)
   transform(cid, postac8)
   transform(cid, postac9)
   transform(cid, postac10)
   
   
   
   return true
   end
   
   
   
   
       function transform(cid, parameter, var)
           for i = 1, #parameter[1] do
               if i >= #parameter[1] then
                   elseif getPlayerLevel(cid) < parameter[3][i+1] and getPlayerVocation(cid) == parameter[1][i] then
                           doPlayerSendCancel(cid, "Required level is ".. parameter[3][i+1] .." to transform!")
                   elseif getPlayerLevel(cid) >= parameter[3][#parameter[3]] and getPlayerVocation(cid) == parameter[1][#parameter[1]] then
                           doPlayerSendCancel(cid, "It's u last transform.")
                elseif getPlayerVocation(cid) == parameter[1][i] and getPlayerLevel(cid) >= parameter[3][i+1] then
                           doPlayerSetVocation(cid, parameter[1][i+1])
                           local outfit = {lookType=parameter[2][i+1], lookHead=124, lookAddons=1, lookLegs=45, lookBody=1, lookFeet=87}
                           doCreatureChangeOutfit(cid, outfit)
                           doSendMagicEffect(getCreaturePosition(cid), 3)
                        doPlayerSendCancel(cid, "Transform Success.")
                          
                    return true
                   end
               end
           end
 
Hello everybody y have a problem, i create a new vocations, the name of vocations have the name of Game DBZ :D, Ok, my problem is, if i die or i logout, and login my vocation change to 0 (No-Vocation)

Any can help me?

Plis, thanx all :D

Vocation.xml (i never usare te function doPlayerSerPromotionLevel)
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="2" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="1" attackable="no" droploot="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="Martial Artist" description="a human martial artist" needpremium="0" gaincap="70" gainhp="75" gainmana="39" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" attackspeed="1500" soulmax="200" gainsoulticks="120" fromvoc="" droploot="yes">
      <formula meleeDamage="10.0" distDamage="5.0" wandDamage="1.0" magDamage="5.0" magHealingDamage="2.0" defense="10.0" magDefense="6.0" armor="15.0"/>
      <skill fist="2.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="2.5" fishing="2.1" experience="1.5"/>
   </vocation>
   <vocation id="2" name="Spiritualist" description="a human spiritualist" needpremium="0" gaincap="70" gainhp="60" gainmana="90" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="15" manamultiplier="2.1" attackspeed="2000" soulmax="200" gainsoulticks="120" fromvoc="" droploot="yes">
      <formula meleeDamage="3.0" distDamage="1.0" wandDamage="10.0" magDamage="10.0" magHealingDamage="5.0" defense="10.0" magDefense="10.0" armor="10.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.5"/>
   </vocation>
   <vocation id="3" name="Dragon Clan" description="a namek dragon clan" needpremium="0" gaincap="20" gainhp="79" gainmana="101" gainhpticks="8" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="4.1" attackspeed="2000" soulmax="500" gainsoulticks="10" fromvoc="" droploot="yes">
      <formula meleeDamage="3.0" distDamage="1.0" wandDamage="6.0" magDamage="5.0" magHealingDamage="12.7" defense="10.0" magDefense="10.0" armor="1.0"/>
      <skill fist="3.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="4" name="Warrior" description="a namek warrior" needpremium="0" gaincap="40" gainhp="113" gainmana="78" gainhpticks="6" gainhpamount="5" gainmanaticks="6" gainmanaamount="2" manamultiplier="1.5" attackspeed="1700" soulmax="300" gainsoulticks="120" fromvoc="" droploot="yes">
      <formula meleeDamage="8.0" distDamage="15.0" wandDamage="1.0" magDamage="15.0" magHealingDamage="1.0" defense="15.0" magDefense="15.0" armor="15.0"/>
      <skill fist="20.1" club="1.1" sword="5.1" axe="1.1" distance="1.4" shielding="5.1" fishing="2.1" experience="1.5"/>
   </vocation>
    <vocation id="5" name="Wonder Majin" description="a wonder majin" needpremium="0" gaincap="20" gainhp="80" gainmana="95" gainhpticks="8" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="4.1" attackspeed="2000" soulmax="500" gainsoulticks="10" fromvoc="" droploot="yes">
      <formula meleeDamage="4.0" distDamage="1.0" wandDamage="9.0" magDamage="10.0" magHealingDamage="10.0" defense="10.0" magDefense="10.5" armor="4.5"/>
      <skill fist="3.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="6" name="Mighty Majin" description="a magin mighty" needpremium="0" gaincap="20" gainhp="96" gainmana="72" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="2.5" attackspeed="1500" soulmax="300" gainsoulticks="120" fromvoc="" droploot="yes">
      <formula meleeDamage="15.0" distDamage="1.0" wandDamage="1.0" magDamage="6.0" magHealingDamage="7.0" defense="10.0" magDefense="15.0" armor="10.0"/>
      <skill fist="20.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="7" name="Ssj Martial Artist" description="a human super martial artist" needpremium="0" gaincap="30" gainhp="75" gainmana="39" gainhpticks="15" gainhpamount="200" gainmanaticks="3" gainmanaamount="19" manamultiplier="2.0" attackspeed="1000" soulmax="400" gainsoulticks="60" fromvoc="1" droploot="yes">
      <formula meleeDamage="14.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="14.0" magDefense="1.0" armor="19.0"/>
      <skill fist="2.0" club="2.5" sword="2.0" axe="2.0" distance="2.0" shielding="2.5" fishing="2.2" experience="1.5"/>
   </vocation>
   <vocation id="8" name="Ssj Spiritualist" description="a human super spiritualist" needpremium="0" gaincap="70" gainhp="55" gainmana="90" gainhpticks="8" gainhpamount="80" gainmanaticks="3" gainmanaamount="55" manamultiplier="3.5" attackspeed="1500" soulmax="400" gainsoulticks="100" fromvoc="2" droploot="yes">
      <formula meleeDamage="6.0" distDamage="1.5" wandDamage="14.0" magDamage="14.0" magHealingDamage="7.0" defense="14.0" magDefense="14.0" armor="15.0"/>
      <skill fist="1.5" club="1.5" sword="1.0" axe="1.0" distance="1.0" shielding="2.0" fishing="2.2" experience="1.5"/>
   </vocation>
   <vocation id="9" name="Gigant Dragon Clan" description="a gigant namek dragon clan" needpremium="0" gaincap="20" gainhp="85" gainmana="100" gainhpticks="3" gainhpamount="30" gainmanaticks="2" gainmanaamount="20" manamultiplier="4.6" attackspeed="3000" soulmax="500" gainsoulticks="100" fromvoc="3" droploot="yes">
      <formula meleeDamage="150.0" distDamage="2.0" wandDamage="150.5" magDamage="50.5" magHealingDamage="1.5" defense="50.0" magDefense="50.6" armor="30.0"/>
      <skill fist="20.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="10" name="Gigant Warrior" description="a gigant namek warrior" needpremium="0" gaincap="40" gainhp="210" gainmana="110" gainhpticks="6" gainhpamount="35" gainmanaticks="6" gainmanaamount="20" manamultiplier="3.0" attackspeed="3000" soulmax="300" gainsoulticks="100" fromvoc="4" droploot="yes">
      <formula meleeDamage="150.0" distDamage="1.0" wandDamage="1.0" magDamage="150.0" magHealingDamage="1.0" defense="4000.0" magDefense="160.0" armor="1.0"/>
      <skill fist="20.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="11" name="Kid Wonder Majin" description="a wonder kid buu" needpremium="0" gaincap="20" gainhp="100" gainmana="180" gainhpticks="8" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="4.1" attackspeed="2000" soulmax="500" gainsoulticks="10" fromvoc="5" droploot="yes">
      <formula meleeDamage="1.0" distDamage="1.0" wandDamage="6.0" magDamage="50.0" magHealingDamage="1.0" defense="30.0" magDefense="30.0" armor="10.0"/>
      <skill fist="3.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="12" name="Kid Mighty Majin" description="a mighty kid buu" needpremium="0" gaincap="40" gainhp="210" gainmana="110" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" soulmax="300" gainsoulticks="120" fromvoc="6" droploot="yes">
      <formula meleeDamage="15.0" distDamage="1.0" wandDamage="1.0" magDamage="15.0" magHealingDamage="1.0" defense="40.0" magDefense="16.0" armor="30.0"/>
      <skill fist="20.1" club="1.1" sword="5.1" axe="1.1" distance="1.4" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="13" name="Fighter" description="a human fighter" needpremium="0" gaincap="70" gainhp="95" gainmana="45" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="25" manamultiplier="1.5" attackspeed="1005" soulmax="200" gainsoulticks="100" fromvoc="7" droploot="yes">
      <formula meleeDamage="21.5" distDamage="15.0" wandDamage="1.0" magDamage="15.0" magHealingDamage="1.0" defense="24.0" magDefense="6.0" armor="24.0"/>
      <skill fist="3.5" club="5.5" sword="1.0" axe="1.0" distance="1.0" shielding="4.0" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="14" name="Swordman" description="a swordman" needpremium="0" gaincap="30" gainhp="79" gainmana="68" gainhpticks="12" gainhpamount="100" gainmanaticks="3" gainmanaamount="15" manamultiplier="1.1" attackspeed="1500" soulmax="400" gainsoulticks="120" fromvoc="7" droploot="yes">
      <formula meleeDamage="27.0" distDamage="15.0" wandDamage="1.0" magDamage="15.0" magHealingDamage="1.0" defense="20.0" magDefense="7.0" armor="20.0"/>
      <skill fist="4.0" club="1.5" sword="5.5" axe="1.0" distance="1.0" shielding="2.5" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="15" name="Hermit Turtle" description="a turtle hermit" needpremium="0" gaincap="70" gainhp="60" gainmana="95" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="15" manamultiplier="2.1" attackspeed="2000" soulmax="200" gainsoulticks="120" fromvoc="8" droploot="yes">
      <formula meleeDamage="3.0" distDamage="1.0" wandDamage="20.0" magDamage="30.0" magHealingDamage="1.0" defense="10.0" magDefense="30.0" armor="10.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.5"/>
   </vocation>
   <vocation id="16" name="Crane Hermit" description="a crane hermit" needpremium="0" gaincap="70" gainhp="75" gainmana="85" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="15" manamultiplier="2.1" attackspeed="2000" soulmax="200" gainsoulticks="120" fromvoc="8" droploot="yes">
      <formula meleeDamage="3.0" distDamage="1.0" wandDamage="30.0" magDamage="30.0" magHealingDamage="1.0" defense="10.0" magDefense="30.0" armor="10.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.5"/>
   </vocation>
   <vocation id="17" name="Dende Healer" description="a dende healer" needpremium="0" gaincap="20" gainhp="67" gainmana="115" gainhpticks="8" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="4.1" attackspeed="2000" soulmax="500" gainsoulticks="10" fromvoc="9" droploot="yes">
      <formula meleeDamage="3.0" distDamage="1.0" wandDamage="10.0" magDamage="10.0" magHealingDamage="1.0" defense="15.0" magDefense="20.0" armor="15.0"/>
      <skill fist="3.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="18" name="Dende Summoner" description="a dende summoner" needpremium="0" gaincap="20" gainhp="90" gainmana="75" gainhpticks="8" gainhpamount="15" gainmanaticks="4" gainmanaamount="20" manamultiplier="4.1" attackspeed="2000" soulmax="500" gainsoulticks="10" fromvoc="9" droploot="yes">
      <formula meleeDamage="4.0" distDamage="1.0" wandDamage="15.0" magDamage="15.0" magHealingDamage="1.0" defense="20.0" magDefense="17.8" armor="17.7"/>
      <skill fist="3.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="19" name="Dark Warrior" description="a namek dark warrior" needpremium="0" gaincap="40" gainhp="120" gainmana="71" gainhpticks="6" gainhpamount="11" gainmanaticks="6" gainmanaamount="10" manamultiplier="2.0" attackspeed="1500" soulmax="400" gainsoulticks="120" fromvoc="10" droploot="yes">
      <formula meleeDamage="18.0" distDamage="5.0" wandDamage="1.0" magDamage="15.9" magHealingDamage="1.0" defense="20.5" magDefense="20.8" armor="20.0"/>
      <skill fist="6.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="6.1" fishing="5.1" experience="1.5"/>
   </vocation>
   <vocation id="20" name="Shadow Knight" description="a namek shadow knight" needpremium="0" gaincap="40" gainhp="90" gainmana="83" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="1700" soulmax="400" gainsoulticks="120" fromvoc="10" droploot="yes">
      <formula meleeDamage="20.0" distDamage="5.0" wandDamage="1.0" magDamage="23.5" magHealingDamage="1.0" defense="15.7" magDefense="15.8" armor="15.0"/>
      <skill fist="2.1" club="1.1" sword="1.1" axe="5.1" distance="1.4" shielding="5.1" fishing="1.1" experience="1.5"/>
   </vocation>
   <vocation id="25" name="Ssj Fighter" description="a human super fighter" needpremium="0" gaincap="70" gainhp="95" gainmana="45" gainhpticks="15" gainhpamount="100" gainmanaticks="3" gainmanaamount="25" manamultiplier="1.5" attackspeed="1005" soulmax="200" gainsoulticks="100" fromvoc="13" droploot="yes">
      <formula meleeDamage="27.9" distDamage="15.0" wandDamage="1.0" magDamage="15.0" magHealingDamage="1.0" defense="24.0" magDefense="6.0" armor="24.0"/>
      <skill fist="4.5" club="7.9" sword="1.0" axe="1.0" distance="1.0" shielding="4.0" fishing="1.1" experience="1.5"/>
   </vocation>
</vocations>

And my script for change the vocation.
Talkaction.xml
Changevocation.lua
Lua:
function onSay(cid, words, param)
   
   local postac1 = { -- human
   [1] = {0,1,2,3,4,5,6,7,8,9,10,1,12,13,14,15,16,17,18,19,20}, -- Klass ID
   [2] = {138,420,138,420,138,420,138,420,138,420,138,420,138,420,138,420,138,420,138,420,70}, -- Skin ID
   [3] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}} -- Level NEED

   local postac2 = { --namek
   [1] = {90,30}, -- Klass ID
   [2] = {371,370}, -- Skin ID
   [3] = {0,0}} -- Level NEED
   
   local postac3 = { --renji
   [1] = {100,40}, -- Klass ID
   [2] = {373,377}, -- Skin ID
   [3] = {0,0}} -- Level NEED
   
   local postac4 = { --toushiro
   [1] = {110,50}, -- Klass ID
   [2] = {6,302}, -- Skin ID
   [3] = {0,0}} -- Level NEED
   
   local postac5 = { --zaraki
   [1] = {120,60}, -- Klass ID
   [2] = {5,6}, -- Skin ID
   [3] = {0,0}} -- Level NEED
   
   local postac6 = { --nell
   [1] = {28,29,30,31,32,33}, -- Klass ID
   [2] = {37,194,33,262,216,160}, -- Skin ID
   [3] = {0,50,120,175,275,350}} -- Level NEED

   local postac7 = { --uluq
   [1] = {34,35,36,37,38,39}, -- Klass ID
   [2] = {103,116,220,219,250,9}, -- Skin ID
   [3] = {0,50,120,175,275,350}} -- Level NEED
   
   local postac8 = { --byakuya
   [1] = {40,41,42,43,44,45}, -- Klass ID
   [2] = {30,289,94,11,119,67}, -- Skin ID
   [3] = {0,50,120,175,275,350}} -- Level NEED
   
   local postac9 = { --ishida
   [1] = {46,47,48,49,50,51}, -- Klass ID
   [2] = {332,329,331,326,327,330}, -- Skin ID
   [3] = {0,50,120,175,275,350}} -- Level NEED
   
   local postac10 = { -- human
   [1] = {80,20}, -- Klass ID
   [2] = {70,420}, -- Skin ID
   [3] = {1,1}} -- Level NEED
   
   transform(cid, postac1)
   transform(cid, postac2)
   transform(cid, postac3)
   transform(cid, postac4)
   transform(cid, postac5)
   transform(cid, postac6)
   transform(cid, postac7)
   transform(cid, postac8)
   transform(cid, postac9)
   transform(cid, postac10)
   
   
   
   return true
   end
   
   
   
   
       function transform(cid, parameter, var)
           for i = 1, #parameter[1] do
               if i >= #parameter[1] then
                   elseif getPlayerLevel(cid) < parameter[3][i+1] and getPlayerVocation(cid) == parameter[1][i] then
                           doPlayerSendCancel(cid, "Required level is ".. parameter[3][i+1] .." to transform!")
                   elseif getPlayerLevel(cid) >= parameter[3][#parameter[3]] and getPlayerVocation(cid) == parameter[1][#parameter[1]] then
                           doPlayerSendCancel(cid, "It's u last transform.")
                elseif getPlayerVocation(cid) == parameter[1][i] and getPlayerLevel(cid) >= parameter[3][i+1] then
                           doPlayerSetVocation(cid, parameter[1][i+1])
                           local outfit = {lookType=parameter[2][i+1], lookHead=124, lookAddons=1, lookLegs=45, lookBody=1, lookFeet=87}
                           doCreatureChangeOutfit(cid, outfit)
                           doSendMagicEffect(getCreaturePosition(cid), 3)
                        doPlayerSendCancel(cid, "Transform Success.")
                          
                    return true
                   end
               end
           end

Could you post your vocation lib please ?
(data/lib/031-vocations.lua)
 
031-vocations /libs
Lua:
function isHuman(cid)
	return isInArray({1, 7}, getPlayerVocation(cid))
end

function isSpiritualist(cid)
	return isInArray({2, 8}, getPlayerVocation(cid))
end

function isHealer(cid)
	return isInArray({3, 9}, getPlayerVocation(cid))
end

function isWarrior(cid)
	return isInArray({4, 10}, getPlayerVocation(cid))
end

function isWMajin(cid)
	return isInArray({5, 11}, getPlayerVocation(cid))
end

function isMMajij(cid)
	return isInArray({6, 12}, getPlayerVocation(cid))
end

function isNoob(cid)
	return isInArray({0}, getPlayerVocation(cid))
end

In Spanish
E.e hablo mal ingles por eso te lo escribo en español, no quiero usar doSetPlayerPromoteLevel, porque lo intente la ultima vez, y despues de la promotion creo que 4 se bugeaba D: no hay forma de usar el doSetPlayerVocation??? gracias...
 
031-vocations /libs
Lua:
function isHuman(cid)
	return isInArray({1, 7}, getPlayerVocation(cid))
end

function isSpiritualist(cid)
	return isInArray({2, 8}, getPlayerVocation(cid))
end

function isHealer(cid)
	return isInArray({3, 9}, getPlayerVocation(cid))
end

function isWarrior(cid)
	return isInArray({4, 10}, getPlayerVocation(cid))
end

function isWMajin(cid)
	return isInArray({5, 11}, getPlayerVocation(cid))
end

function isMMajij(cid)
	return isInArray({6, 12}, getPlayerVocation(cid))
end

function isNoob(cid)
	return isInArray({0}, getPlayerVocation(cid))
end

In Spanish
E.e hablo mal ingles por eso te lo escribo en español, no quiero usar doSetPlayerPromoteLevel, porque lo intente la ultima vez, y despues de la promotion creo que 4 se bugeaba D: no hay forma de usar el doSetPlayerVocation??? gracias...

Maybe I am missing something, but everything seems to be fine...
Go to your SQL database and check if the player you are using have a promotion value different than 0, if it does maybe that is the problem...
 
Maybe I am missing something, but everything seems to be fine...
Go to your SQL database and check if the player you are using have a promotion value different than 0, if it does maybe that is the problem...

No, my sql database say what the table Promotion is 0
 
if your vocation is 2 then in xml change fromvoc="" for fromvoc="2".
now you will stay always with you vocation
it was like that, becouse the engine though that voc 2 is only promotion and when you dont have pacc, the engine goes back to basic vocation 0, becouse you had fromvoc=""
 
Back
Top