Thread Tools Display Modes
09-18-15, 04:17 AM   #1
cFx
A Murloc Raider
 
cFx's Avatar
Join Date: Sep 2015
Posts: 5
WoW to REST Service

Hey

I read the http://www.wowinterface.com/forums/s...ad.php?t=42367 thread and there stood, that it`s not possible for wow addons to access anything outside WoW, but I´m kinda curious how all the data driven sites have managed to post data to web services/ web apps.

Currently I haven`t got any XP in LUA/WoW-Dev, but would like to start an personal project for learning purposes. I want to create an Addon for posting the players current battleground-status in real time to an REST service.

So when queuing for AB it enters the player data into an db and when I´m out of the BG it should delete the db entry. The information should be stored in an JSON/XML-File and whenever the bg-status changes it should execute the post/update on the DB on the RESTful service.

The real time communication is very important here and I would like to know which ways of communicating to a web service are available, so I could directly dive in and create a solution.

Would appreciate some help in how this could be managed.
  Reply With Quote
09-18-15, 07:21 AM   #2
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Originally Posted by cFx View Post
Hey

I read the http://www.wowinterface.com/forums/s...ad.php?t=42367 thread and there stood, that it`s not possible for wow addons to access anything outside WoW, but I´m kinda curious how all the data driven sites have managed to post data to web services/ web apps.
You mean like Wowhead? Afaik (as well as it being the only legal way) they run an addon which collects data and writes it to saved variables. They then use an external application that reads the saved variables file and upload it to Wowhead.

Saved variables can only be written to when the UI "unloads", that is when you reload UI or log out. There's no allowed way to export data out of the game in real time.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
09-18-15, 07:50 AM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
It's also possible to pull a lot of data out of the game's own data files, which I'm sure Wowhead and the like do.

If you're talking about sites that show player profile info, they're pulling it from the official Battle.net API:
https://dev.battle.net/

However, neither of those will provide you with any way to export arbitrary data from in-game in real-time. That's simply not allowed, by design.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
09-18-15, 08:07 AM   #4
cFx
A Murloc Raider
 
cFx's Avatar
Join Date: Sep 2015
Posts: 5
Yeah, I was thinking about Worldoflogs,wowhead, etc. ... Was hoping for a function for creating a log-file, which get`s edited without ui reload/log out =/

But thx for the answers/help =)
  Reply With Quote
09-18-15, 08:14 AM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The combat log, like most other built-in logs, doesn't require a UI reload or logout to be written out to disk, because the game has total control of what's written to it. You can't write arbitrary info to the combat log.

However, you'll note that chat logs aren't written out in real-time.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
09-18-15, 01:08 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Originally Posted by cFx View Post
Yeah, I was thinking about Worldoflogs,wowhead, etc. ... Was hoping for a function for creating a log-file, which get`s edited without ui reload/log out =/

But thx for the answers/help =)
Even if these sites use addons to record data, they require registered users to submit data files for parsing after the fact. None of these sites work on real-time data. Even if there was a way to access the file system in real-time, this would be an easy attack vector for automation bots, which Blizzard is adamant against.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
09-19-15, 03:27 AM   #7
cFx
A Murloc Raider
 
cFx's Avatar
Join Date: Sep 2015
Posts: 5
Jepp, after rethinking it would be obviously an easy access-method to create advantages, sad but true =/
  Reply With Quote
09-19-15, 05:20 AM   #8
cFx
A Murloc Raider
 
cFx's Avatar
Join Date: Sep 2015
Posts: 5
Okay,

I got another solution idea, which shouldn`t be "illegal" :

So I would think about creating an Addon, which makes screenshots whenever an defined InGame Event happens. So

For example:

Player A queues for AB, the addon creates an screenshot of that event. The image is getting named ab_queue.jpg. So the image get`s saved in real-time. Also the Addon should provide some sort of signals, for example if a battleground pops a green signal appears. Therefore the green signal appears on the screenshot.

Than I have a program running in the background which watches the screenshot directory for the event_named screenshots (ab_queue,ab_pop,ab_leave,wsg_queue,wsg_pop,etc. ). If such an event with the addon-signal get`s captured, it takes this screenshot and processes it with some sort of image processing library to search and interpret the signals of the addon and if it has finished the interpretation, it loads up the data to my REST service. As I only need simple signals, it could be achieved through an addon with a total of 9 different signals (just want to have ab,wsg and av)

So my questions related to the WoW Addon API would be:

I read that it`s possible to shoot screenshots via an addon, but it`s also possible to name the screenshots? And if not, could I tell the Addon where the Screenshots should be stored? Like in an sub-folder of the screenshot folder?

Would appreciate your help again =)
  Reply With Quote
09-19-15, 12:24 PM   #9
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Again, stuff that happens in real time is locked down tight. The game saves screenshots to the Screenshots folder - and that folder only - and names them based on the date/time they were taken - you can't give them custom names.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-19-15, 01:05 PM   #10
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
Warden (Blizzard's anti-cheat) detects and logs when a process accesses files in the game's directory. If you're doing something suspicious, they'll review the evidence and take action against your account.
  Reply With Quote
09-19-15, 02:20 PM   #11
cFx
A Murloc Raider
 
cFx's Avatar
Join Date: Sep 2015
Posts: 5
kk, thy =)

@Seerah, jepp, noticed it, when checking the API =P
  Reply With Quote
09-20-15, 06:41 AM   #12
TOM_RUS
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 95
Originally Posted by Talyrius View Post
Warden (Blizzard's anti-cheat) detects and logs when a process accesses files in the game's directory. If you're doing something suspicious, they'll review the evidence and take action against your account.
False. Warden only monitors WoW memory for CHANGES (including code injected by third parties using known signatures). As long you don't modify anything and just read the data, you are safe. It doesn't scan any files on the disk.

You can also write an addon that draws something on the screen and encode data in colored pixels. Then external app monitor screen state and decode data.

Last edited by TOM_RUS : 09-20-15 at 12:44 PM.
  Reply With Quote
09-20-15, 08:17 AM   #13
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
The account that I had banned during the Burning Crusade expansion says otherwise.
  Reply With Quote
09-20-15, 08:22 AM   #14
TOM_RUS
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 95
Originally Posted by Talyrius View Post
The account that I had banned during the Burning Crusade expansion says otherwise.
You didn't say anything about BC in your post. There's were some checks for specific files back then, but they no longer scan any files as of Cataclysm expansion.

And again, they only scanned for modifications, not access.

Last edited by TOM_RUS : 09-20-15 at 08:26 AM.
  Reply With Quote
09-20-15, 09:20 AM   #15
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
I won't get into the specifics of why, but I had read from WoW's process in memory without injecting any changes and then later tried just grabbing screenshots. After the second permanent ban (just prior to WotLK), I had learned my lesson and stopped risking my account as I wanted to keep my mounts, titles, and retroactively awarded achievements.

I'm pretty sure they have the ability to target persons of interest by pushing out specialized builds of Warden that feature different detection techniques. Regardless, I no longer have any interest in pursuing such activities as I'm now reformed. Also, discussions such as these are frowned upon here.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » WoW to REST Service

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off