Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: iNsaNe on October 21, 2007, 06:41 PM

Title: 0x63 (Arranged Team Invite)
Post by: iNsaNe on October 21, 2007, 06:41 PM
Hey guys, I'm having a bit of trouble with accepting / sending arranged team invites.
(http://forum.valhallalegends.com/index.php?topic=6205.0 (http://forum.valhallalegends.com/index.php?topic=6205.0))

I have made the bot so that it can invite players and accept invites, but every time the bot accepts an invite or the user accepts the bot's invite I get the error from battle.net: "The team game you attempted to join could not be found..." and the inviter gets the firewall message.

I'm sending the port (e0 17, 6112) which I use to connect my bot with. I also use that same port with Warcraft 3.
Any help would be appreciated
Title: Re: 0x63 (Arranged Team Invite)
Post by: brew on October 21, 2007, 06:49 PM
Quote from: iNsaNe on October 21, 2007, 06:41 PM
I'm sending the port (e0 17, 6112) which I use to connect my bot with. I also use that same port with Warcraft 3.
This is a completely wild guess, and I've never worked with this packet before, but aren't you supposed to htons() the port ?
Title: Re: 0x63 (Arranged Team Invite)
Post by: iNsaNe on October 21, 2007, 06:50 PM
I'm not sure, this is the first time I've worked with this packet as well. In the packet logs I've seen e0 17 a bunch so I don't think you have to
Title: Re: 0x63 (Arranged Team Invite)
Post by: Michael on October 21, 2007, 06:54 PM
are you sending the packet in UDP? i think it should be sent in UDP not TCP. i could be wrong.
Title: Re: 0x63 (Arranged Team Invite)
Post by: MyndFyre on October 21, 2007, 07:19 PM
Quote from: -MichaeL- on October 21, 2007, 06:54 PM
are you sending the packet in UDP? i think it should be sent in UDP not TCP. i could be wrong.

Warcraft 3 uses TCP.
Title: Re: 0x63 (Arranged Team Invite)
Post by: iNsaNe on October 21, 2007, 08:41 PM
im noticing something different when im packet logging. When you are in the "Arranged Team Lounge" (lol) the packet headers begin with f7 instead of ff. Am i wrong?

Instead of replying with a normal ff 63 do i reply with an f7 1e? they seem to have the same structure

f7 1e is just like:

(DWORD)     Cookie
(DWORD)     Host random token value?
(BYTE)      0
(WORD)      Host port
(DWORD)     not sure
(STRING)    Host name
(DWORD)     not sure
(DWORD)     not sure
(DWORD)     5
(DWORD)     0
(BYTE)      0


laugh at me if you want, im no researcher.
Title: Re: 0x63 (Arranged Team Invite)
Post by: squiggly on October 21, 2007, 09:51 PM
0xF7 begins the WC3 in-game header, just as 0xFF does for BNCS messages

the structure is similar to BNCS,


(BYTE)    0xF7
(BYTE)    Message ID
(WORD)    Message length (including header)
(VOID)    Message Data
Title: Re: 0x63 (Arranged Team Invite)
Post by: UserLoser on October 22, 2007, 01:30 PM
Do you have a TCP socket setup listening and accepting incoming connections?  If not, that may be why it says "game not found"
Title: Re: 0x63 (Arranged Team Invite)
Post by: Chavo on October 22, 2007, 02:06 PM
Quote from: iNsaNe on October 21, 2007, 08:41 PM
f7 1e is just like:

(DWORD)     Cookie
(DWORD)     Host random token value?
(BYTE)      0
(WORD)      Host port
(DWORD)     not sure
(STRING)    Host name
(DWORD)     not sure
(DWORD)     not sure
(DWORD)     5
(DWORD)     0
(BYTE)      0

The last 16 bytes are a sockaddr_in (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/sockaddr_2.asp) struct that you will need to pass on to any clients (via 0xF706) if you are the game host.