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

OTClient ProtocolGame parse

2057623

Member
Joined
Jan 16, 2012
Messages
130
Reaction score
15
I have 2 problems with otclient, I've found some tutorials on some forums but they don't solve these problems, the first error before I log in again it gives this when I log in, and the second is when I give a target and the character freezes, it doesn't show damage, it doesn't show effect, it gets stuck lol.

1735849712642.webp

I think the problem is in the client's skills, but for me it seems normal, I don't know why there is a problem.

1735849742849.webp



This is my file that I edited in const.lua
Skill = {
Fist = 0,
Club = 1,
Sword = 2,
Axe = 3,
Distance = 4,
Shielding = 5,
Fishing = 6,
Punho = 7,
Pistola = 8,
Doze = 9,
Submetralhadora = 10,
Fuzilassalto = 11,
Fuzilprecisao = 12,
Especiais = 13,
Granada = 14,
Minerador = 15,
Lenhador = 16,
Forjador = 17,
CriticalChance = 18,
CriticalDamage = 19,
LifeLeechChance = 20,
LifeLeechAmount = 21,
ManaLeechChance = 22,
ManaLeechAmount = 23
}


This is my skills.otui file
SkillFirstWidget < UIWidget

SkillButton < UIButton
height: 21
margin-bottom: 2
&onClick: onSkillButtonClick

SmallSkillButton < SkillButton
height: 14

SkillNameLabel < GameLabel
font: verdana-11px-monochrome
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom

SkillValueLabel < GameLabel
id: value
font: verdana-11px-monochrome
text-align: topright
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: prev.left

SkillPercentPanel < ProgressBar
id: percent
background-color: green
height: 5
margin-top: 15
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
phantom: false

MiniWindow
id: skillWindow
!text: tr('Skills')
height: 150
icon: /images/topbuttons/skills
@onClose: modules.game_skills.onMiniWindowClose()
&save: true
&autoOpen: false

MiniWindowContents
padding-left: 5
padding-right: 5
layout: verticalBox

SkillButton
margin-top: 5
id: experience
height: 15
SkillNameLabel
!text: tr('Experience')
SkillValueLabel

SkillButton
id: level
SkillNameLabel
!text: tr('Level')
SkillValueLabel
SkillPercentPanel
background-color: red

SkillButton
id: health
height: 15
SkillNameLabel
!text: tr('Hit Points')
SkillValueLabel

SkillButton
id: mana
height: 15
SkillNameLabel
!text: tr('Mana')
SkillValueLabel

SkillButton
id: soul
height: 15
SkillNameLabel
!text: tr('Soul Points')
SkillValueLabel

SkillButton
id: capacity
height: 15
SkillNameLabel
!text: tr('Capacity')
SkillValueLabel

SkillButton
id: speed
height: 15
SkillNameLabel
!text: tr('Speed')
SkillValueLabel

SkillButton
id: regenerationTime
SkillNameLabel
!text: tr('Regeneration Time')
SkillValueLabel

SkillButton
id: stamina
SkillNameLabel
!text: tr('Stamina')
SkillValueLabel
SkillPercentPanel

SkillButton
id: offlineTraining
!visible: false
SkillNameLabel
!text: tr('Offline Training')
SkillValueLabel
SkillPercentPanel

SkillButton
id: magiclevel
!visible: false
SkillNameLabel
!text: tr('Magic Level')
SkillValueLabel
SkillPercentPanel
background-color: red

SkillButton
id: skillId0
!visible: false
SkillNameLabel
!text: tr('Fist Fighting')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId1
!visible: false
SkillNameLabel
!text: tr('Club Fighting')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId2
!visible: false
SkillNameLabel
!text: tr('Sword Fighting')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId3
!visible: false
SkillNameLabel
!text: tr('Axe Fighting')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId4
!visible: false
SkillNameLabel
!text: tr('Distance Fighting')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId5
SkillNameLabel
!text: tr('Shielding')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId6
SkillNameLabel
!text: tr('Fishing')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId7
SkillNameLabel
!text: tr('Punho')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId8
SkillNameLabel
!text: tr('Pistola')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId9
SkillNameLabel
!text: tr('Doze')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId10
SkillNameLabel
!text: tr('Sub-Metralhadora')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId11
SkillNameLabel
!text: tr('Fuzil Assalto')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId12
SkillNameLabel
!text: tr('Fuzil Precisao')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId13
SkillNameLabel
!text: tr('Especiais')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId14
SkillNameLabel
!text: tr('Granada')
SkillValueLabel
SkillPercentPanel


SkillButton
id: skillId15
SkillNameLabel
!text: tr('Minerador')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId16
SkillNameLabel
!text: tr('Lenhador')
SkillValueLabel
SkillPercentPanel

SkillButton
id: skillId17
SkillNameLabel
!text: tr('Forjador')
SkillValueLabel
SkillPercentPanel

SmallSkillButton
id: skillId18
SkillNameLabel
!text: tr('Critical Hit Chance')
SkillValueLabel

SmallSkillButton
id: skillId19
SkillNameLabel
!text: tr('Critical Hit Damage')
SkillValueLabel

SmallSkillButton
id: skillId20
SkillNameLabel
!text: tr('Life Leech Chance')
SkillValueLabel

SmallSkillButton
id: skillId21
SkillNameLabel
!text: tr('Life Leech Amount')
SkillValueLabel

SmallSkillButton
id: skillId22
SkillNameLabel
!text: tr('Mana Leech Chance')
SkillValueLabel

SmallSkillButton
id: skillId23
SkillNameLabel
!text: tr('Mana Leech Amount')
SkillValueLabel


then in skills.lua it looked like this

local hasAdditionalSkills = g_game.getFeature(GameAdditionalSkills)
for i = Skill.Fist, Skill.ManaLeechAmount do
onSkillChange(player, i, player:getSkillLevel(i), player:getSkillLevelPercent(i))
onBaseSkillChange(player, i, player:getSkillBaseLevel(i))

if i > Skill.Forjador then
toggleSkill('skillId'..i, hasAdditionalSkills)
end
end


Does anyone know if there is something wrong?
 
Do you have the features activated?

modules/game_features/features.lua

and paste in your client version:

g_game.enableFeature(GameAdditionalSkills)
g_game.enableFeature(GameLeechAmount)
 
Well, I don't know why I didn't add the GameLeechAmount skill, I'm using the Hellgrave server, but I added the others but didn't add anything, my feature.lua is like this.


function init()
connect(g_game, { onClientVersionChange = updateFeatures })
end

function terminate()
disconnect(g_game, { onClientVersionChange = updateFeatures })
end

function updateFeatures(version)
g_game.resetFeatures()
if version <= 0 then
return
end

-- you can add custom features here, list of them is in the modules\gamelib\const.lua
g_game.enableFeature(GameBot)
g_game.enableFeature(GameMagicEffectU16)
g_game.enableFeature(GameWingsAndAura)
g_game.enableFeature(GameWingOffset)
g_game.enableFeature(GameSpritesAlphaChannel)
g_game.enableFeature(GameOrangeNpcNameColor)
-- g_game.enableFeature(GameDrawAuraOnTop)
g_game.enableFeature(GameExtendedOpcode)
g_game.enableFeature(GameAuraFrontAndBack)
g_game.enableFeature(GameBigAurasCenter)
g_game.enableFeature(GameDiagonalAnimatedText)
g_game.enableFeature(GameDontMergeAnimatedText)
g_game.enableFeature(GameDoubleHealth)

--g_game.enableFeature(GameMinimapLimitedToSingleFloor) -- it will generate minimap only for current floor

if(version >= 770) then
g_game.enableFeature(GameLooktypeU16)
g_game.enableFeature(GameMessageStatements)
g_game.enableFeature(GameLoginPacketEncryption)
end

if(version >= 780) then
g_game.enableFeature(GamePlayerAddons)
g_game.enableFeature(GamePlayerStamina)
g_game.enableFeature(GameNewFluids)
g_game.enableFeature(GameMessageLevel)
g_game.enableFeature(GamePlayerStateU16)
g_game.enableFeature(GameNewOutfitProtocol)
end

if(version >= 790) then
g_game.enableFeature(GameWritableDate)
end

if(version >= 840) then
g_game.enableFeature(GameProtocolChecksum)
g_game.enableFeature(GameAccountNames)
g_game.enableFeature(GameDoubleFreeCapacity)
end

if(version >= 841) then
g_game.enableFeature(GameChallengeOnLogin)
g_game.enableFeature(GameMessageSizeCheck)
g_game.enableFeature(GameTileAddThingWithStackpos)
end

if(version >= 854) then
g_game.enableFeature(GameCreatureEmblems)
end

if(version >= 860) then
g_game.enableFeature(GameAttackSeq)
end

if(version >= 862) then
g_game.enableFeature(GamePenalityOnDeath)
end

if(version >= 870) then
g_game.enableFeature(GameDoubleExperience)
g_game.enableFeature(GamePlayerMounts)
g_game.enableFeature(GameSpellList)
end

if(version >= 910) then
g_game.enableFeature(GameNameOnNpcTrade)
g_game.enableFeature(GameTotalCapacity)
g_game.enableFeature(GameSkillsBase)
g_game.enableFeature(GamePlayerRegenerationTime)
g_game.enableFeature(GameChannelPlayerList)
g_game.enableFeature(GameEnvironmentEffect)
g_game.enableFeature(GameItemAnimationPhase)
end

if(version >= 940) then
g_game.enableFeature(GamePlayerMarket)
end

if(version >= 953) then
g_game.enableFeature(GamePurseSlot)
g_game.enableFeature(GameClientPing)
end

if(version >= 960) then
g_game.enableFeature(GameSpritesU32)
g_game.enableFeature(GameOfflineTrainingTime)
end

if(version >= 963) then
g_game.enableFeature(GameAdditionalVipInfo)
end

if(version >= 972) then
g_game.enableFeature(GameDoublePlayerGoodsMoney)
end

if(version >= 980) then
g_game.enableFeature(GamePreviewState)
g_game.enableFeature(GameClientVersion)
end

if(version >= 981) then
g_game.enableFeature(GameLoginPending)
g_game.enableFeature(GameNewSpeedLaw)
end

if(version >= 984) then
g_game.enableFeature(GameContainerPagination)
g_game.enableFeature(GameBrowseField)
end

if(version >= 1000) then
g_game.enableFeature(GameThingMarks)
g_game.enableFeature(GamePVPMode)
end

if(version >= 1035) then
g_game.enableFeature(GameDoubleSkills)
g_game.enableFeature(GameBaseSkillU16)
end

if(version >= 1036) then
g_game.enableFeature(GameCreatureIcons)
g_game.enableFeature(GameHideNpcNames)
end

if(version >= 1038) then
g_game.enableFeature(GamePremiumExpiration)
end

if(version >= 1050) then
g_game.enableFeature(GameEnhancedAnimations)
end

if(version >= 1053) then
g_game.enableFeature(GameUnjustifiedPoints)
end

if(version >= 1054) then
g_game.enableFeature(GameExperienceBonus)
end

if(version >= 1055) then
g_game.enableFeature(GameDeathType)
end

if(version >= 1057) then
g_game.enableFeature(GameIdleAnimations)
end

if(version >= 1061) then
g_game.enableFeature(GameOGLInformation)
end

if(version >= 1071) then
g_game.enableFeature(GameContentRevision)
end

if(version >= 1072) then
g_game.enableFeature(GameAuthenticator)
end

if(version >= 1074) then
g_game.enableFeature(GameSessionKey)
end

if(version >= 1080) then
g_game.enableFeature(GameIngameStore)
end

if(version >= 1092) then
g_game.enableFeature(GameIngameStoreServiceType)
end

if(version >= 1093) then
g_game.enableFeature(GameIngameStoreHighlights)
end

if(version >= 1094) then
g_game.enableFeature(GameAdditionalSkills)
end

if(version >= 1100) then
g_game.enableFeature(GamePrey)
end

if(version >= 1200) then
g_game.enableFeature(GameSequencedPackets)
--g_game.enableFeature(GameSendWorldName)
g_game.enableFeature(GamePlayerStateU32)
g_game.enableFeature(GameTibia12Protocol)
end

modules.game_things.load()
end
 
I am not sure if your client is actually meant to be used with that server.

My client has this in features.lua and you can see leech is in version 13.20

if version >= 1200 then
g_game.enableFeature(GameColorizedLootValue)
g_game.enableFeature(GameThingQuickLoot)
g_game.enableFeature(GameTournamentPackets)
g_game.enableFeature(GameVipGroups)
g_game.enableFeature(GameEnterGameShowAppearance)
end

if version >= 1260 then
g_game.enableFeature(GameThingQuiver)
end

if version >= 1264 then
g_game.enableFeature(GameThingPodium)
end

if version >= 1272 then
g_game.enableFeature(GameThingUpgradeClassification)
end

if version >= 1281 then
g_game.disableFeature(GameEnvironmentEffect)
g_game.disableFeature(GameItemAnimationPhase)
end

if version >= 1290 then
g_game.enableFeature(GameSequencedPackets)
g_game.enableFeature(GameBosstiary)
g_game.enableFeature(GameThingClock)
g_game.enableFeature(GameThingCounter)
g_game.enableFeature(GameThingPodiumItemType)
g_game.enableFeature(GameDoubleShopSellAmount)
end

if version >= 1300 then
g_game.enableFeature(GameDoubleHealth)
g_game.enableFeature(GameUshortSpell)
g_game.enableFeature(GameConcotions)
g_game.enableFeature(GameAnthem)
end

if version >= 1314 then
g_game.disableFeature(GameTournamentPackets)
g_game.enableFeature(GameDynamicForgeVariables)
end

if version >= 1320 then
g_game.enableFeature(GameEffectU16)
g_game.enableFeature(GameContainerTypes)
g_game.enableFeature(GameBosstiaryTracker)
g_game.enableFeature(GamePlayerStateCounter)
g_game.disableFeature(GameLeechAmount)
g_game.enableFeature(GameItemAugment)
g_game.enableFeature(GameDynamicBugReporter)
end

if version >= 1321 then
g_game.enableFeature(GameWrapKit)
g_game.enableFeature(GameContainerFilter)
end

if version >= 1332 then
g_game.enableFeature(GameForgeConvergence);
g_game.enableFeature(GameExtendedOpcode);
end
end
})
 
I am not sure if your client is actually meant to be used with that server.

My client has this in features.lua and you can see leech is in version 13.20

if version >= 1200 then
g_game.enableFeature(GameColorizedLootValue)
g_game.enableFeature(GameThingQuickLoot)
g_game.enableFeature(GameTournamentPackets)
g_game.enableFeature(GameVipGroups)
g_game.enableFeature(GameEnterGameShowAppearance)
end

if version >= 1260 then
g_game.enableFeature(GameThingQuiver)
end

if version >= 1264 then
g_game.enableFeature(GameThingPodium)
end

if version >= 1272 then
g_game.enableFeature(GameThingUpgradeClassification)
end

if version >= 1281 then
g_game.disableFeature(GameEnvironmentEffect)
g_game.disableFeature(GameItemAnimationPhase)
end

if version >= 1290 then
g_game.enableFeature(GameSequencedPackets)
g_game.enableFeature(GameBosstiary)
g_game.enableFeature(GameThingClock)
g_game.enableFeature(GameThingCounter)
g_game.enableFeature(GameThingPodiumItemType)
g_game.enableFeature(GameDoubleShopSellAmount)
end

if version >= 1300 then
g_game.enableFeature(GameDoubleHealth)
g_game.enableFeature(GameUshortSpell)
g_game.enableFeature(GameConcotions)
g_game.enableFeature(GameAnthem)
end

if version >= 1314 then
g_game.disableFeature(GameTournamentPackets)
g_game.enableFeature(GameDynamicForgeVariables)
end

if version >= 1320 then
g_game.enableFeature(GameEffectU16)
g_game.enableFeature(GameContainerTypes)
g_game.enableFeature(GameBosstiaryTracker)
g_game.enableFeature(GamePlayerStateCounter)
g_game.disableFeature(GameLeechAmount)
g_game.enableFeature(GameItemAugment)
g_game.enableFeature(GameDynamicBugReporter)
end

if version >= 1321 then
g_game.enableFeature(GameWrapKit)
g_game.enableFeature(GameContainerFilter)
end

if version >= 1332 then
g_game.enableFeature(GameForgeConvergence);
g_game.enableFeature(GameExtendedOpcode);
end
end
})
Dude, but this is the client that came with the server lol, I downloaded the Hellgrave server and this is the client that came with it lol


Please look in packet.log and it should give you details.

my packet.log gives the same thing

1736262897465.webp
 
the first error before I log in again it gives this when I log in, and the second is when I give a target and the character freezes, it doesn't show damage, it doesn't show effect, it gets stuck lol.
First error in protocol often breaks client<->server communication and all next errors are just result of first packet that showed some error.
Fixing protocol errors may take minutes, days or weeks. You never know, if you are close to solution, until you find it.
If you had some working client/server and after changes it does not work anymore, then revert your changes.

There are only 2 states of game protocol: server and client use 100% the same protocol (C++ and Lua code related to protocol) and have 100% the same information about items (client: Tibia.dat; server: items.otb, items.xml) OR protocol is broken and there is no information what is wrong.

Your protocol breaks on 9083 of 13552 bytes (first packet). Someone would have to analyse first 9083 bytes (comparing client and server C++ files and items.otb/Tibia.dat attributes, byte by byte!) and find out why 9094th byte is wrong. It would take hours, for sure no one on forum can help you :(
 

Similar threads

Back
Top