Valhalla Legends Forums Archive | Battle.net Bot Development | see if ive got this right...

AuthorMessageTime
gotcha_ass
Ok wen I log packets they look like this:

FF 51 32 34 etc.

but in actuallity its this:

FF513234

right? ok then can I use this code to extract the PacketID, Length, and Data from a packet??

[code]
'im leaving some declerations out for sake of space

PacketID = Mid(packet, 3, 2)
PacketLen = Mid(packet, 4, 4)
PacketData = Mid(packet, 9, PacketLen)
[/code]

I have a feeling this is wrong but its my first try at making my own code.
January 29, 2003, 6:47 PM
iago
FF 51 32 34
that's 4 bytes, a byte is 2 hex characters

ID = 51, which is mid(String, 2, 1)
Length = &h3432, I'm not sure how to extract that in VB, makeword() or something..
and that data is everything else, mid(String, 5, Length) or mid(String, 5, &h3432) in this case
January 29, 2003, 8:44 PM
gotcha_ass
ohh ok I gotcha

do you add the 2bytes that make the length or jus put them together??

I found this code to get the PacketID
[code]
PacketID = Asc(Mid(Data, 2, 1))
[/code]

But why do they use the Asc, whis returns the ANSI character code of the 1st letter in the string??
January 29, 2003, 10:07 PM
MesiaH
iago, it would be simple to extract it, by using mid

PacketLength = "&h" & mid(packet, 3, 2)

somethin like that should make a simple dword, since data is not received in hex!!!!!!!!!!!!!!

those spaces your packet loggers show you, are not there!
January 30, 2003, 12:56 AM
Arta
Gotcha:

You're trying to make a bot whilst having absolutely no knowledge, from what I can tell, of the systems you are using. You need to put the bot aside, and do some reading - about binary and hex, and number systems in general; about how data is stored, transmitted, and displayed; about how to take data, generally speaking, and process it to extract the information you need -- This is basic knowledge that you need before you can attempt to write any kind of complex application, and while your attempts are laudible, they are also somewhat absurd. You clearly have the drive and interest to learn, so why not do it properly? Give yourself a good grounding in these fundamental computing principles and then return to Battle.net -- hopefully with far greater understanding of what you're doing.

You'll benefit in the longrun from having a little patience and learning to walk before you try running.
January 30, 2003, 7:17 AM

Search