Thread Rating:
  • 7 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Developing Bot
(12-19-2014, 01:50 PM)detleflan Wrote:  First of all thx for this bot Antidote .
i tested the .exe file ( without waiting)
my bluestack running on 860x720 resolution
After saving the coordinates for barracks it starting to find a enemy but always hangs up on first enemy he find and doing nothing

Its the same problem like  geobyte have
Probably it's the checksearch(). Try replacing 0x0D355B with 0xc00000 for pixel search in the mean time.
Edited..
Thanks for the bot Antidote.
Downloaded the stand alone program.
Same problem with detleflan.
How can i edit checksearch()?
Btw I tried compiling it myself but it doesn't work for me. Getting the error can't find CFacelinesideProgramFiles/tesseract/tesseract.exe make sure you typed the name correctly.
When i Installed the tesseract the folder name is Tesseract-Ocr, I tried renaming it it solves the location problem but when it searches for oponent, there a black window blinking. Idk from here
I put the tesseract.au3 in autoit/include
running windows7 x64 here.
(12-19-2014, 03:01 PM)AtoZ Wrote:  I only managed to locate the gem values in the coc main screen in BMP and PNG format. It's really quite hard to use imagesearch as it is really picky on the image. Image size is also a big concern. I browsed again on the coc-en files and found out a lot of similar numbers of different sizes. Btw the folder is organized as per window or use (ex. battle, camp, troop donation). And another concern is the snowfall but we can lock image search in a loop.

Snowflack is not an issue to read number, they are falling behind them.
hi, i just registered here only to take part at this great topic.
the past few days i coded my own bot in autoit for CoC based on imagesearch.
unfortunately this is a lot harder than on every bot i did before because they managed it to make nearly everything look a little different.
i compared 2 lvl 8 barracks.
when you zoomed out they look identical. but when you zoom in, you will see that the pixels are a bit different and thats causing a LOT of errors when you do a pixel-/imagesearch-based bot.
(12-19-2014, 10:58 AM)Antidote Wrote:  @GeoByte: I think it's because your village hasn't been zoomed out completely. That's why you got the message "you cannot deploy troops in the red area". (since it deploy troops near the edge if you're not zoomed out it will get stuck in enemy's base.
I edit attack button and set bot to press down 30 times to zoom for you two here: http://www14.zippyshare.com/v/48158606/file.html
I'm gonna get some sleep now. If there's any error you guys just leave it here and I'll reply to it later..
@Antidote: I doubt your answer will help him since i just experienced the same problem.
At first you code was working but now it isnt anymore. Dont ask me why. I tried to run it on my server. Over there it's at least reading values of gold and elixier.
The test.au3 isnt working as well and not showing up a single value.
The problem is not the zoom-level but something else.
when the bot enters the first enemy base it shouldn't try to click on any place that makes the "red text" showing up.
it actually should go start tesseract and try to read out some screencaptures for some values.
for me it doesnt even start to read out anything.
i'm not sure what is causing this problem but i hope you have something in mind cause i didnt go through all of your code yet.
i hope you have some idea on a solution for that problem.
furthermore ive got to say that you wrote it in a very professional way comparing to my sources and im really glad to take part on this topic.
i got some nice ideas i already put into my own bot and if your bot will be stable one day they are some possible features to add!
i also think that switching from pixelsearch to coords will be a more efficient way that should be done!
gotta get some sleep now cause i spent about 5 hours with your code now and im tired as hell :D
Same problem as MDMA. I also have level 5 walls so that may be the issue however it isn't clicking the walls, it just never clicks the attack button to start looking for targets.
Also it seems like it has trouble recognizing that clash of clans is open. If I repeatedly zoom in and out it recognizes it.
I made this account just to let you know and help out in anyway I could. Good luck man.
Hello everyone,
I have coded an alternative method to getting the Gold and Elixir with very high accuracy (100% accuracy for me). It uses PixelSearch alone and I made a script with the function inside. After researching the PixelSearch, I made the script and I had enough time since Winter Break just set in for me. I'll be able to work on the development of this bot for at least a little bit.


http://pastebin.com/DGsg2y0Z


There are instructions inside the script and you can basically run the script when you find match. It will only get the value of the gold because elixir and the rest are not the same color as gold.
-------------------------------------------------
You must have 860x720 Resolution, also there may be complications within the code that I haven't tested with other computers.
*The x and y axis may be not the same, so with an image the x and y axis should locate to :
[Image: 1MNbd3.png]
Where the red is, so basically the first pixel of the first digit in the upper left corner.
-------------------------------------------------
There may also be a problem that may occur in the colors as it may vary from computer to computer.
If these errors occur, the script will output a blank message box indicating that the numbers could not be found.
============================
Finally, if all goes well it should look like this:
[Image: hBwlSl.png]
very nice tut and sharing guys
You can do the same with image search quicker and without having to have first pixel of the nimber. And it's way less brute force.
 


Forum Jump:


Users browsing this thread: 108 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website