Itutorial
Legendary OT User
- Joined
- Dec 23, 2014
- Messages
- 2,329
- Solutions
- 68
- Reaction score
- 1,007
I am sending a packet with otcv8 to the server and getting info back. The packet itself is working as intended but in otcv8 I am getting and error. The error is causing other problems. Does anyone know how to fix it?
Inside otcv8 the code is
There isn't any error or problem with the code itself. Otcv8 is just saying that error but everything is working other than the problems that are being caused from otclient not reading the info correct or whatever it is doing that is making it show an error. Whenever an item is changed its not shown in-game until I get the item out of the screen window, also whenever I add skill tries to my player the skills go crazy with their numbers.
TFS
I just noticed the error used to say the opcode was 201 that had a problem. Now its saying its 0x00..... No freaking clue what is going on lmao
Code:
ERROR: ProtocolGame parse message exception (9141 bytes, 5546 unread, last opcode is 0x01 (1), prev opcode is 0x00 (0)): unhandled opcode 1
Inside otcv8 the code is
Lua:
ProtocolGame.registerExtendedOpcode(55, onRecvSkillsOpcode)
ProtocolGame.unregisterExtendedOpcode(55)
function onRecvSkillsOpcode(protocol, opcode, buffer)
local player = g_game.getLocalPlayer()
if not player then return end
local buffer = unserialize(buffer)
for skillType, skillInfo in ipairs(buffer.skills) do
onSkillChange(player, skillType, tonumber(skillInfo.level), tonumber(skillInfo.percent))
onBaseSkillChange(player, skillType, tonumber(skillInfo.base))
end
return true
end
There isn't any error or problem with the code itself. Otcv8 is just saying that error but everything is working other than the problems that are being caused from otclient not reading the info correct or whatever it is doing that is making it show an error. Whenever an item is changed its not shown in-game until I get the item out of the screen window, also whenever I add skill tries to my player the skills go crazy with their numbers.
TFS
Lua:
local CE_SendSkills = CreatureEvent("CE_SendSkills")
function CE_SendSkills.onExtendedOpcode(player, opcode, buffer)
if opcode == 201 then
local packet = NetworkMessage()
packet:addByte(0x32) -- Extended Opcode (0x32 = 50 (in dec))
packet:addByte(0x37) -- The Opcode of this Request (0x37 = 55 (in dec))
local buffer = {}
buffer.skills = {}
for i = SKILL_STRENGTH, SKILL_ENCHANTING do
buffer.skills[i] = {stuffhere}
end
packet:addString(serialize(buffer))
packet:sendToPlayer(player)
end
return true
end
CE_SendSkills:register()
I just noticed the error used to say the opcode was 201 that had a problem. Now its saying its 0x00..... No freaking clue what is going on lmao
Last edited: