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 - odySSeys - 12-21-2014 RE: Developing Bot - Antidote - 12-21-2014 RE: Developing Bot - Antidote - 12-21-2014 I'm still learning everything from scratch like many of you guys here (luckily Autoit has very smooth learning curve), so mistakes are here and there and I'm constantly updating the code if I find better ways to do it. Anw since many people contribute now, is there anyway we can effectively collaborate without having to copy paste every time? Something like Github or Google Code? RE: Developing Bot - AlexXxuTzZu - 12-21-2014 Good job Antidote for your work. I just tried your last bot and at the beginning it just trains the troops and then after it starts searching for a battle but without troops in the camps. Good luck again RE: Developing Bot - kojometa - 12-21-2014 RE: Developing Bot - kojometa - 12-22-2014 I edited some stuff. Most significant is the ReturnHome function. I added a timer wich will run 150 Seconds (you can see the actual countdown in the GUI) and then return home. Also it is always showing which function is called at the moment to recognise where potential errors are happening. what i found out: if you pick goblins or giants in the comboboxes, it closes the script after developing because it seems to crash in AssignTroop. http://pastebin.com/FTsnMPbT RE: Developing Bot - vanadium - 12-22-2014 Rather detect gold and elixir change. RE: Developing Bot - Antidote - 12-22-2014 RE: Developing Bot - vanadium - 12-22-2014 It's not sufficient to detect When Home button appears: all troops and spells may not have been used for the battle. In this case, return home appears only after 3min timeout. Also, depending you get at least one star or not, the button is either "Surrender" or "End battle", with a prompt in the first case. The best solution is to check gold + elixir change, and stop the battle after 30sec without changes. It works perfectly fine for me. It does not take that much cpu. On my bot done in Java, i have a JSON config for: - the army to train, - the troops to deploy, in which order, how many, when to enable hero ability etc. Sample army config: Quote:{ Sample deploy config: Quote:[ It's very convenient to change the trained army, troop deployment because it does not require to change the code. But, hey, it's a hell easier in Java. RE: Developing Bot - Antidote - 12-22-2014 Make sense to me now since I tend to always use up all troops in battle I might overlook that. By detecting gold & elixir change, do you detect change in that screen region (pixelchecksum) or actually read gold & elixir to compare? How would it handle when you get 3 stars or battle end early (out of troops)? Also I believe config file can be done in Autoit as well, requires very organized and flexible coding though. From what I see, your bot seems way ahead :D |