Valhalla Legends Forums Archive | Battle.net Bot Development | WC3 Custom Game -> Sending a chat message?

AuthorMessageTime
coin3d
Hello everybody,

I'm trying to send a chat message via a socket into the chat of a custom game. Therefore I joined the private game of a friend and sniffed a chat package with wireshark, which contained the message "abc":

[code]0xf7, 0x28, 0x0c, 0x00, 0x01, 0x01, 0x02, 0x10, 0x61, 0x62, 0x63, 0x00[/code]

Afterwards I created a new game for myself, created a socket in my python script and sent a join packet - and, finally the chat message packet, which worked perfectly. But when I tried to point the script to my friend's ip, the bot just joined and left the channel without saying "abc" - after I left the game, and started the script again, the bot joint the game and sent my friend "abc", but then ONLY to my friend.

To cut a long story short: Has anybody experience with chat messages in custom games, and could help me out? What am I doing wrong?

Thanks!
June 11, 2009, 7:28 PM
Sveet
correct me if i'm wrong, but don't you have to send chat to each player in the game? thats how ghost sends the motd/enter message to only 1 person at a time.
June 12, 2009, 2:47 AM
MysT_DooM
If W3GS is anything like SCGS than yeah, one would have to send the chat to each person.
June 12, 2009, 5:33 PM
BreW
[quote author=MysT_DooM link=topic=17984.msg182947#msg182947 date=1244827988]
If W3GS is anything like SCGS than yeah, one would have to send the chat to each person.
[/quote]
Funny you'd say that, i thought it was overwhelmingly obvious there is no SCGS.
June 12, 2009, 5:42 PM
Perma
[quote author=Sveet link=topic=17984.msg182944#msg182944 date=1244774848]don't you have to send chat to each player in the game?[/quote]

Yes, this is correct as far as I know.
June 12, 2009, 6:43 PM
MysT_DooM
[quote author=brew link=topic=17984.msg182948#msg182948 date=1244828533]
[quote author=MysT_DooM link=topic=17984.msg182947#msg182947 date=1244827988]
If W3GS is anything like SCGS than yeah, one would have to send the chat to each person.
[/quote]
Funny you'd say that, i thought it was overwhelmingly obvious there is no SCGS.
[/quote]

wat do you mean
June 12, 2009, 7:14 PM
coin3d
You guys are absolutely right, I just tested it - if you send a message, then the message will be sent to each player. But what I still don't understand is:

How can a message be sent to someone, who has no related WC3 (e.g. 6112) port opened? And how does Warcraft get the IP adresses from each player?
June 13, 2009, 12:36 PM
BreW
I assume it'd get that from the game server.
June 13, 2009, 2:09 PM
Sveet
i believe when a player joins the game, a packet is sent to you containing useful information. its up to the client to keep track of the players.
June 13, 2009, 5:46 PM
Perma
I could be totally speaking out of my ass here, because I honestly did very little digging at the network level of Warcraft 3 apart from things relating to unit commands, but it was my understanding that in a custom game it is up to the host client to maintain the connections of all of the players and not the game server (which is the case in ladder games).

Meaning the host would be the only one with access to every IP address in the game. I'm not certain on this, though.
June 16, 2009, 4:24 AM
Zephyrix
Lol.
While you are correct Perma, all chat is sent to the host before being forwarded to everyone else.
The reason why only your friend is receiving the chat message is because the packet for sending chat requires a list of player ids which the chat is directed to.
June 17, 2009, 6:37 AM

Search