Valhalla Legends Forums Archive | Battle.net Bot Development | WC3 - firing a trigger with a chat event in-game

AuthorMessageTime
Strilanc
I've been looking into the packets sent during the game, and seeing what kind of things I can get away with if I inject custom ones.

For example, there is a packet to fire triggers with a chat event. The packet is needed because other private chat couldn't trigger events for all players. An obvious side-effect of such a packet is that any map with a chat event with substring "" allows people to listen to private chat.

But I don't want to listen in on private chat. I want to fire any trigger with a chat event at will (when I'm host). For example, this is useful if a host bot wants to set the game mode in DOTA.

Here is an example packet:
Code:

F7 0C 1B 00 FA 00 DB 08 02 10 00 60 26 03 00 00 26 03 00 00 2D 74 65 73 74 31 00

F7 - Game packet header
0C - Packet ID
1B 00 - Total size (27)
FA 00 - Tick time (250 milliseconds)
DB 08 - CRC of following data
02 - Player index (not equivalent to player 2, partially based on join order)
10 00 - Size of following chunk (16)
60 - Unknown constant (probably means chat trigger event)
26 03 00 00 - Event handle address
26 03 00 00 - Event handle address again
2D 74 65 73 74 31 00 - Chat string ("-test1")


This will usually fire the event at 26 03 00 00. But if the player index doesn't match the event's player's index or the player index is the local player's index then it won't fire. I want to get around this (specifically the local player thing). Any suggestions?

As a side note, sending the 'chat' packet (not this one) will cause the player to speak even if it's the local player. The potential abuse of that is... wow. Send instructions to the other team, seemingly in private chat from their own team member.
April 25, 2008, 6:34 PM
Xarian
I have a decent reason for resurrecting this topic

http://forum.codelain.com/index.php?topic=2603.0

See my recent post.  I've solved the 'local player' issue, but it still requires >1 player in the map.  I have successfully activated my arbitrary trigger.

It works primarily because you can set up event addresses to be sequential when you register them.  You have no idea how much this post helped me, by the way.  I would not have been able to figure out the event address stuff without it.
January 19, 2009, 1:10 AM

Search