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

Script help.

Ufonica

New Member
Joined
Aug 3, 2018
Messages
55
Reaction score
0
Hello again,

I have been having a small problem with a promotion script i have made, everything works perfectly fine for it however when players log out and log back in they lose the promotion.

Is there anyway for me to be able to fix this in login.lua.

Client version is 8.6 and the tfs is 0.4

Thanks in advance.

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cfg = {
level = 1, --- level to use items
vocs = { 5, 6, 7, 8 }, --- put here vocation must use items 
storage = 452473991 --- set any empty storage
}
if(getPlayerStorageValue(cid, cfg.storage) == -1) then
if(getPlayerLevel(cid) >= cfg.level) then
if(isInArray(cfg.vocs, getPlayerVocation(cid)) == true) then
setPlayerPromotionLevel(cid, getPlayerPromotionLevel(cid) + 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been promoted to " .. getVocationInfo(getPlayerVocation(cid)).name .. ".")
doSendMagicEffect(getCreaturePosition(cid), 55)
setPlayerStorageValue(cid, cfg.storage, 1)
doRemoveItem(item.uid, 1)

else
doCreatureSay(cid, "Only players with first promotion may get their Second promotion.", TALKTYPE_ORANGE_1)
end
else
doCreatureSay(cid, "Sorry, only characters of level " .. cfg.level .. " or above can buy Second Promotion.", TALKTYPE_ORANGE_1)
end
else
doCreatureSay(cid, "You have already purchased the Second Promotion.", TALKTYPE_ORANGE_1)
end
return
end
 
Last edited by a moderator:
It doesn't even change the vocation when you use the doll if i replace doPlayerSetVocation with db.executeQuery

That’s just the function. It’s incomplete. You have to replace the entire line with this:

Lua:
db.executeQuery('UPDATE `players` SET `vocation` = `vocation` + 4 WHERE `id` = ' .. getPlayerGUID(cid) .. ';')

I’m hoping this will work. If not, I’ll have to try something else later.
 
Change all of the “fromvoc” variables in vocations.xml to: 1, 2, 3, 4.

And then try the other scripts I wrote earlier in the thread.
Took awhile for this thread to figure it out, but yes this is the correct answer to this issue.
All promotional vocations must be set from the original vocations, not from the newest promotion.

Sorcerer -> Master Sorcerer -> Wizard
Since it all ties together, the fromvoc needs to connect the wizard to the sorcerer, not the wizard to the master sorcerer, at least when using promotions anyway.


Btw, you don't need a storage value for this script, since you can just check the players current promotional level to determine whether or not they can use the doll.

-- edit

this should be a working script for you, after you adjust your vocations.xml
Lua:
local config = {
    promotion_level = 1, -- current promotional level required to use item (0 = unpromoted, 1 = first promotion, 2 = et cetera)
    level = 1, --- level to use items
    magic_effect = CONST_ME_PLANTATTACK
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    -- check player promotional requirements.
    local player_promotion_level = getPlayerPromotionLevel(cid)
    if config.promotion_level < 0 then
        doCreatureSay(cid, "Please advise admin of an error in their script.", TALKTYPE_ORANGE_1)
        return true
    elseif config.promotion_level == 0 and player_promotion_level > 0 then
        doCreatureSay(cid, "Only players without a promotion may use this item.", TALKTYPE_ORANGE_1)
        return true
    elseif config.promotion_level ~= 0 and player_promotion_level < config.promotion_level then
        doCreatureSay(cid, "Your promotion level is too low to use this item.", TALKTYPE_ORANGE_1)
        return true
    elseif config.promotion_level ~= 0 and player_promotion_level > config.promotion_level then
        doCreatureSay(cid, "Your promotion level is too high to use this item.", TALKTYPE_ORANGE_1)
        return true
    end
   
    -- check player level requirement.
    if getPlayerLevel(cid) >= config.level then
        doCreatureSay(cid, "Sorry, only characters of level " .. config.level .. " or above can use this item.", TALKTYPE_ORANGE_1)
        return true
    end
   
    -- Give player their reward.
    if player_promotion_level < 1 then
        doPlayerSetPromotionLevel(cid, 1)
    else
        doPlayerSetPromotionLevel(cid, player_promotion_level + 1)
    end
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been promoted to " .. getPlayerVocationName(cid) .. "!")
    doSendMagicEffect(toPosition, config.magic_effect)
    doRemoveItem(item.uid, 1)
    return true
end
 
Last edited:
If i change them all to 1,2,3,4 it just promote the player to a royal paladin even thought they are already a royal paladin.
 
@Xikini, I actually requested he change the values to test a theory. It still doesn’t work, as I assumed.

If i change them all to 1,2,3,4 it just promote the player to a royal paladin even thought they are already a royal paladin.

It seems your characters are not saving upon relogin. They were being promoted, correct? But once you logout and log back in, they are back to their original vocation. So, let’s now try reverting back to the original vocations.xml file and go from there.
 
Last edited:
Alright, i've turned it back to exactly how it was before.

Make sure you’re using 9, 10, 11, & 12 for the new vocations and change the fromvoc values to 5, 6, 7, & 8. Restart the server and then try using the following script (below) and let me know if it still happens.

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerPromotionLevel(cid) < 1 then
        doPlayerSendCancel(cid, "Sorry, you must have the first promotion.")
        return false
    end
 
    doPlayerSetPromotionLevel(cid, 2)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Congratulations! You have been promoted to " .. getVocationInfo(getPlayerVocation(cid)).name .. ".")
    doSendMagicEffect(getCreaturePosition(cid), 55)
    doRemoveItem(item.uid, 1)
    return true
end
What could be wrong:
  1. Your vocations.xml was incorrect (or had an issue).
  2. The functions themselves do not save properly.
If it’s #1, reverting back to the very original vocations.xml and making the changes again may resolve the issue. However, #2 has a couple options, and one will require source additions.
 
Last edited:
I posted the correct answer.
Let's see how long you guys test theories before coming to the same solution.
Good luck I guess.
 
He can change the fromvoc values back, but he claimed it didn’t work before when I suggested it.
 
I posted the correct answer.
Let's see how long you guys test theories before coming to the same solution.
Good luck I guess.
Ye i've changed the fromvoc values and i've tried using the script that you have given me. But it will not even let me use the doll using the promotion script you have provided.

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="1" 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="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="1" 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="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="1" 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="10" gainmana="15" gainhpticks="4" gainhpamount="5" gainmanaticks="4" gainmanaamount="5" manamultiplier="1.4" attackspeed="1" 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="15" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" manamultiplier="3.0" attackspeed="1" 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="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.2" magDamage="1.2" 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="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.2" magDamage="1.2" 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="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.3" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.1" magDefense="1.2" armor="1.2"/>
        <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="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
        <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.1" armor="1.3"/>
        <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="Wizard" description="an wizard" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.3" magDamage="1.3" 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="10" name="Priest" description="an priest" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.3" magDamage="1.3" 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="11" name="Archer" description="an archer" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.4" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.2" defense="1.2" magDefense="1.3" armor="1.3"/>
        <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="Warrior" description="an warrior" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
        <formula meleeDamage="1.3" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.5" magDefense="1.5" armor="1.5"/>
        <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>
 
Ye i've changed the fromvoc values and i've tried using the script that you have given me. But it will not even let me use the doll using the promotion script you have provided.

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="1" 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="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="1" 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="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="1" 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="10" gainmana="15" gainhpticks="4" gainhpamount="5" gainmanaticks="4" gainmanaamount="5" manamultiplier="1.4" attackspeed="1" 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="15" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" manamultiplier="3.0" attackspeed="1" 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="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.2" magDamage="1.2" 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="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.2" magDamage="1.2" 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="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.3" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.1" magDefense="1.2" armor="1.2"/>
        <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="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
        <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.1" armor="1.3"/>
        <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="Wizard" description="an wizard" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.3" magDamage="1.3" 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="10" name="Priest" description="an priest" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.3" magDamage="1.3" 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="11" name="Archer" description="an archer" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.4" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.2" defense="1.2" magDefense="1.3" armor="1.3"/>
        <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="Warrior" description="an warrior" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
        <formula meleeDamage="1.3" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.5" magDefense="1.5" armor="1.5"/>
        <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>
you didn't change fromvoc the way you were supposed to
for example with warrior you have id="12", fromvoc should also be 12
same thing with ids 11, 10, 9, 8, 7, 6, 5
 
you didn't change fromvoc the way you were supposed to
for example with warrior you have id="12", fromvoc should also be 12
same thing with ids 11, 10, 9, 8, 7, 6, 5
That only works if you are changing the players vocation instead of giving them a promotion.
 
Well, let's consolidate the replies.

Support team member Vulcan suggests to put each fromvoc to the same ID as the vocation.
Going by their previous reply, they've likely quickly perused your original script and think it should work as-is.

JBD wants to know if the doll is sending you the cancel message in the client (near bottom of screen), or if you are getting an error in the console.

For myself, I'd like to know the same thing but in regards to my script.
If there is an error message in the console, you'd need to post the error here for us to read/see.

For the future, posting 'doll doesn't work' or something similar doesn't help too much, since we need to see the errors that are occurring.
It's also best if you explain what you've tried, and if you edited the script at all.
You could even post a small clip on youtube or something, if you want us to see what's happening in-game when you try something.

Screenshots preferred, video as extra.
Written steps of what you've tried/done while testing.

Everything helps. :oops:
 
Last edited:
I've tested all the scripts which you have given me and got error after error, but could you tell me exactly how to put my vocations.xml by edting the one i have sent so i know i've done exactly what you have requested off me and if there is any errors i will post them here. Thanks.
 

Similar threads

Back
Top