Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Gangz on March 09, 2004, 11:25 PM

Title: Friends list (0x65) Parsing
Post by: Gangz on March 09, 2004, 11:25 PM
0000:  FF 65 B7 00 0A 42 6C 65 5B 73 5D 73 00 00 00 00   ÿe·..Bles....
0010:  00 00 00 00 43 65 72 62 65 72 75 73 00 01 02 50   ....Cerberus.P
0020:  58 45 53 43 6C 61 6E 20 63 4C 00 44 61 72 6B 4C   XESClan cL.DarkL
0030:  6F 72 64 00 00 00 00 00 00 00 00 6C 29 65 76 69   ord........l)evi
0040:  6C 69 73 68 5B 65 53 5D 40 4C 6F 72 64 41 65 72   lish[eS]@LordAer
0050:  6F 6E 00 00 00 00 00 00 00 00 45 64 77 61 72 64   on........Edward
0060:  6F 77 00 00 00 00 00 00 00 00 2E 2E 2E 40 5E 5E   ow...........@^^
0070:  40 2E 2E 2E 00 00 00 00 00 00 00 00 53 65 72 69   @...........Seri
0080:  61 6C 7E 4B 69 6C 6C 61 00 00 00 00 00 00 00 00   al~Killa........
0090:  47 61 6E 67 7A 00 00 02 50 58 45 53 00 55 5F 53   Gangz..PXES.U_S
00A0:  75 78 00 00 00 00 00 00 00 00 54 6F 4E 6B 41 00   ux........ToNkA.
00B0:  00 00 00 00 00 00 00    

This is what comes back on a packet log, but i dont understand how to parse  out the incomming data. Any tips or advice anyone can add to point me in the right direction?

Edit - Added [ pre ] tags so your paste looks prettier.
Title: Re:Friends list (0x65) Parsing
Post by: FuzZ on March 10, 2004, 12:43 AM
Quote from: Gangz on March 09, 2004, 11:25 PM
Any tips or advice anyone can add to point me in the right direction?

http://bnetdocs.valhallalegends.com
This may or may not help you, I hope it does.
Title: Re:Friends list (0x65) Parsing
Post by: Gangz on March 10, 2004, 01:15 AM
bnet docs did not help much in this case.. I am having problems triing to parse it. The incomming data is a little mixed up. If it was for a single user it would not be hard. But for a list up to 25 I dont understand how to seperate each user
Title: Re:Friends list (0x65) Parsing
Post by: o.OV on March 10, 2004, 06:08 AM
I believe it looks hectic to you because of the illegal username in there  ;)

And some character's you paste doesn't show up when you paste it..
that may be another cause.

Add-On:

2E 2E 2E 40 5E 5E 40 2E 2E 2E
...@^^@...

Example Parse:

FF 65 B7 00                       ÿe·.
packet / length data

0A                                 .
I would use this to signify where to start the parsing

42 6C 65 5B 73 5D 73               Ble[s]s
this is the username

00                                 .
this is the uesername's null terminator

00                                 .
this is the status byte (he is offline)

00                                 .
this is the location byte (he is offline)

00 00 00 00                        ....
this is the client/product he is using (he is offline)

00                                 .
this is another null terminator that follows the channel name.. if any
(he is offline)

43 65 72 62 65 72 75 73            Cerberus
username

00                                 .
username's null terminator

01                                 .
he is a "mutual" friend

02                                 .
he is in_chat

50 58 45 53                        PXES
he is using Starcraft Broodwar

43 6C 61 6E 20 63 4C               Clan cL
he is in Clan cL

00                                 .
this is the channel_name's null terminator
Title: Re:Friends list (0x65) Parsing
Post by: Adron on March 10, 2004, 11:46 AM
0A looks like how many you should parse?
Title: Re:Friends list (0x65) Parsing
Post by: Gangz on March 10, 2004, 12:24 PM
Quote from: Adron on March 10, 2004, 11:46 AM
0A looks like how many you should parse?

Is that a sure thing? Or a possibly?
Title: Re:Friends list (0x65) Parsing
Post by: tA-Kane on March 10, 2004, 01:13 PM
Quote from: Gangz on March 10, 2004, 12:24 PM
Quote from: Adron on March 10, 2004, 11:46 AM0A looks like how many you should parse?
Is that a sure thing? Or a possibly?
What is 0x0A? How many people do you have on your friends list? Is it likely that they're the same?

If so, is it possible that it's a coincidence?

If so, how likely is it a coincidence?

Read the packet one variable at a time while referencing BnetDocs, instead of trying to figure it all out at once. It will make a whole lot more sense.

Take it one step at a time and it'll be a lot easier.
Title: Re:Friends list (0x65) Parsing
Post by: Adron on March 10, 2004, 05:28 PM
Quote from: Gangz on March 10, 2004, 12:24 PM
Quote from: Adron on March 10, 2004, 11:46 AM
0A looks like how many you should parse?

Is that a sure thing? Or a possibly?

There are no sure things in the real world, they only exist in math.
Title: Re:Friends list (0x65) Parsing
Post by: Gangz on March 10, 2004, 07:04 PM
Thanks for the help all... Imma see if i can get this shit parsed out
Title: Re:Friends list (0x65) Parsing
Post by: o.OV on March 10, 2004, 08:29 PM
Quote from: Adron on March 10, 2004, 11:46 AM
0A looks like how many you should parse?

That would make sense :)
I would test this myself but..
I don't have war3 or diablo client/bot..

So Gangz. You have 10 usernames in your f list?
Title: Re:Friends list (0x65) Parsing
Post by: Eric on March 10, 2004, 08:38 PM
Quote from: o.OV on March 10, 2004, 08:29 PM
Quote from: Adron on March 10, 2004, 11:46 AM
0A looks like how many you should parse?

That would make sense :)
I would test this myself but..
I don't have war3 or diablo client/bot..

So Gangz. You have 10 usernames in your f list?

You don't actually need to be logged on to Warcraft III to use 0x65 as well as various other packets meant only for Warcraft III use.
Title: Re:Friends list (0x65) Parsing
Post by: o.OV on March 10, 2004, 09:28 PM
Quote
You don't actually need to be logged on to Warcraft III to use 0x65 as well as various other packets meant only for Warcraft III use.

Eh. That I didn't know.
Thanks for sharing it.
Title: Re:Friends list (0x65) Parsing
Post by: Gangz on March 10, 2004, 10:19 PM
0x65 is not war3 onlyu is it? im recievinng it properly on Starcraft.
Title: Re:Friends list (0x65) Parsing
Post by: Eric on March 10, 2004, 10:30 PM
Quote from: Gangz on March 10, 2004, 10:19 PM
0x65 is not war3 onlyu is it? im recievinng it properly on Starcraft.
It's meant to be, the only client you'll see it being used in is Warcraft III
Title: Re:Friends list (0x65) Parsing
Post by: Gangz on March 10, 2004, 10:37 PM
Quote from: LoRd[nK] on March 10, 2004, 10:30 PM
Quote from: Gangz on March 10, 2004, 10:19 PM
0x65 is not war3 onlyu is it? im recievinng it properly on Starcraft.
It's meant to be, the only client you'll see it being used in is Warcraft III

hrmm do you know the packet ment for starcraft?
Title: Re:Friends list (0x65) Parsing
Post by: Skywing on March 10, 2004, 10:40 PM
Quote from: Gangz on March 10, 2004, 10:37 PM
Quote from: LoRd[nK] on March 10, 2004, 10:30 PM
Quote from: Gangz on March 10, 2004, 10:19 PM
0x65 is not war3 onlyu is it? im recievinng it properly on Starcraft.
It's meant to be, the only client you'll see it being used in is Warcraft III

hrmm do you know the packet ment for starcraft?
There is none.  Starcraft doesn't (and probably will never) support this functionality natively in the UI, so there isn't fully-working support for the "programmatic" friends management that Warcraft III has.
Title: Re:Friends list (0x65) Parsing
Post by: Eric on March 10, 2004, 10:41 PM
Quote from: Gangz on March 10, 2004, 10:37 PM
Quote from: LoRd[nK] on March 10, 2004, 10:30 PM
Quote from: Gangz on March 10, 2004, 10:19 PM
0x65 is not war3 onlyu is it? im recievinng it properly on Starcraft.
It's meant to be, the only client you'll see it being used in is Warcraft III

hrmm do you know the packet ment for starcraft?

As I said, you can use it on all clients.
Title: Re:Friends list (0x65) Parsing
Post by: Skywing on March 10, 2004, 10:42 PM
Quote from: LoRd[nK] on March 10, 2004, 10:41 PM
Quote from: Gangz on March 10, 2004, 10:37 PM
Quote from: LoRd[nK] on March 10, 2004, 10:30 PM
Quote from: Gangz on March 10, 2004, 10:19 PM
0x65 is not war3 onlyu is it? im recievinng it properly on Starcraft.
It's meant to be, the only client you'll see it being used in is Warcraft III

hrmm do you know the packet ment for starcraft?

As I said, you can use it on all clients.
Note, however, that you won't properly receive notifications of users changing state if you aren't using Warcraft III/The Frozen Throne.
Title: Re:Friends list (0x65) Parsing
Post by: Gangz on March 11, 2004, 12:34 AM
K THANKS FOR THE HELP! :D
Title: Re:Friends list (0x65) Parsing
Post by: tA-Kane on March 11, 2004, 05:15 PM
Quote from: Gangz on March 10, 2004, 10:37 PMhrmm do you know the packet ment for starcraft?
Are you asking if there's a friends packet specifically for StarCraft? Look up SID_CHATCOMMAND and SID_CHATEVENT, event ID EID_INFO. You use CHATCOMMAND to send "/f l", and receive CHATEVENT (INFO event) to parse the friends list using StarCraft's "native" packets.