blackdtools / Blackd-Proxy-CLASSIC

Blackd Proxy CLASSIC
MIT License
9 stars 7 forks source link

Issue with packetType &HAA and it's subPackets #43

Closed Nrated closed 8 years ago

Nrated commented 8 years ago

Ok, im not sure about this but it isn't working on 7.6 at least. In function LearnFromPacket theres a case &HAA

Case &HAA
       ' chat - eval to skip enough bytes
      If TibiaVersionLong > 760 Then
        pos = pos + 4 'skip 4 strange bytes (always 00 00 00 00 )
      End If
      lonN = GetTheLong(packet(pos + 1), packet(pos + 2))
      pos = pos + 3

      nameofgivenID = ""
      For itemCount = 1 To lonN
        nameofgivenID = nameofgivenID & Chr(packet(pos))
        pos = pos + 1
      Next itemCount
      If (nameofgivenID = CharacterName(idConnection)) Then
        itsMe = True
      Else
        itsMe = False
      End If
      blnDebug1 = False 'for debug

      If TibiaVersionLong >= 773 Then
        ' NEW : level of the person who is talking
        'frmMain.txtPackets.Text = frmMain.txtPackets.Text & vbCrLf & _
         "TALKING > " & GoodHex(packet(pos)) & " " & GoodHex(packet(pos + 1))
        templ1 = GetTheLong(packet(pos), packet(pos + 1))
        If templ1 = 0 Then ' npc is talking
            doingTrade(idConnection) = True
        End If
        pos = pos + 2 'skip level
      End If
      subType = CLng(packet(pos))
      Select Case subType

      Case newchatmessage_H9
        ' new since Tibia 8.72 ' use hotkey

Thats a shortened vertsion but what i meant is that subPacket is being translated into LONG:

subType = CLng(packet(pos))
 Select Case subType
 Case newchatmessage_H9
        ' new since Tibia 8.72 ' use hotkey

and this select contains cases with variables like oldmessage_H7 and the value signed to it is a byte(&H7) so it won't probably work since select case should be a LONG so oldmessage_H7 should be equal to 7, not &H7

There's no way to use RRV in 7.6 server that i'm playing on while using blackd with hardcorecheats turned on

divinity76 commented 8 years ago

what is "RRV"?

Nrated commented 8 years ago

Report Rule Violation (ctrl+r)

For example with default Blackd.exe you can write a report with 2 chars max like "yo" otherwise you're gonna get disconnected :D

Nrated commented 8 years ago

I've fixed this thing for myself but I don't know about higher tibia versions

Nrated commented 8 years ago

I had to add new packetType(&HB0) in Function LearnFromServer, set one exception for subType in &HAA packet, and fix 2 message types in EvalClientMessages, but i will pull commit after checking higher tibia versions and different 7.6 servers(for now it's working on two 7.6 servers that Im playing on) Tutors/GM's were also affected by this : p