can someone help me?
I am using the following structure to send the list of characters
for tibia client 7.6 in vb.net, sorry for the bad handling bytes hehehe but follows the code
PHP Code:
'2 bytes packet length
'1 byte packet type (0x14)
'2 bytes motd length
'x bytes motd (id:0-255 + message, example: 123 + "\n\nyaddayadda")
'0x64 (not sure what this is)
'1 byte amount of characters
'--- loop this
'---2 bytes character name length
'---x bytes character name
'---2 bytes server name length
'---x bytes server name
'---4 bytes server ip
'---2 bytes server port
Dim mtd As String = "123 + \n\nyaddayadda"
Dim characterName As String = "Duca Nuker"
Dim PacketSize As Short
Dim PackType(0) As Byte
PacketType = BitConverter.GetBytes(Convert.ToInt16(&H14))
Dim MotdLength As Short = Convert.ToInt16(Encoding.ASCII.GetBytes(mtd).Length)
Dim Motd As [Byte]() = Encoding.ASCII.GetBytes(mtd)
Dim CharListType As Short = &H64
Dim AmmountOfChar As Byte = Convert.ToByte(1)
Dim charNameLength As Short = Convert.ToInt16(Encoding.ASCII.GetBytes(characterName).Length)
Dim charName As [Byte]() = Encoding.ASCII.GetBytes(characterName)
Dim serverNameLength As Short = Convert.ToInt16(Encoding.ASCII.GetBytes(characterName).Length)
Dim serverName As [Byte]() = Encoding.ASCII.GetBytes(characterName)
Dim ipServer(3) As Byte
ipServer = Encoding.ASCII.GetBytes("127.0.0.1")
Dim portServer As Short = 7171
Dim premDay As Short = 60
PacketSize = Len(PacketSize) + Len(PacketType.Length) + Len(MotdLength) + Motd.Length + Len(CharListType) + Len(AmmountOfChar) + Len(charNameLength) + charName.Length + Len(serverNameLength) + serverName.Length + ipServer.Length + Len(portServer) + Len(premDay)
The structure this done correctly? when I send the package nothing happens on the client tibia 7.6