Developing Bot - Printable Version +- The Bytecode Club - Reverse Engineering Forum (https://the.bytecode.club) +-- Forum: Lobby (https://the.bytecode.club/forumdisplay.php?fid=1) +--- Forum: Game Cheating, Botting & Reverse Engineering (https://the.bytecode.club/forumdisplay.php?fid=97) +--- Thread: Developing Bot (/showthread.php?tid=155) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
RE: Developing Bot - vanadium - 12-20-2014 Also, i dont have any issue with imagesearch on barracks, troops etc. But i'm developing my bot in java, notre using autour. RE: Developing Bot - kojometa - 12-21-2014 (12-20-2014, 11:40 PM)vanadium Wrote: Also, i dont have any issue with imagesearch on barracks, troops etc. But i'm developing my bot in java, notre using autour. what pixel size are the images your are searching for? and how much accuracy do you use? RE: Developing Bot - kojometa - 12-21-2014 (12-20-2014, 04:01 PM)DiviniT3a Wrote: 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. Try to change the $Attack Value from 0xF0E5D6 to 0xD39783 and let me know if it worked RE: Developing Bot - Antidote - 12-21-2014 RE: Developing Bot - Antidote - 12-21-2014 I've looked through all errors and make modifications to the code. Here's the latest installer: http://www22.zippyshare.com/v/55848174/file.html Source: https://pastebin.com/ry8RJEqr Basically what it does is extract Tesseract-OCR, BS-Resolution folders and Source.au3. I've included the source inside the installer so you can run straight from the installer or make your modification to the source and compile from there. I think this is the most convinient way for everyone to start on working/testing the code without having to go through Tesseract setting and traineddata. Here's the changes I made: - Use coord for button. I've been experimenting with PixelSearch and PixelGetColor but since colors are a bit tricky I'll just stick to coord from now. - Use PixelCheckSum for main screen check. Since the screen become static when an error message appear, pixelchecksum is much more reliable than pixelgetcolor. - Let the script wait around 2min40s after dropping troops before pressing return home since I can't reliably determine when battle finish. Rotating light in the background make pixelchecksum useless - Script send 30 down button instead of 20 to ensure screen is completely zoomed out. I can't find a way to determine if it has been fully zoomed out. If anyone manage to do it it would prevent lots of possible errors. - Add Locate Barrack, Train, Attack and Village Search button for easier testing. You can test each part individually to test if there's error. To use Village Search, make sure you are fully zoomed out, click attack, find a match and click Village Search. It will begin searching until match is found. If you want to continue searching, just click again. A few things to note: - When you first start the script, it will look like it's clicking randomly on the screen. This is just the script trying to zoom out (repeatedly press Down button on keyboard) - Gold & Elixir readings are currently only about 60 to 70% accurate. I and many people here are working on a way to improve it, in the mean time just expect some possible mismatch, the script is just intended for testing only. - Troops are deployed according to the selection in barrack drop down, not according to your army camps. So if your army camps contain troops that are not in the selection, it'll likely to mess it up. To read army camp I'll have to get imagesearch to work. - For now troops deployment are not effective. I just put around 3 giants, ~30 barbarian, ~30 archers per wave near the edge for testing. RE: Developing Bot - kojometa - 12-21-2014 RE: Developing Bot - GkevinOD - 12-21-2014 RE: Developing Bot - kojometa - 12-21-2014 (12-21-2014, 04:10 AM)Antidote Wrote: I've looked through all errors and make modifications to the code. Here's the latest installer: Could you upp the code itself to pastbin again? Would be awesome. Its not against you but i mostly feel unconforable opening .exe RE: Developing Bot - Antidote - 12-21-2014 sure, here's the script, i'll be updating this link with latest one so you guys can easily keep track https://pastebin.com/ry8RJEqr RE: Developing Bot - kojometa - 12-21-2014 nice, thats perfect! thanks a lot! i also tested the script of GkevinOD and at it works incredibly good for me as wel! i think that in the future it would definetly be the better option than tesseract. |