The custom "bot" I made for the game Conquer Online

Although the bot doesn't do anything interesting, it does demonstrate some of the skills and abilities that I possess. I've highlighted some of the more interesting features.
Multi-threaded) The "Start Background Clicking" button spawns a new thread that repeats a simple logic loop until a global variable--continueBackgroundClickLoop--is changed to false. Clicking the "Stop Background Clicking" button changes that variable, and the enabled/visible states of the buttons are changed only once the new thread acknowledges that the continueBackgroundClickLoop has changed.

(1.) The bot can interact with the game client even when it isn't visible. The autoclicker feature will use user32.dll SendMessage API calls to post WM_ mouse click messages to the game window. This demonstrates my ability to learn and use arbitrary APIs to avoid reinventing the wheel and instead leverage existing codebases.

The "Auto kill/looter" can also work in the background by using BitBlt to capture the undisplayed but none the less painted window's pixels.

This allows the user to browse facebook while the bot is playing Conquer for them, performing OCR on a window that the user can't even see.

(2.) The bot can also use the windows API to reposition the client to 0,0. This ensures that the settings for click locations and health bar test coordinates remain valid across sessions.

(3.) The bot will wander around the map within the X/Y coordinates you specify. This ensures that the bot kills the monsters you want it to. It reads the X/Y coordinate data from the game client using OCR.

(4.) The bot allows you to specify how it should behave. The colour of monster represents its relative difficulty at your level. Typically, killing a monster that has a green name will take far longer to level you up than killing one with a red or a black name. The colour settings are used in conjunction with the settings on the Monsters tab to make your levelling more efficient.

You can also choose whether to loot items (which works in conjunction with the Loot tab's settings).

(5.) Different classes have different skills. Not all of them are useful when botting. The bot supports using (or not) "XP Skills" and "Stamina Skills". There is a pesky bug in the Conquer Online client that sometimes changes your right click ability. To account for that, the bot can track changes to the active right click skill and reset it when required to whatever skill you have in the F5 slot.

Also, the bot supports auto reviving and pathfinding from the revive location back to where you were hunting, or, for players with "heavens blessing", reviving where you were killed and then simply continuing.

(6.) The monsters tab allows you to specify which monsters you want to attack. It also allows you to specify whether it should be an exact match.

If you don't select the "ONLY attack these monsters" option, then the monster list is ignored and any monster of the selected colour is attacked.

(7.) The loot settings tab is similar to the monster settings tab, except that it includes a priority items list. One DragonBall is worth 15, 000 times more than Gold is so its important to loot the DragonBall before the gold. If there is more than one priority item, it will loot the first item before proceeding to the second, and only after the priority items are gone will it go back to looting normal items.

(8.) The bot also includes a tab to help decide when to go all in while playing poker in-game. The odds are based on playing against bad players who bluff regularly. Another radio option could be provided to choose "bad player" vs. "good player" odds (that assume the other players won't go all in unless they have a 50% chance of winning the hand), but the bad player odds have proven to be quite profitable.

You may notice that the odds are at 202% in the screenshot. This is because a 67% chance of winning combined with getting 3 times your bet means that, if you played this hand 100 times against bad players, you would get 200 times what you bet on average.

The bot may be modified to play poker automatically in the future if there is interest, but gambling the bot's ill gotten gains is one of the more enjoyable experiences in Conquer so little demand for such a feature currently exists.

Persistent settings
When the form is closed, an XML file is generated with all of the user's settings. When the form is loaded, the default settings are loaded and then any settings saved in the XML file are restored.

This ensures that settings files work seamlessly across all versions of the bot, regardless of which settings were added or removed. You can load a settings file from V 1.0 of the bot in V 3.45 and it will still work fine.

The bot scans millions of pixels multiple times per second. It uses an array to store blacklisted pixels. Although an array with a million elements does use a lot of memory, CPU speed will consistently be the bottleneck since the barometer function of the screen scan is executed millions of times per second.

It uses a stack and an array to discover the pixels that connect together to form individual letters. Once a pixel is found to have a matching colour, it is added to the stack provided it hasn't already been blacklisted, and then that pixel is added to the blacklisted pixel array. Each iteration of the loop pops a pixel off the stack and then scans 360 degrees around it for connected pixels (with 2 pixels up/down to account for i and j). Entire words can be found and processed with a mere 10 thousand instructions being executed. It is highly efficient.

Extremely Accurate
The bot very rarely picks up junk items, and almost never misses a valuable drop.

TQ points cards, purchased for US Dollars, are redeemable for Conquer Points. So too is the in game item DragonBall. Since DragonBalls can be purchased for gold, a conversion of gold-to-US Dollars can be readily calculated. According to that calculation, a single bot can generate hundreds of dollars of Conquer Points per year, and a single computer can run multiple bots using virtual machines.