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 18, 2014#121

@Antidote
I almost forgot.. must include for the string code to work.
#include <Math.au3>

The string manipulation code I believe isn't perfect but it fixes most of the problems and it still also relies to the captured image. BUT I have another idea and I'm not sure if it'll work.. Why not put tesseract in a loop until it captures an image with string length of 7 for both elix and gold before passing it through the string manipulation code? I hope it doesn't slow down the search process.. But with all the measures we have done, I think it may be accurate enough to run while we try figure out to use another more accurate alternatives to tesseract reading.

Dec 18, 2014#122

@Antidote
I got this error when Bot finished train barracks

Dec 18, 2014#124

I was able to ImageSearchArea bmp png files now. I placed the dll file to c':\windows' I don't know if that did the trick but it worked. I also have the imagesearch.au3 in autoit's include folder. Also, I converted coc-en files to bmp and I was able to imagesearch the images but only on desktop.

How do I image search in bluestacks?

Dec 18, 2014#125

You have to compute the window position and size. Autoit has all the necessary function to get the window position and size.

Dec 18, 2014#126

@Vanadium

Thanks for the speedy reply. I managed to locate an image in my COC just now! I didn't know how I did it.. Must've been the hbitmap version?

Dec 18, 2014#127

Im trying to use @Antidote Bot. But everytime i manually click my barracks, the bot clicks walls or other things surranding the barracks. What can i do about it?

Dec 18, 2014#128

Im trying to use @Antidote Bot. But everytime i manually click my barracks, the bot clicks walls or other things surranding the barracks. What can i do about it?

https://the.bytecode.club/showthread.php?tid=155&page=12 Read post#116. That might be your answer. I think he updated it. Try to find the post with download link. But if it doesn't work do what I did.

Dec 18, 2014#129

So I have downloaded just about every portion/update of this bot and no matter what it seems to get stuck at the "Attack started. Begin searching.." function. It just clicks on one of my walls (the black skull walls if that matters at all, and the same one every time too). So after it clicks on the wall it just sits there and doesn't do anything. I've tried downloading all versions but keep getting stuck here. Any help would be appreciated 🙂

Dec 19, 2014#130

I managed to wrap all necessary components for the script to run inside an exe file (using DirCrete and FileInstall). When run it will extract Tesseract and execute the script so you don't have to install anything, just make sure you are in your main village, press down button to zoom out maximum and press start. I make 2 versions, 1 attack immediately after training (for testing), the other wait for 15 mins (intended for repeated runs, but not recommended). This one correct the bot no attacking issue (was scratching my head for half an hour til realized I forgot to exit loop lol). If anyone decide to try it, I love to hear feedback from you guys (bugs, errors, ..) as I don't have time to test for everything. Also if possible change your BlueStacks resolution to 860x720 as I use it for testing

wait: http://www29.zippyshare.com/v/46824691/file.html
no wait: http://www29.zippyshare.com/v/45176505/file.html

This discussion is closed.