Skip to content

Commit

Permalink
* **V7.7**
Browse files Browse the repository at this point in the history
* Added Automatic Builder Base Troop Upgrades
* Added Wall detection in CSV attack, see BoWiHe v3.2 by @Zeck for details
* Added zoomout mode under Bot/Android/Android Options
* Added /minimizebot command line option to minimize bot after auto-start
* Added Grand Warden mode selection
* Fixed Grand Warden Boosting when 7 Buttons exist
* Fixed Auto Hero Upgrade Button not being found
* Fixed BS2/BS3/BS4 adb connection issues, use dedicated adb daemon on free tcp port per instance
* Fixed Cyrillic OCR
* Fixed Extended Attackbar Slot Detection
* Fixed infinite looping between home and builder base
* Fixed bot running in a folder with umlauts
* Fixed freeze in village search waiting for clouds to clear
* Fixed command line help (parameter /? or /help)
* Fixed help display when links used in bot
* Fixed page error on Battle End Screen
* Fixed array errors in multiple places when image search returned no result
* Fixed bot crash when using screencap with wrong coordinates
* Fixed bot running directly from UNC network path like \\mybot_pc\mybot_home\...
* Fixed Android "reset" (soft reboot) when Bot is paused during Android suspend
* Fixed Droid4X 0.10.7 support
* Fixed wall upgrade using elsewhere needed recources, when upgrading more than one wall
* Improved siege machine selection
* Improved TH12 detection
* Improved bot responsiveness during image processing
* Improved android zoomout
* Improved android accurate click&drag
* Improved bot first time detection
* Improved timed heroes activation to 3 digit number, e.g. 150 sec.
* Improved detection for SmartFarm and SmartZap
* Improved zoom-out error handling restarting android on multiple failures
* Improved measuring village & centering village
* Improved measuring builder base
* Improved Eagle lvl 2 weak base detection
* Improved frequent android restarts due to page error by resetting error counter when beginning to search villages
* Improved last raid notify text @miked
* Changed CoC launch to push shared_prefs only when account switching is enabled
  • Loading branch information
cosote committed Feb 2, 2019
1 parent 88ab2bf commit 117a53e
Show file tree
Hide file tree
Showing 164 changed files with 7,639 additions and 3,543 deletions.
45 changes: 42 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
* **V7.7**
* Added Automatic Builder Base Troop Upgrades
* Added Wall detection in CSV attack, see BoWiHe v3.2 by @Zeck for details
* Added zoomout mode under Bot/Android/Android Options
* Added /minimizebot command line option to minimize bot after auto-start
* Added Grand Warden mode selection
* Fixed Grand Warden Boosting when 7 Buttons exist
* Fixed Auto Hero Upgrade Button not being found
* Fixed BS2/BS3/BS4 adb connection issues, use dedicated adb daemon on free tcp port per instance
* Fixed Cyrillic OCR
* Fixed Extended Attackbar Slot Detection
* Fixed infinite looping between home and builder base
* Fixed bot running in a folder with umlauts
* Fixed freeze in village search waiting for clouds to clear
* Fixed command line help (parameter /? or /help)
* Fixed help display when links used in bot
* Fixed page error on Battle End Screen
* Fixed array errors in multiple places when image search returned no result
* Fixed bot crash when using screencap with wrong coordinates
* Fixed bot running directly from UNC network path like \\mybot_pc\mybot_home\...
* Fixed Android "reset" (soft reboot) when Bot is paused during Android suspend
* Fixed Droid4X 0.10.7 support
* Fixed wall upgrade using elsewhere needed recources, when upgrading more than one wall
* Improved siege machine selection
* Improved TH12 detection
* Improved bot responsiveness during image processing
* Improved android zoomout
* Improved android accurate click&drag
* Improved bot first time detection
* Improved timed heroes activation to 3 digit number, e.g. 150 sec.
* Improved detection for SmartFarm and SmartZap
* Improved zoom-out error handling restarting android on multiple failures
* Improved measuring village & centering village
* Improved measuring builder base
* Improved Eagle lvl 2 weak base detection
* Improved frequent android restarts due to page error by resetting error counter when beginning to search villages
* Improved last raid notify text @MikeD
* Changed CoC launch to push shared_prefs only when account switching is enabled

* **V7.6.6**
* Added check & remove unwanted CC siege machine
* Fixed Custom Drop Order @ViperZ (December 2018 Update)
Expand All @@ -24,9 +63,9 @@
* Improved Giant Deployment in SmartFarm/Standard Attack

* **V7.6.5**
* Add Ice Golem Support @ViperZ
* Add Bat Spell Support @ViperZ
* Add Stone Slammer Support @ViperZ
* Added Ice Golem Support @ViperZ
* Added Bat Spell Support @ViperZ
* Added Stone Slammer Support @ViperZ
* Fixed Snow Theme Detection (December 2018 Update)
* Fixed Request Clan Castle (December 2018 Update)
* Fixed Edit/Remove Army (December 2018 Update)
Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control BOT Options.au3
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ Func btnTestAttackBar()

SetLog(_PadStringCenter(" Begin AttackBar Detection", 54, "="), $COlOR_INFO)

Local $avAttackBar = AttackBarCheck(False, $DB, True)
Local $avAttackBar = GetAttackBar(False, $DB, True)

If IsArray($avAttackBar) And UBound($avAttackBar, 1) >= 1 Then
SetLog("Found " & UBound($avAttackBar, 1) & " Slots", $COlOR_SUCCESS)
Expand Down
36 changes: 30 additions & 6 deletions COCBot/GUI/MBR GUI Control Child Attack.au3
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,37 @@ Func cmbABAlgorithm()
EndIf
EndFunc ;==>cmbABAlgorithm

Func cmbDBSiege()
$g_aiAttackUseSiege[$DB] = _GUICtrlComboBox_GetCurSel($g_hcmbDBSiege)
EndFunc ;==>cmbDBSiege
Func chkABWardenAttack()
If GUICtrlRead($g_hChkABWardenAttack) = $GUI_CHECKED Then
GUICtrlSetState($g_hCmbABWardenMode, $GUI_ENABLE)
Else
GUICtrlSetState($g_hCmbABWardenMode, $GUI_DISABLE)
EndIf
EndFunc ;==>chkABWardenAttack

Func chkDBWardenAttack()
If GUICtrlRead($g_hChkDBWardenAttack) = $GUI_CHECKED Then
GUICtrlSetState($g_hCmbDBWardenMode, $GUI_ENABLE)
Else
GUICtrlSetState($g_hCmbDBWardenMode, $GUI_DISABLE)
EndIf
EndFunc ;==>chkDBWardenAttack

Func cmbABSiege()
$g_aiAttackUseSiege[$LB] = _GUICtrlComboBox_GetCurSel($g_hcmbABSiege)
EndFunc ;==>cmbABSiege
Func chkABDropCC()
If GUICtrlRead($g_hChkABDropCC) = $GUI_CHECKED Then
GUICtrlSetState($g_hcmbABSiege, $GUI_ENABLE)
Else
GUICtrlSetState($g_hcmbABSiege, $GUI_DISABLE)
EndIf
EndFunc ;==>chkABDropCC

Func chkDBDropCC()
If GUICtrlRead($g_hChkDBDropCC) = $GUI_CHECKED Then
GUICtrlSetState($g_hcmbDBSiege, $GUI_ENABLE)
Else
GUICtrlSetState($g_hcmbDBSiege, $GUI_DISABLE)
EndIf
EndFunc ;==>chkDBDropCC

Func chkAttackNow()
If GUICtrlRead($g_hChkAttackNow) = $GUI_CHECKED Then
Expand Down
72 changes: 67 additions & 5 deletions COCBot/GUI/MBR GUI Control Child Upgrade.au3
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,34 @@ Func chkLab()
GUICtrlSetState($g_hPicLabUpgrade, $GUI_SHOW)
GUICtrlSetState($g_hLblNextUpgrade, $GUI_ENABLE)
GUICtrlSetState($g_hCmbLaboratory, $GUI_ENABLE)
;GUICtrlSetState($g_hBtnLocateLaboratory, $GUI_SHOW)
_GUICtrlSetImage($g_hPicLabUpgrade, $g_sLibIconPath, $g_avLabTroops[$g_iCmbLaboratory][4])
Else
$g_bAutoLabUpgradeEnable = False
GUICtrlSetState($g_hPicLabUpgrade, $GUI_HIDE)
GUICtrlSetState($g_hLblNextUpgrade, $GUI_DISABLE)
GUICtrlSetState($g_hCmbLaboratory, $GUI_DISABLE)
;GUICtrlSetState($g_hBtnLocateLaboratory, $GUI_HIDE)
_GUICtrlSetImage($g_hPicLabUpgrade, $g_sLibIconPath, $g_avLabTroops[0][4])
EndIf
LabStatusGUIUpdate()
EndFunc ;==>chkLab

Func chkStarLab()
If GUICtrlRead($g_hChkAutoStarLabUpgrades) = $GUI_CHECKED Then
$g_bAutoStarLabUpgradeEnable = True
GUICtrlSetState($g_hPicStarLabUpgrade, $GUI_SHOW)
GUICtrlSetState($g_hLblNextSLUpgrade, $GUI_ENABLE)
GUICtrlSetState($g_hCmbStarLaboratory, $GUI_ENABLE)
_GUICtrlSetImage($g_hPicStarLabUpgrade, $g_sLibIconPath, $g_avStarLabTroops[$g_iCmbStarLaboratory][4])
Else
$g_bAutoStarLabUpgradeEnable = False
GUICtrlSetState($g_hPicStarLabUpgrade, $GUI_HIDE)
GUICtrlSetState($g_hLblNextSLUpgrade, $GUI_DISABLE)
GUICtrlSetState($g_hCmbStarLaboratory, $GUI_DISABLE)
_GUICtrlSetImage($g_hPicStarLabUpgrade, $g_sLibIconPath, $g_avStarLabTroops[0][4])
EndIf
StarLabStatusGUIUpdate()
EndFunc ;==>chkStarLab

Func LabStatusGUIUpdate()
If _DateIsValid($g_sLabUpgradeTime) Then
_GUICtrlSetTip($g_hBtnResetLabUpgradeTime, GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_01", "Visible Red button means that laboratory upgrade in process") & @CRLF & _
Expand All @@ -143,11 +158,33 @@ Func LabStatusGUIUpdate()
EndIf
EndFunc ;==>LabStatusGUIUpdate

Func StarLabStatusGUIUpdate()
If _DateIsValid($g_sStarLabUpgradeTime) Then
_GUICtrlSetTip($g_hBtnResetStarLabUpgradeTime, GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_01", "Visible Red button means that laboratory upgrade in process") & @CRLF & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_02", "This will automatically disappear when near time for upgrade to be completed.") & @CRLF & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_03", "If upgrade has been manually finished with gems before normal end time,") & @CRLF & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_04", "Click red button to reset internal upgrade timer BEFORE STARTING NEW UPGRADE") & @CRLF & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_05", "Caution - Unnecessary timer reset will force constant checks for lab status") & @CRLF & @CRLF & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_06", "Troop Upgrade started") & ", " & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_07", "Will begin to check completion at:") & " " & $g_sStarLabUpgradeTime & @CRLF & " ")
GUICtrlSetState($g_hBtnResetStarLabUpgradeTime, $GUI_SHOW)
GUICtrlSetState($g_hBtnResetStarLabUpgradeTime, $GUI_ENABLE)
Else
GUICtrlSetState($g_hBtnResetStarLabUpgradeTime, $GUI_HIDE)
GUICtrlSetState($g_hBtnResetStarLabUpgradeTime, $GUI_DISABLE)
EndIf
EndFunc ;==>StarLabStatusGUIUpdate

Func cmbLab()
$g_iCmbLaboratory = _GUICtrlComboBox_GetCurSel($g_hCmbLaboratory)
_GUICtrlSetImage($g_hPicLabUpgrade, $g_sLibIconPath, $g_avLabTroops[$g_iCmbLaboratory][4])
EndFunc ;==>cmbLab

Func cmbStarLab()
$g_iCmbStarLaboratory = _GUICtrlComboBox_GetCurSel($g_hCmbStarLaboratory)
_GUICtrlSetImage($g_hPicStarLabUpgrade, $g_sLibIconPath, $g_avStarLabTroops[$g_iCmbStarLaboratory][4])
EndFunc ;==>cmbStarLab

Func ResetLabUpgradeTime()
; Display are you sure message
_ExtMsgBoxSet(1 + 64, $SS_CENTER, 0x004080, 0xFFFF00, 12, "Comic Sans MS", 600)
Expand All @@ -173,6 +210,31 @@ Func ResetLabUpgradeTime()
EndIf
EndFunc ;==>ResetLabUpgradeTime

Func ResetStarLabUpgradeTime()
; Display are you sure message
_ExtMsgBoxSet(1 + 64, $SS_CENTER, 0x004080, 0xFFFF00, 12, "Comic Sans MS", 600)
Local $stext = @CRLF & GetTranslatedFileIni("MBR Func_Village_Upgrade", "Lab_GUIUpdate_Info_07", "Are you 100% sure you want to reset lab upgrade timer?") & @CRLF & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "Lab_GUIUpdate_Info_08", "Click OK to reset") & @CRLF & GetTranslatedFileIni("MBR Func_Village_Upgrade", "Lab_GUIUpdate_Info_09", "Or Click Cancel to exit") & @CRLF
Local $MsgBox = _ExtMsgBox(0, GetTranslatedFileIni("MBR Func_Village_Upgrade", "Lab_GUIUpdate_Info_10", "Reset timer") & "|" & GetTranslatedFileIni("MBR Func_Village_Upgrade", "Lab_GUIUpdate_Info_11", "Cancel and Return"), _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "Lab_GUIUpdate_Info_12", "Reset laboratory upgrade timer?"), $stext, 120, $g_hFrmBot)
If $g_bDebugSetlog Then SetDebugLog("$MsgBox= " & $MsgBox, $COLOR_DEBUG)
If $MsgBox = 1 Then
$g_sStarLabUpgradeTime = ""
_GUICtrlSetTip($g_hBtnResetStarLabUpgradeTime, GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_01", "Visible Red button means that laboratory upgrade in process") & @CRLF & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_02", "This will automatically disappear when near time for upgrade to be completed.") & @CRLF & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_03", "If upgrade has been manually finished with gems before normal end time,") & @CRLF & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_04", "Click red button to reset internal upgrade timer BEFORE STARTING NEW UPGRADE") & @CRLF & _
GetTranslatedFileIni("MBR Func_Village_Upgrade", "BtnResetLabUpgradeTime_Info_05", "Caution - Unnecessary timer reset will force constant checks for lab status"))
EndIf
If _DateIsValid($g_sStarLabUpgradeTime) Then
GUICtrlSetState($g_hBtnResetStarLabUpgradeTime, $GUI_SHOW)
GUICtrlSetState($g_hBtnResetStarLabUpgradeTime, $GUI_ENABLE)
Else
GUICtrlSetState($g_hBtnResetStarLabUpgradeTime, $GUI_HIDE)
GUICtrlSetState($g_hBtnResetStarLabUpgradeTime, $GUI_DISABLE)
EndIf
EndFunc ;==>ResetLabUpgradeTime

Func chkUpgradeKing()
If $g_iTownHallLevel > 6 Then ; Must be TH7 or above to have King
GUICtrlSetState($g_hChkUpgradeKing, $GUI_ENABLE)
Expand Down Expand Up @@ -280,7 +342,7 @@ Func cmbHeroReservedBuilder()
EndIf
_GUICtrlComboBox_SetCurSel($g_hCmbHeroReservedBuilder, $g_iHeroReservedBuilder)
EndFunc ;==>cmbHeroReservedBuilder

Func chkWalls()
If GUICtrlRead($g_hChkWalls) = $GUI_CHECKED Then
$g_bAutoUpgradeWallsEnable = True
Expand Down Expand Up @@ -346,12 +408,12 @@ EndFunc ;==>btnWalls

Func chkAutoUpgrade()
If GUICtrlRead($g_hChkAutoUpgrade) = $GUI_CHECKED Then
$g_iChkAutoUpgrade = 1
$g_bAutoUpgradeEnabled = True
For $i = $g_hLblAutoUpgrade To $g_hTxtAutoUpgradeLog
GUICtrlSetState($i, $GUI_ENABLE)
Next
Else
$g_iChkAutoUpgrade = 0
$g_bAutoUpgradeEnabled = False
For $i = $g_hLblAutoUpgrade To $g_hTxtAutoUpgradeLog
GUICtrlSetState($i, $GUI_DISABLE)
Next
Expand Down
22 changes: 14 additions & 8 deletions COCBot/GUI/MBR GUI Design About.au3
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,33 @@ Func CreateAboutTab()
EndFunc ;==>CreateAboutTab

Func ShowCommandLineHelp()
Return ShowHelp(Default)
EndFunc ;==>ShowCommandLineHelp

Func ShowControlHelp()
Return ShowHelp(@GUI_CtrlId)
EndFunc ;==>ShowControlHelp

SetDebugLog ("Help File called from CrtlID: " & @GUI_CtrlId)
Func ShowHelp($Source = Default)

SetDebugLog ("Help File called from: " & $source)

Local $PathHelp = "CommandLineParameter"

; This can be use for several Help Files
Switch @GUI_CtrlId
Switch $source
Case $g_lblHelpBot; Bot/Android/Help Handle
$PathHelp = "CommandLineParameter"
Case $g_lblHepNotify
$PathHelp = "NotifyHelp"
EndSwitch

UpdateBotTitle()
$g_hGUI_CommandLineHelp = GUICreate($g_sBotTitle & " - Command Line Help", 650, 700, -1, -1, BitOR($WS_CAPTION, $WS_POPUPWINDOW, $DS_MODALFRAME))
$g_hGUI_CommandLineHelp = GUICreate($g_sBotTitle & " - Command Line Help", 650, 700, -1, -1, BitOR($WS_CAPTION, $WS_POPUPWINDOW, $DS_MODALFRAME), $WS_EX_TOPMOST, $g_hFrmBot)
GUISetIcon($g_sLibIconPath, $eIcnGUI, $g_hGUI_CommandLineHelp)

; add controls
Local $hClose = GUICtrlCreateButton("Close", 300, 670, 50)
Local $hRichEdit = _GUICtrlRichEdit_Create($g_hGUI_CommandLineHelp, "", 2, 0, 646, 667, $WS_VSCROLL + $ES_MULTILINE)
Local $sHelpFile = @ScriptDir & "\Help\" & $PathHelp
If $g_sLanguage <> $g_sDefaultLanguage Then
Expand All @@ -139,11 +148,9 @@ Func ShowCommandLineHelp()
_GUICtrlRichEdit_StreamFromFile($hRichEdit, $sHelpFile & ".rtf")
_GUICtrlRichEdit_SetReadOnly($hRichEdit)
_GUICtrlRichEdit_SetScrollPos($hRichEdit, 0, 0) ; scroll to top
Local $hClose = GUICtrlCreateButton("Close", 300, 670, 50)

GUISetState(@SW_SHOW)

Local $iOpt = Opt("GUIOnEventMode", 0)
GUISetState(@SW_SHOW, $g_hGUI_CommandLineHelp)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $hClose
Expand All @@ -153,5 +160,4 @@ Func ShowCommandLineHelp()

GUIDelete($g_hGUI_CommandLineHelp)
Opt("GUIOnEventMode", $iOpt)

EndFunc ;==>ShowCommandLineHelp
EndFunc ;==>ShowHelp
Loading

0 comments on commit 117a53e

Please sign in to comment.