Valhalla Legends Forums Archive | Battle.net Bot Development | D2GS - Dropped due to time out

AuthorMessageTime
Elneroth
I've looked all over D2GS documentation, and can't find any information on this.
I was wondering if anyone knows what's wrong.

After sending a message (chat) in a game, about 30 (average) seconds later, I get timed out, and the connection get's reset by the GS. I do not get a timed out if I do not send chat.
*Also, when I have another character in the game I don't see the chat sent by my bot untill a couple seconds before it's timed out.
Also, I can run around without getting dropped out. (Packet 0x03).

Any information will be appreciated.

Thanks,
-Elneroth

*Edit* Also: I am sending 0x06 (Ping) every five seconds.
July 5, 2005, 5:28 AM
UserLoser.
You must send a "heartbeat" every 15 seconds or so...
July 5, 2005, 5:30 AM
Elneroth
If you mean ping, I'm sending it every five seconds.
Or are you saying I should send it every fifteen seconds instead?
July 5, 2005, 5:34 AM
Ringo
D2 sends it every 6 or 7 seconds and it should be sent when recving '06 7A 04 64 BB BC' (compressed) between the logon packets and then be sent every 6 to 7 seconds from then on.
But not sending it untill 5 seconds after joining the game souldnt cause you to drop :(
Do you recv 0x15 packets in responce to walking around before you drop?
Only other thing i can think, is your sending a packet incorrectly.
I would be very carefull how you send packets to the gs, because i was reading a post about a hack list (server logs incorrect packets) :o

[edit]
i just noticed, you said your sending 0x06 as ping packet.
Telling the server your useing your left skill on an invalid object ID is not good.
The correct ping packet is the 2nd packet in this list
July 5, 2005, 6:13 AM
Elneroth
I'm sending it Right when I get accepted from the D2GS Login.
And it's being sent every 5 seconds after that.

I don't recall getting 0x15 packets. Also, I do not drop when I'm walking around. It's only when I sent a message.

    .InsertBYTE &H1
    .InsertBYTE &H0
    .InsertNTString Data
    .InsertBYTE &H0
    AddChat vbWhite, VarCName, vbWhite, ": ", QBColor(11), Data
    .SendGame &H15

Here's my send chat
July 5, 2005, 6:24 AM
Ringo
Your missing a null byte.

[code]
  .InsertBYTE 1
  .InsertBYTE 0
  .InsertNTString data
  .InsertNTString ""
  .InsertNTString ""
  .SendGame &H15
[/code]
The 2nd string only gets filled with a ingame charname if your trying to @wisper somone (chat type 0x02) and the 3rd string (witch your missing) doesnt get used i dont think.
July 5, 2005, 6:30 AM
Elneroth
I had that at first, thought that was the problem :-p, but like 5 minutes later I realized I was sending it to the wrong winsock.

I'll change that back and give it a try.
Thanks for the help.

*Edit*: Yes, it works. Once again, thanks for the help
July 5, 2005, 6:38 AM
UserLoser.
IIRC, 0x6c message (heartbeat, or as you say, ping [is this really what's used to calculate ping?]) consists of two dwords.  One is your time value (GetTickCount() or similar), the second one is the amount of milli-seconds your last one was sent.  IIRC once again (sorry it's been probably over a year since I've looked at this, it could have changed), first 0x6c is: GTC & 0x00000000.  Then the next one and all the heartbeats after are: GTC & (GTC - Time last heartbeat was sent).  Hope this makes sense, this post is kind of confusing
July 6, 2005, 4:19 AM
LordNevar
[code]
        .InsertDWORD GetTickCount
        .InsertDWORD &H0
        .SendGamePacket &H6C
[/code]

Is what the basic of this packet should look like, it is suggested to send it every 6-7 seconds, but 10 seconds works just fine for me.

Note: This packet should only be sent while your in a game, so just stick it on a timer to be used accordingly.
July 6, 2005, 4:34 AM
Ringo
[quote author=UserLoser link=topic=12076.msg119186#msg119186 date=1120623593]
IIRC, 0x6c message (heartbeat, or as you say, ping [is this really what's used to calculate ping?]) consists of two dwords.  One is your time value (GetTickCount() or similar), the second one is the amount of milli-seconds your last one was sent.  IIRC once again (sorry it's been probably over a year since I've looked at this, it could have changed), first 0x6c is: GTC & 0x00000000.  Then the next one and all the heartbeats after are: GTC & (GTC - Time last heartbeat was sent).  Hope this makes sense, this post is kind of confusing
[/quote]

Hm, i get what you mean, i havent really payed much notice to it, but the last dword does resemble the dword in the 0x53 game refresh packet
I think i remember seeing it sit on a fixed number for about 10 times, but i cant remember.
Do you think the server would check the last dword?
Iv always just used null.
July 6, 2005, 4:37 AM
LordNevar
[quote author=Ringo link=topic=12076.msg119190#msg119190 date=1120624623]
[quote author=UserLoser link=topic=12076.msg119186#msg119186 date=1120623593]
IIRC, 0x6c message (heartbeat, or as you say, ping [is this really what's used to calculate ping?]) consists of two dwords.  One is your time value (GetTickCount() or similar), the second one is the amount of milli-seconds your last one was sent.  IIRC once again (sorry it's been probably over a year since I've looked at this, it could have changed), first 0x6c is: GTC & 0x00000000.  Then the next one and all the heartbeats after are: GTC & (GTC - Time last heartbeat was sent).  Hope this makes sense, this post is kind of confusing
[/quote]

Hm, i get what you mean, i havent really payed much notice to it, but the last dword does resemble the dword in the 0x53 game refresh packet
I think i remember seeing it sit on a fixed number for about 10 times, but i cant remember.
Do you think the server would check the last dword?
Iv always just used null.
[/quote]

I've used null as well, I really don't think that it does check it. I've never had a problem with it, I can sit in games for hours without moving just every now and than sending a random message, mostly character speech messages like when you hit the number key and it works just fine.
July 6, 2005, 4:41 AM

Search