The Bytecode Club
Log inJoin the club
Video Game Reverse Engineering

Developing Bot

Started by Antidote · Dec 5, 2014

1,033 replies21,297,466 viewsLocked
Dec 21, 2014#181

Antidoe will this be a farming bot or will it be an on demand bot that will simply aid you with attacks such as skip bases until you find one with the desired amount of loot?

Dec 21, 2014#182

@GkevinOD: I edited your code to change between 52,93 and 53,94 until it finds match and for now it works really well. 100% accuracy and takes around 2~4 seconds depending on first pixel match. I'm trying to replicate the color for elixir but I cannot find the exact pixel color you use for each number. I print screen, open the photo in photoshop, traverse to the exact pixel location, find its hex value and get 3 pixels value with varying shade but not the same as yours. I noticed you put 10 in shade variation but from my check it's around 10+. Or is it because screenshot doesn't give accurate color? Can you share how you get the sample color for each pixel? Here's my screenshot:

Dec 21, 2014#183

@Envyus: it's intended to run on its own, for now search only function is already possible, just not 100% accuracy.

Dec 21, 2014#184

That is good then so in a sense it will run a bit like the Lazypressing version but without so many features?

Dec 21, 2014#185

It's still in development so I cannot say for sure what features will be added. For now it's not ready for use yet.

Dec 21, 2014#186

@Antidote nice achievement with GkevinOD's method!
here's what i'm using atm and it works pretty well nonstop.

Just add a "Screenshots" folger into your main folder and you're ready 2 use.

http://pastebin.com/QAKcE0UC

also: when i got giants ticked in the client and its in attacking mode its still crashing after dropping the giants. for now its only working with barbarians and bows for me.

client ran so long now i got a forced break :D

Dec 21, 2014#187

I tried testing this out but when I click on village search it clicks on attack and then does not skip to find a base with the allocated resources.

Dec 21, 2014#188

use the start button! all other buttons are only for testing purposes!

Dec 21, 2014#189

Hello Everyone,

I have modified my previous GetGold Function to make a new and improve GetGold Function 2.0!

http://pastebin.com/gnzRXhNB

Unlike the previous version, it can detect the gold in less than a second (for me). I have removed the PixelSearch as it is too slow, and used a different approach using an optimized PixelGetColor. Now, it searches for the color of the pixel and compares it with the pixel color pattern using a function that compares the color variation.

I've organized the code a bit and gave an example within the script on how to use the function. You must have 860x720 resolution and the x and y value may vary from computer to computer.

I will work on making the function more efficient and getting the colors for the elixir.

Dec 21, 2014#190

Very nice work GkevinOD! Do you think that in the future you will work on implementing an option to detect trophies and perhaps drop to a selected value?

This discussion is closed.