• Welcome to Valhalla Legends Archive.
 

Help 0X7F

Started by spear, April 03, 2005, 02:06 PM

Previous topic - Next topic

UserLoser.

Quote from: HdxBmx27 on April 04, 2005, 06:12 PM
0000:  FF 7F 0D 00 41 72 6D 79 7A 00 03 01 00            ÿ...Spear...
Quote(STRING)     Username
(BYTE)        Rank
(BOOLEAN)    Online (8-bit)
(BYTE)        Unknown
Hurm, lets work through this:
FF 7F 0D 00 ÿ... The header, Dont need this, toss it. So the next thing to come would be a String....
41 72 6D 79 7A 00 Spear. Strings for *most* Binary servers are Null terminated, so the string ends at Chr$(&H0), So you trim it off resulting in: Spear
Next to come is a Byte, for the rank.
03 . Byte = 1 byte.. the smallest thing above a bit... This byte is used to determin the rank, so compare it to this list:
Quote0x00: Initiate that has been in the clan for less than one week
0x01: Initiate that has been in the clan for over one week
0x02: Member
0x03: Officer
0x04: Leader
and you get the person is an Officer. Now next to come is a Boolean(8-bit).
01 .a boolean (8-bit) is just a byte, that only has two possible values, 0 and 1. 1 byte = 8 bits, Just fyi. The value ofp this one is 1, so he is online. Next is the unknow, dont need it so jsut get rid of it.

It's not that hard, just work form the biginning of the packet, and remove what you have parsed. Untill you eaither get good, or make a Packet-DeBuffer object, you'll use a lot of Data = Mid(Data, #)'s

I HIGHLY suggest you do some other work with binary values, before you get into a Bnet bot.
~-~(HDX)~-~

Actually, a boolean in VB is two bytes