5

I have an Adafruit (Gemma) / Arduino and a Neopixel LED ring that I would like to control from World of Warcraft in-game events. This part is soldered and working.

Question:

Is there any way to send communications between World of Warcraft and some sort of listener on the PC that can then in turn send messages over USB to the Arduino/Gemma device?

My aim is to create an on-desk LED indicator e.g. if I'm a healer, then I want green/yellow/red light to represent the health of each raid/party member - so refreshes would be required at a high rate (0.5 / sec).

Thanks for your feedback in advance and welcome any future possibilities with the soon to be released Warlords of Draenor.

Colonel Thirty Two
  • 23,953
  • 8
  • 45
  • 85
DanAbdn
  • 7,151
  • 7
  • 27
  • 38

3 Answers3

3

Is there any way to send communications between World of Warcraft and some sort of listener on the PC

Not directly via the WoW API. I came up with a way which I've never shared, because my usage broke Blizzard rules. But I haven't played in years, so here ya go. :)

I used an addon to create a one pixel frame in the top-left of the WoW window. I manipulated the color of this pixel to send data to the outside world.

The "listener" app can read this pixel with three Win32 calls:

  HWND hwnd = FindWindow(NULL, "World of Warcraft"); // find WoW window
  HDC hdc = GetDC(hwnd); // get the device context (graphics drawing abstraction)
  COLORREF color = GetPixel(hdc, 0,0); // read the pixel at x 0, y 0

I then interpreted the bits of the color like this:

  4:  sequence number
  7:  checksum: (sequence + key code + ctrl + alt + shift + win)/6
  8:  key code or ASCII character
  1:  1: virtual key code, 0: ASCII
  1:  CTRL key pressed
  1:  ALT key pressed
  1:  SHIFT key pressed
  2:  WINDOWS key pressed

The "sequence number" was just means of detecting that a new message had been posted to the pixel. The checksum was to prevent bogus reads when my special pixel was not active, like during loading screens. The rest was keystroke information. This allowed me to generate keystrokes from an addon. The entire watcher app is about 100 lines of C. Very simple.

I wrote an in-game script editor and used this with "pixelbot" to automate things in game. Towards the end of my WoW life I had more fun coding for Wow than playing it, which is saying a lot, because it's a fun game. :) One upon a time I knew everything there was to know about WoW addon programming, but I'm several years out of date now. I'll see if I can dig up some pixelbot Lua code for, though.

Anyway, you can adapt this scheme to send any messages you like. For instance:

  4: sequence number
  7: checksum (sequence + player number + LED color)/3
  5: player number
  2: LED color (0: green, 1: yellow, 2: red)
  6: *reserved*

As for speed, I never actually measured it, but it blows away your 0.5 second requirement. At most a few milliseconds of latency between writes and reads.


that can then in turn send messages over USB to the Arduino/Gemma device?

That's just writing to the serial port in the "watcher" app and using Arduino libraries for read from the serial port inside your device.


I have source code for the "listener" app (pixel watcher) and for the WoW side stuff that writes message to the pixel. Let me know if you're interested and I'll help you out of band or dramatically increase the side of this post.

Mud
  • 28,277
  • 11
  • 59
  • 92
0

After some research, I did not found any built-in functionnality to signal/pipe/communicate with an external software. I believe it is due to the anti-bot blizzard policy. Actually you could do this with a memory watcher ( just like CheatEngine ), but there is chances you'll be banned for using this.

The only thing you could do if you can't find anything, is to ask on official forum, and hope a technic-friendly blue poster will answer =)

If you find anything, update your post, your idea is pretty interesting =)

Hotted24
  • 502
  • 3
  • 8
0

There are only two ways to communicate with the game client without breaking the ToU:

  1. Saving variables between sessions. Meaning that you can have an addon read and write to its storage file but this requires you to either relog or to /reload the UI for this file to be written to and read from. In short this wouldn't be so viable.
  2. Have an addon use a tiny space on screen to write colors and use said colors to communicate with your external software by reading the pixels on screen.

There are many ways to achieve the second suggestion. You only need to be able to write this addon for the game. Then write an external program to read pixels. Sending commands back to the game would require hotkeys or sending it in the chat window.

Note that you are still limited to the API in-game that require hardware events. So for those you'd have to push a button or use the mouse to buypass.

Vlad
  • 29
  • 1
  • 2