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

When A Player Dies He Get No Vocation

Garndalf

New Member
Joined
Jul 31, 2008
Messages
89
Reaction score
0
I Am Using TFS 0.3.6 PROTOCOL 8.71

And when a player dies by another Player he Get No Vocation
 
Hi friend..

Hi.. try this..

In creaturescript...

Code:
<event type="death" name="PlayerDeathVocation" event="script" value="resetdeathvocation.lua"/>

Create a lua file with..

Code:
function onDeath(cid, corpse, killer)
if isPlayer(cid) then
setPlayerVocation(cid,0)
doPlayerPopupFYI(cid, "You lost your vocation.")
end
return true
end

Sorry for poor english.. Enjoy.
 
Hi.. try this..

In creaturescript...

Code:
<event type="death" name="PlayerDeathVocation" event="script" value="resetdeathvocation.lua"/>

Create a lua file with..

Code:
function onDeath(cid, corpse, killer)
if isPlayer(cid) then
setPlayerVocation(cid,0)
doPlayerPopupFYI(cid, "You lost your vocation.")
end
return true
end

Sorry for poor english.. Enjoy.

Haha good script xd but, I don't think it is that he want. He have a problem with his promotion script i think.

@Topic:

Post the script you used to promote the player.
 
Is the player saved at all?
Ex EQ, exp, etc etc

Yeah, all is saved. Just vocation in db is set to 0. And 'promotion' field in db stays at '1'.

I just got this message in console:
Code:
[Warning - Vocations::getVocation] Vocation 4294967295 not found.

So, this function prints it, and then when not found ::defVoc is returned, which is (I assume) 0.
Code:
Vocation* Vocations::getVocation(uint32_t vocId)
{
    VocationsMap::iterator it = vocationsMap.find(vocId);
    if(it != vocationsMap.end())
        return it->second;

    std::clog << "[Warning - Vocations::getVocation] Vocation " << vocId << " not found." << std::endl;
    return &Vocations::defVoc;
}

It happens on login.
I'll investigate this further.
 
Last edited by a moderator:
Yeah, all is saved. Just vocation in db is set to 0. And 'promotion' field in db stays at '1'.

I just got this message in console:
Code:
[Warning - Vocations::getVocation] Vocation 4294967295 not found.

So, this function prints it, and then when not found ::defVoc is returned, which is (I assume) 0.
Code:
Vocation* Vocations::getVocation(uint32_t vocId)
{
    VocationsMap::iterator it = vocationsMap.find(vocId);
    if(it != vocationsMap.end())
        return it->second;

    std::clog << "[Warning - Vocations::getVocation] Vocation " << vocId << " not found." << std::endl;
    return &Vocations::defVoc;
}

It happens on login.
I'll investigate this further.

This might help abit; Lua - Vocation 4294967295 not found. [crashing server]
 
Back
Top