Skip to content

Commit 00bc060

Browse files
committed
* **V7.4**
* Add Switch Accounts feature * Add BlueStacks N support, still using Android Emulator Key BlueStacks2 (https://www.bluestacks.com/download-android-n.html) * Add apply button for CSV settings parsing. Refer "Barch four fingers.csv" for sample commands * Fix Google Account selection at CoC start breaking bot operation by always selecting first account * Fix MEmu 2.5/2.6 clicks opening/closing toolbar * Fix MEmu & Nox DirectX Background Mode not working on Windows Build 16299 - Fall Creators Update (also OpenGL must be selected in Android to actually use DirectX) * Fix BlueStacks DPI 160 when missing in bootparameters * Fix BlueStacks 3.50 and newer mouse off when running un-docked * Fix Bot crash when army contains a special event troop * Fix sometimes ignore donate * Fix Building OCR not reading 46 properly * Fix Boost Button not found when boosting * Fix Error "Selected Upgrade Window Opening Error, try again" by increasing wait time for window * Fix Page error count increased and stuck on train tabs when Barracks/Spell Factory are already boosted * Fix switching between Mini and Normal GUI showing Copycat warning or corrupting configuration or GUI * Fix Add Profile not saving current before swicthing to new (thanks to @mhk2012) * Fix double launching CoC on Android system messages * Fix Log GUI refresh issues in Debug Messages mode * Fix Watchdog re-launching bots that cannot run (profile or Android already in use) * Fix Microsoft .Net Framework 4.5 is not installed check * Improve reloading instead of restarting CoC to avoid new CoC load wait after Dec. Update * Improve Wall Upgrade, upgrade adjacent walls first, continous upgrade and autoswitch to next level * Improve SmartZap, reducing idle times * Improve Eagle Lvl 2 and Gembox tiles * Improve Clear Tombstones
1 parent dc68a98 commit 00bc060

415 files changed

Lines changed: 8907 additions & 4086 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
* **V7.4**
2+
* Add Switch Accounts feature
3+
* Add BlueStacks N support, still using Android Emulator Key BlueStacks2 (https://www.bluestacks.com/download-android-n.html)
4+
* Add apply button for CSV settings parsing. Refer "Barch four fingers.csv" for sample commands
5+
* Fix Google Account selection at CoC start breaking bot operation by always selecting first account
6+
* Fix MEmu 2.5/2.6 clicks opening/closing toolbar
7+
* Fix MEmu & Nox DirectX Background Mode not working on Windows Build 16299 - Fall Creators Update (also OpenGL must be selected in Android to actually use DirectX)
8+
* Fix BlueStacks DPI 160 when missing in bootparameters
9+
* Fix BlueStacks 3.50 and newer mouse off when running un-docked
10+
* Fix Bot crash when army contains a special event troop
11+
* Fix sometimes ignore donate
12+
* Fix Building OCR not reading 46 properly
13+
* Fix Boost Button not found when boosting
14+
* Fix Error "Selected Upgrade Window Opening Error, try again" by increasing wait time for window
15+
* Fix Page error count increased and stuck on train tabs when Barracks/Spell Factory are already boosted
16+
* Fix switching between Mini and Normal GUI showing Copycat warning or corrupting configuration or GUI
17+
* Fix Add Profile not saving current before swicthing to new (thanks to @mhk2012)
18+
* Fix double launching CoC on Android system messages
19+
* Fix Log GUI refresh issues in Debug Messages mode
20+
* Fix Watchdog re-launching bots that cannot run (profile or Android already in use)
21+
* Fix Microsoft .Net Framework 4.5 is not installed check
22+
* Improve reloading instead of restarting CoC to avoid new CoC load wait after Dec. Update
23+
* Improve Wall Upgrade, upgrade adjacent walls first, continous upgrade and autoswitch to next level
24+
* Improve SmartZap, reducing idle times
25+
* Improve Eagle Lvl 2 and Gembox tiles
26+
* Improve Clear Tombstones
27+
128
* **V7.3.5**
229
* Fix request troop button not found * Dec Update
330
* Fix OCR for remaining clancastle request * Dec Update

COCBot/GUI/MBR GUI Control Achievements.au3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; Return values .: None
77
; Author ........: MyBot.run team
88
; Modified ......: CodeSlinger69 (2017)
9-
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2017
9+
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
1010
; MyBot is distributed under the terms of the GNU GPL
1111
; Related .......:
1212
; Link ..........: https://github.com/MyBotRun/MyBot/wiki

COCBot/GUI/MBR GUI Control Android.au3

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; Return values .: None
77
; Author ........: MMHK (11-2016)
88
; Modified ......: CodeSlinger69 (2017)
9-
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2017
9+
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
1010
; MyBot is distributed under the terms of the GNU GPL
1111
; Related .......:
1212
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
@@ -64,10 +64,10 @@ Func cmbCOCDistributors()
6464
EndIf
6565
EndFunc ;==>cmbCOCDistributors
6666

67-
Func DistributorsBotStopEvent()
67+
Func DistributorsUpdateGUI()
6868
LoadCOCDistributorsComboBox()
6969
SetCurSelCmbCOCDistributors()
70-
EndFunc ;==>DistributorsBotStopEvent
70+
EndFunc ;==>DistributorsUpdateGUI
7171

7272
Func AndroidSuspendFlagsToIndex($iFlags)
7373
Local $idx = 0

COCBot/GUI/MBR GUI Control Attack Scripted.au3

Lines changed: 214 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
; Parameters ....: None
66
; Return values .: None
77
; Author ........: MyBot.run team
8-
; Modified ......: CodeSlinger69 (2017)
9-
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2017
8+
; Modified ......: CodeSlinger69 (2017), MMHK (01-2008)
9+
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
1010
; MyBot is distributed under the terms of the GNU GPL
1111
; Related .......:
1212
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
@@ -264,6 +264,218 @@ Func DuplicateScriptAB()
264264
EndIf
265265
EndFunc ;==>DuplicateScriptAB
266266

267+
Func ApplyScriptDB()
268+
Local $iApply = 0
269+
Local $aiCSVTroops[$eTroopCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
270+
Local $aiCSVSpells[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
271+
Local $aiCSVHeros[$eHeroCount][2] = [[0, 0], [0, 0], [0, 0]]
272+
Local $iCSVRedlineRoutineItem = 0, $iCSVDroplineEdgeItem = 0
273+
Local $sCSVCCReq = ""
274+
Local $aTemp = _GUICtrlComboBox_GetListArray($g_hCmbScriptNameDB)
275+
Local $sFilename = $aTemp[_GUICtrlComboBox_GetCurSel($g_hCmbScriptNameDB) + 1]
276+
277+
SetLog("CSV settings apply starts", $COLOR_INFO)
278+
$iApply = ParseAttackCSV_Settings_variables($aiCSVTroops, $aiCSVSpells, $aiCSVHeros, $iCSVRedlineRoutineItem, $iCSVDroplineEdgeItem, $sCSVCCReq, $sFilename)
279+
If Not $iApply Then
280+
SetLog("CSV settings apply failed", $COLOR_ERROR)
281+
Return
282+
EndIf
283+
284+
$iApply = 0
285+
For $i = 0 To UBound($aiCSVTroops) - 1
286+
If $aiCSVTroops[$i] > 0 Then $iApply += 1
287+
Next
288+
For $i = 0 To UBound($aiCSVSpells) - 1
289+
If $aiCSVSpells[$i] > 0 Then $iApply += 1
290+
Next
291+
If $iApply > 0 Then
292+
For $t = 0 To UBound($aiCSVTroops) - 1 ; set troops to level 1 if none on GUI
293+
If $aiCSVTroops[$t] > 0 And $g_aiTrainArmyTroopLevel[$t] = 0 Then $g_aiTrainArmyTroopLevel[$t] = 1
294+
Next
295+
$g_aiArmyCompTroops = $aiCSVTroops
296+
For $s = 0 To UBound($aiCSVSpells) - 1 ; set spells to level 1 if none on GUI
297+
If $aiCSVSpells[$s] > 0 And $g_aiTrainArmySpellLevel[$s] = 0 Then $g_aiTrainArmySpellLevel[$s] = 1
298+
Next
299+
$g_aiArmyCompSpells = $aiCSVSpells
300+
ApplyConfig_600_52_2("Read")
301+
SetComboTroopComp() ; GUI refresh
302+
lblTotalCountSpell2()
303+
SetLog("CSV Train settings applied", $COLOR_SUCCESS)
304+
EndIf
305+
306+
$iApply = 0
307+
For $i = 0 To UBound($aiCSVHeros) - 1
308+
If $aiCSVHeros[$i][0] > 0 Then $iApply += 1
309+
Next
310+
If $iApply > 0 Then
311+
For $h = 0 To UBound($aiCSVHeros) - 1
312+
If $aiCSVHeros[$h][0] > 0 Then
313+
Switch $h
314+
Case $eHeroBarbarianKing
315+
$g_iActivateKing = $aiCSVHeros[$h][0] - 1
316+
$g_iDelayActivateKing = $aiCSVHeros[$h][1]
317+
Case $eHeroArcherQueen
318+
$g_iActivateQueen = $aiCSVHeros[$h][0] - 1
319+
$g_iDelayActivateQueen = $aiCSVHeros[$h][1]
320+
Case $eHeroGrandWarden
321+
$g_iActivateWarden = $aiCSVHeros[$h][0] - 1
322+
$g_iDelayActivateWarden = $aiCSVHeros[$h][1]
323+
EndSwitch
324+
EndIf
325+
Next
326+
radHerosApply()
327+
SetLog("CSV Hero Ability settings applied", $COLOR_SUCCESS)
328+
329+
GUICtrlSetState($g_hChkDBKingAttack, $aiCSVHeros[$eHeroBarbarianKing][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkDBKingAttack))
330+
GUICtrlSetState($g_hChkDBQueenAttack, $aiCSVHeros[$eHeroArcherQueen][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkDBQueenAttack))
331+
GUICtrlSetState($g_hChkDBWardenAttack, $aiCSVHeros[$eHeroGrandWarden][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkDBWardenAttack))
332+
SetLog("CSV 'Attack with' Hero settings applied", $COLOR_SUCCESS)
333+
EndIf
334+
335+
If $sCSVCCReq <> "" Then
336+
GUICtrlSetState($g_hChkDBDropCC, $GUI_CHECKED)
337+
SetLog("CSV 'Attack with' CC settings applied", $COLOR_SUCCESS)
338+
EndIf
339+
340+
$iApply = 0
341+
Local $ahChkDBSpell = StringSplit($g_aGroupAttackDBSpell, "#", 2)
342+
If IsArray($ahChkDBSpell) Then
343+
For $i = 0 To UBound($ahChkDBSpell) - 1
344+
GUICtrlSetState($ahChkDBSpell[$i], $aiCSVSpells[$i] > 0 ? $GUI_CHECKED : $GUI_UNCHECKED)
345+
If $aiCSVSpells[$i] > 0 Then $iApply += 1
346+
Next
347+
If $iApply > 0 Then SetLog("CSV 'Attack with' Spell settings applied", $COLOR_SUCCESS)
348+
EndIf
349+
350+
If $iCSVRedlineRoutineItem > 0 And $iCSVRedlineRoutineItem <= _GUICtrlComboBox_GetCount($g_hCmbScriptRedlineImplDB) + 1 Then
351+
_GUICtrlComboBox_SetCurSel($g_hCmbScriptRedlineImplDB, $iCSVRedlineRoutineItem - 1)
352+
cmbScriptRedlineImplDB()
353+
SetLog("CSV Red Line settings applied", $COLOR_SUCCESS)
354+
Else
355+
If $iCSVRedlineRoutineItem <> 0 Then SetLog("CSV Red Line settings out of bounds", $COLOR_ERROR)
356+
EndIf
357+
If $iCSVDroplineEdgeItem > 0 And $iCSVDroplineEdgeItem <= _GUICtrlComboBox_GetCount($g_hCmbScriptDroplineDB) + 1 Then
358+
_GUICtrlComboBox_SetCurSel($g_hCmbScriptDroplineDB, $iCSVDroplineEdgeItem - 1)
359+
cmbScriptDroplineDB()
360+
SetLog("CSV Drop Line settings applied", $COLOR_SUCCESS)
361+
Else
362+
If $iCSVDroplineEdgeItem <> 0 Then SetLog("CSV Drop Line settings out of bounds", $COLOR_ERROR)
363+
EndIf
364+
365+
If $sCSVCCReq <> "" Then
366+
$g_bRequestTroopsEnable = True
367+
$g_sRequestTroopsText = $sCSVCCReq
368+
ApplyConfig_600_11("Read")
369+
SetLog("CSV CC Request settings applied", $COLOR_SUCCESS)
370+
EndIf
371+
EndFunc ;==>ApplyScriptDB
372+
373+
Func ApplyScriptAB()
374+
Local $iApply = 0
375+
Local $aiCSVTroops[$eTroopCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
376+
Local $aiCSVSpells[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
377+
Local $aiCSVHeros[$eHeroCount][2] = [[0, 0], [0, 0], [0, 0]]
378+
Local $iCSVRedlineRoutineItem = 0, $iCSVDroplineEdgeItem = 0
379+
Local $sCSVCCReq = ""
380+
Local $aTemp = _GUICtrlComboBox_GetListArray($g_hCmbScriptNameAB)
381+
Local $sFilename = $aTemp[_GUICtrlComboBox_GetCurSel($g_hCmbScriptNameAB) + 1]
382+
383+
SetLog("CSV settings apply starts", $COLOR_INFO)
384+
$iApply = ParseAttackCSV_Settings_variables($aiCSVTroops, $aiCSVSpells, $aiCSVHeros, $iCSVRedlineRoutineItem, $iCSVDroplineEdgeItem, $sCSVCCReq, $sFilename)
385+
If Not $iApply Then
386+
SetLog("CSV settings apply failed", $COLOR_ERROR)
387+
Return
388+
EndIf
389+
390+
$iApply = 0
391+
For $i = 0 To UBound($aiCSVTroops) - 1
392+
If $aiCSVTroops[$i] > 0 Then $iApply += 1
393+
Next
394+
For $i = 0 To UBound($aiCSVSpells) - 1
395+
If $aiCSVSpells[$i] > 0 Then $iApply += 1
396+
Next
397+
If $iApply > 0 Then
398+
For $t = 0 To UBound($aiCSVTroops) - 1 ; set troops to level 1 if none on GUI
399+
If $aiCSVTroops[$t] > 0 And $g_aiTrainArmyTroopLevel[$t] = 0 Then $g_aiTrainArmyTroopLevel[$t] = 1
400+
Next
401+
$g_aiArmyCompTroops = $aiCSVTroops
402+
For $s = 0 To UBound($aiCSVSpells) - 1 ; set spells to level 1 if none on GUI
403+
If $aiCSVSpells[$s] > 0 And $g_aiTrainArmySpellLevel[$s] = 0 Then $g_aiTrainArmySpellLevel[$s] = 1
404+
Next
405+
$g_aiArmyCompSpells = $aiCSVSpells
406+
ApplyConfig_600_52_2("Read")
407+
SetComboTroopComp() ; GUI refresh
408+
lblTotalCountSpell2()
409+
SetLog("CSV Train settings applied", $COLOR_SUCCESS)
410+
EndIf
411+
412+
$iApply = 0
413+
For $i = 0 To UBound($aiCSVHeros) - 1
414+
If $aiCSVHeros[$i][0] > 0 Then $iApply += 1
415+
Next
416+
If $iApply > 0 Then
417+
For $h = 0 To UBound($aiCSVHeros) - 1
418+
If $aiCSVHeros[$h][0] > 0 Then
419+
Switch $h
420+
Case $eHeroBarbarianKing
421+
$g_iActivateKing = $aiCSVHeros[$h][0] - 1
422+
$g_iDelayActivateKing = $aiCSVHeros[$h][1]
423+
Case $eHeroArcherQueen
424+
$g_iActivateQueen = $aiCSVHeros[$h][0] - 1
425+
$g_iDelayActivateQueen = $aiCSVHeros[$h][1]
426+
Case $eHeroGrandWarden
427+
$g_iActivateWarden = $aiCSVHeros[$h][0] - 1
428+
$g_iDelayActivateWarden = $aiCSVHeros[$h][1]
429+
EndSwitch
430+
EndIf
431+
Next
432+
radHerosApply()
433+
SetLog("CSV Hero Ability settings applied", $COLOR_SUCCESS)
434+
435+
GUICtrlSetState($g_hChkABKingAttack, $aiCSVHeros[$eHeroBarbarianKing][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkABKingAttack))
436+
GUICtrlSetState($g_hChkABQueenAttack, $aiCSVHeros[$eHeroArcherQueen][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkABQueenAttack))
437+
GUICtrlSetState($g_hChkABWardenAttack, $aiCSVHeros[$eHeroGrandWarden][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkABWardenAttack))
438+
SetLog("CSV 'Attack with' Hero settings applied", $COLOR_SUCCESS)
439+
EndIf
440+
441+
If $sCSVCCReq <> "" Then
442+
GUICtrlSetState($g_hChkABDropCC, $GUI_CHECKED)
443+
SetLog("CSV 'Attack with' CC settings applied", $COLOR_SUCCESS)
444+
EndIf
445+
446+
$iApply = 0
447+
Local $ahChkABSpell = StringSplit($GroupAttackABSpell, "#", 2)
448+
If IsArray($ahChkABSpell) Then
449+
For $i = 0 To UBound($ahChkABSpell) - 1
450+
GUICtrlSetState($ahChkABSpell[$i], $aiCSVSpells[$i] > 0 ? $GUI_CHECKED : $GUI_UNCHECKED)
451+
If $aiCSVSpells[$i] > 0 Then $iApply += 1
452+
Next
453+
If $iApply > 0 Then SetLog("CSV 'Attack with' Spell settings applied", $COLOR_SUCCESS)
454+
EndIf
455+
456+
If $iCSVRedlineRoutineItem > 0 And $iCSVRedlineRoutineItem <= _GUICtrlComboBox_GetCount($g_hCmbScriptRedlineImplAB) + 1 Then
457+
_GUICtrlComboBox_SetCurSel($g_hCmbScriptRedlineImplAB, $iCSVRedlineRoutineItem - 1)
458+
cmbScriptRedlineImplAB()
459+
SetLog("CSV Red Line settings applied", $COLOR_SUCCESS)
460+
Else
461+
If $iCSVRedlineRoutineItem <> 0 Then SetLog("CSV Red Line settings out of bounds", $COLOR_ERROR)
462+
EndIf
463+
If $iCSVDroplineEdgeItem > 0 And $iCSVDroplineEdgeItem <= _GUICtrlComboBox_GetCount($g_hCmbScriptDroplineAB) + 1 Then
464+
_GUICtrlComboBox_SetCurSel($g_hCmbScriptDroplineAB, $iCSVDroplineEdgeItem - 1)
465+
cmbScriptDroplineAB()
466+
SetLog("CSV Drop Line settings applied", $COLOR_SUCCESS)
467+
Else
468+
If $iCSVDroplineEdgeItem <> 0 Then SetLog("CSV Drop Line settings out of bounds", $COLOR_ERROR)
469+
EndIf
470+
471+
If $sCSVCCReq <> "" Then
472+
$g_bRequestTroopsEnable = True
473+
$g_sRequestTroopsText = $sCSVCCReq
474+
ApplyConfig_600_11("Read")
475+
SetLog("CSV CC Request settings applied", $COLOR_SUCCESS)
476+
EndIf
477+
EndFunc ;==>ApplyScriptAB
478+
267479
Func cmbScriptRedlineImplDB()
268480
$g_aiAttackScrRedlineRoutine[$DB] = _GUICtrlComboBox_GetCurSel($g_hCmbScriptRedlineImplDB)
269481
If $g_aiAttackScrRedlineRoutine[$DB] = 3 then

COCBot/GUI/MBR GUI Control Attack Standard.au3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; Return values .: None
77
; Author ........: MyBot.run team
88
; Modified ......: CodeSlinger69 (2017)
9-
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2017
9+
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
1010
; MyBot is distributed under the terms of the GNU GPL
1111
; Related .......:
1212
; Link ..........: https://github.com/MyBotRun/MyBot/wiki

0 commit comments

Comments
 (0)