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

getVocation() - OTCV8

Daskyn

New Member
Joined
Jan 30, 2015
Messages
15
Reaction score
2
Could someone help me on how I can use OTClient's getVocation() function in Nekiro's TFS 1.5 downgrade 8.60?

when I use it this way:

g_game.getLocalPlayer():getVocation()

the return is always 0 regardless of the vocation
 
test g_game.getLocalPlayer():getVocation():getId()
Thanks for trying to help,

I think this method would be for the server.... on the client I get this error

g_game.getLocalPlayer():getVocation():getId()

ERROR: command failed: :1: attempt to index a number value
 
Where exactly are you calling g_game.getLocalPlayer():getVocation()?

It may be that the local player has not yet been initialised.
 
Where exactly are you calling g_game.getLocalPlayer():getVocation()?

It may be that the local player has not yet been initialised.
Thanks for trying to help,


In modules in general, along with other functions such as: 'g_game.getLocalPlayer():getMana()' which returns exactly the value, unlike getVocation()... being that, even through the terminal, using a print(g_game.getLocalPlayer():getVocation()) the return is 0
 
vocation isn't sent to the client - that came in a later protocol version
Thanks for trying to help,

would there be any way to adapt to version 8.60? I don't have the slightest idea how to do this... I've tried every way
 
assuming you don't want to add the sending of vocation into your source code, you could send it using an extendedopcode at login
you'll still need to do some learning to achieve that - but it should be far more manageable than the source edit otherwise required and there are plenty of examples around of sending and receiving extendedopcode data on this forum
 
the issue is that I would like to use the value of the vocation for changes in the source of the client... such as displaying the name of the vocation next to the name of the player based on the returned ID

I don't think of a way to do this via modules/opcode
 
Back
Top