WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   WoW to REST Service (https://www.wowinterface.com/forums/showthread.php?t=52747)

cFx 09-18-15 04:17 AM

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.

Lombra 09-18-15 07:21 AM

Quote:

Originally Posted by cFx (Post 311036)
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.

Phanx 09-18-15 07:50 AM

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.

cFx 09-18-15 08:07 AM

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 =)

Phanx 09-18-15 08:14 AM

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.

SDPhantom 09-18-15 01:08 PM

Quote:

Originally Posted by cFx (Post 311044)
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.

cFx 09-19-15 03:27 AM

Jepp, after rethinking it would be obviously an easy access-method to create advantages, sad but true =/

cFx 09-19-15 05:20 AM

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 =)

Seerah 09-19-15 12:24 PM

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.

Talyrius 09-19-15 01:05 PM

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.

cFx 09-19-15 02:20 PM

kk, thy =)

@Seerah, jepp, noticed it, when checking the API =P

TOM_RUS 09-20-15 06:41 AM

Quote:

Originally Posted by Talyrius (Post 311082)
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.

Talyrius 09-20-15 08:17 AM

The account that I had banned during the Burning Crusade expansion says otherwise.

TOM_RUS 09-20-15 08:22 AM

Quote:

Originally Posted by Talyrius (Post 311090)
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.

Talyrius 09-20-15 09:20 AM

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.


All times are GMT -6. The time now is 06:17 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI