Valhalla Legends Forums Archive | Battle.net Bot Development | D2GS Packets

AuthorMessageTime
DarkMinion
Are they all compressed, or just certain packets?
July 20, 2004, 8:54 PM
UserLoser.
All of the packets from the server are compressed.
July 20, 2004, 9:02 PM
ChR0NiC
JESUS!! :o CHECK OUT THAT RACK !!

Here's some documentation by the whole world's good friend Userloser, which you probably already know about. Userloser's Packet Referral

Edit: As you can see, he has done alot of work on it. Cheers to you UserLoser.
July 20, 2004, 9:04 PM
UserLoser.
For those of you interested in this look in D2Net.dll @ .data:6FC08148 PacketSizeTable. It seems to be:

[code]
DWORD PacketSizeTable[] = { 0x1, 0x8, 0x1, 0xc, ... };
[/code]

Where 0x1, would be length of packet 0x0, 0x8 is length of packet 0x1, and so on.
July 20, 2004, 9:47 PM
OnlyMeat
[quote author=UserLoser. link=board=17;threadid=7783;start=0#msg71541 date=1090357378]
All of the packets from the server are compressed.
[/quote]

I have been working on D2GS packets recently, and from my experience some packets are compressed and others are not take for example the first couple of packets the D2GS server sends you when you connect:-

(1) AE 01 00 00 00 00
(2) 05 7A 09 2E EF 00

These dont appear to be compressed( the first byte are always these values) and especially considering their size the ratio would be insignifigant.

Also another interesting fact is the format it'self does not appear to be uniform for the smaller packets ie. < 10 bytes the first byte seems to be the length ( - the nulls) although not in all cases as proved by the (1) example.

And again the larger packets (compressed ones) the first byte appears to be the compressed length of the packet, for instance while experimenting i found that in game chat messages use a compressed format of:-

S-->C
(BYTE) Compressed Length
(BYTE) 0x0f always this value for messages

Just as a side note the server sends back the message you sent which is a little inefficient as the client could just simulate that event locally.

I am still working on in game packets currently so this may not be totally correct but it appears this way from my analysis.
July 22, 2004, 1:28 AM
Soul Taker
[quote author=OnlyMeat link=board=17;threadid=7783;start=0#msg71758 date=1090459689]
Just as a side note the server sends back the message you sent which is a little inefficient as the client could just simulate that event locally.[/quote]
If you simulated all your actions locally with no confirmation from the server, there would be lots of desynching due to lag I would think.
July 22, 2004, 1:50 AM
UserLoser.
[quote author=OnlyMeat link=board=17;threadid=7783;start=0#msg71758 date=1090459689]

I have been working on D2GS packets recently, and from my experience some packets are compressed and others are not take for example the first couple of packets the D2GS server sends you when you connect:-
[/quote]

Oops, but as far as I know, all the packets actually in the game are compressed from the server.
July 22, 2004, 2:01 AM
OnlyMeat
[quote author=Soul Taker link=board=17;threadid=7783;start=0#msg71767 date=1090461049]
[quote author=OnlyMeat link=board=17;threadid=7783;start=0#msg71758 date=1090459689]
Just as a side note the server sends back the message you sent which is a little inefficient as the client could just simulate that event locally.[/quote]
If you simulated all your actions locally with no confirmation from the server, there would be lots of desynching due to lag I would think.
[/quote]

I did'nt say all actions i mean just the chat messages like the way bnchat does it if you send a message in a channel the server does'nt send you back the message you sent in the first place it would just be superflous and cause undue network bandwidth usage albeit maybe only a small amount for the client but if the server does that for each client you can see how it will build up.

I mean think about it in the end it's just drawing some text to a local direct draw device it's not going to affect the way the game plays out :p

Thinking again actually some clients do get an echo of the message back ie. d2 chat clients but sc/bw war 2 and d1 dont as far as i know
July 22, 2004, 3:22 AM
iago
Just on a sidenote -- Blizzard HAS implemented some anti-botting and anti-hacking code into Diablo II 1.1. They have yet to act on it, however, but the code has been identified by a friend of mine. Just a word of warning, I would'nt recommend botting on your own cdkey/account.
July 22, 2004, 5:35 AM

Search