getPlayerVocation para todas as versões com o opcode.
Instalação
Client
OtClient/Modules/gamelib/game.lua
function getPlayerVocation()
local protocol = g_game.getProtocolGame()
protocol:sendExtendedOpcode(25, 5)
end
e no seu script
ProtocolGame.registerExtendedOpcode(26,
function (protocol, opcode, buffer)
vocation = buffer
print(vocation)
end
)
Server
creaturescripts/extendedopcode.lua
function onExtendedOpcode(cid, opcode, buffer)
if opcode == 25 then
doSendPlayerExtendedOpcode(cid, 26, getPlayerVocation(cid))
end
return true
end