Skip to content

Digital trading card game automated trader project. 2007-2009.

Notifications You must be signed in to change notification settings

mikemcqueen/DataPipeline

Repository files navigation

LoNTrader (Legends of Norrath Trader) is a personal project I created and worked on around the 2006-2009 timeframe. It's a Windows C++ application (~35,000 lines) for automated trading of digital trading cards in the Legends of Norrath digital trading card game. Legends of Norrath has since been shut down, so I figured I'd put the code online for no particular reason, other than to pique or satisfy the curiousity of the curious.

LoNTrader uses the "DataPipeline" framework, which is a lightweight multi-threaded data-processing framework that I wrote along with this application, and have used for other applications. The Data Pipeline consists of five states: Acquire, Translate, Interpret, Analyze and Execute.

For LoNTrader, the Acquire handler was a separate thread that would take screenshots of the application every second or so, and queue those up for the Translate handler. The Translate handler would look at each bitmap, and using "DCR" or digital character recognition (also custom built, and part of this package), or matching other small source bitmaps, would determine what the contents of the screenshot were. The Interpret handler would, for example, take text scraped off a window, and determine what to do with it. Was it a list of users? A list of cards? Typically it would know what window within the game it was associated with, and would build the corresponding C++ object to encapsulate the data on that window. It would then queue up one or more actions or commands for the Execute handler, where it would be excuted.

For a full-pipeline example, we capture a screenshot (Acquire), identify it as the Login screen (Translate), create a command object to enter Username and Password into their respective fields, and click the "Login" button (Intrepret), and queue up that command to be executed (Execute). Which would then result in a new image appearing in subsequently acquired images from the Acquire handler (due to us now being loggied in), and the cycle continues.

There was an Analyze state too but I'm a little fuzzy on whether I used that in LoNTrader or I may have added that later.

NOTE: I recently unearthed this code from an old archive and got it compiling under VS2015 community edition. I had to make a few changes and comment out some bits due to changes to C++ since the time I wrote it, and due to the fact that the PipelineManager evolved beyond what it looked like when I originaly wrote it for LoNTrader. None of the comment-outs were too drastic, and I usually left a // NOTE commented out to get this compiling, comment nearby.

So it should all compile, but it will not link unless you have the boost_1_37_0 headers and libraries also built and in the path. I may wrangle with that at some later date.

About

Digital trading card game automated trader project. 2007-2009.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages