Skip to content

1. W3HMC

trigger edited this page Jul 4, 2018 · 1 revision

Hostbot-Map Communication

Warcraft III Hostbot-Map Communication (W3HMC) provides functionality allowing maps and hostbots to send and receive arbitrary data to and from each other.

Demo: W3HMC.w3x

Enabling

In your hostbot configuration file make sure bot_w3hmc = 1.

Your map configuration file should have the following values.

map_w3hmc = 1
map_w3hmcsecret = PRIVATE_KEY # change this to something secret
map_w3hmcgcname = W # this must match W3HMC_CACHE_FILENAME in the W3HMC JASS library
map_w3hmcbotname = HMCBot # the name of the fake player
map_w3hmcbotslot = 4 # slot of the fake player. this must match W3HMC_PLAYER in the W3HMC JASS library

# You only have to change these values if for some reason you 
# can't get W3HMC_TRIGGER to be the first created handle in your map
# or if Blizzard changes something.
map_w3hmctid1 = 114 
map_w3hmctid2 = 4

Example: w3hmc.cfg

Integrating

The easiest way to get started is by using the demo map.

You can also copy the W3HMC vJass Library over to your map. This library provides the API to execute commands on the hostbot and get the response. The documentation is included in the header of the script. However, it's recommended you also include any other libraries which you want the functionality of, for example WebRequests.

Clone this wiki locally