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

Solved Vocations are not saving.

OmegaOT

Discontinued|Working on something new
Joined
Dec 2, 2014
Messages
12
Reaction score
2
This has been boggling my mind all day, so you create a character from acct manager, it spawns and you pick a voc from there, once you pick the voc it goes straight to temple. But, when a player is relogged, the vocation is reset back to no vocation and I can't figure out why. This is my code for vocation 4 (Infernalist)
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local playerVoc = getPlayerVocation(cid)
local pos = {x=1018, y=1026, z=7}
        if playerVoc == 0 then
            doTeleportThing(cid, pos)
            doPlayerSetVocation(cid, 4)
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
            doCreatureSay(cid, "You have chosen Infernalist as your Vocation!", TALKTYPE_ORANGE_1)
        else
    doPlayerSendCancel(cid, "You have already chosen a vocation!")
    doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
    doTeleportThing(cid, fromPosition, TRUE)
        return false
    end
end

Any help?
 
I've looked around but I cannot get a definitive answer, but it seems to be dealt with promotions.
Code:
fromvoc="0"
This line in vocations.xml makes the character go from (0-1-2) (rook-knight-elite knight) for example, however I'm unsure how you would do it.
Aka, Promotion = perm voc change

I'll keep looking for you though. If I find anything I'll edit this post.


--edit--
When changing the vocations, in vocations.xml change the line fromvoc="0" to the same number as the vocation
so.. if it's like this..
knight = id 1, and fromvoc = 0
change to
knight = id 1, and fromvoc = 1

This may be the wrong way to do it, but it makes sense to me, since it's not really a promotion yet, and just a vocation change. So ignore what I said earlier, and just change it like that.
 
Last edited:
Thank you, it worked. I've made several ots and never had this problem, means I never went full retard till this one. Thanks anyways man, appreciated.
 
Thank you, it worked. I've made several ots and never had this problem, means I never went full retard till this one. Thanks anyways man, appreciated.
Could you post back and tell me what worked? xD
Just making sure if I'm crazy or not. Dx
 
I had everything set to fromVoc="0", the way you explained it is exactly the way i changed i ;p
 
Back
Top