Skip to content

Commit

Permalink
* **V7.6.2**
Browse files Browse the repository at this point in the history
* Fixed Bluestacks 4.x and CoC PB message , different font and place.
* Fixed Siege Build when queued empty and camp is full, making a double sieges.
* Fixed Conflict with Balloons and siege on attack bar, reported by Black-sTyle-Vii
* Fixed Donate only - Switch account and a second train army reported by hrishikesh
* Fixed UI translate code reported by @Black-sTyle-Vii
* Fixed Group of 10 clicks issue,  when android click is enabled + Adb Screencapture
* Fixed Deployed Sides [DS] at attack log when was csv attack
* Fixed Failed Switch to Clash Castle at attack bar because the delay, reported by Pepito
* fixed Switch account and Heroes status , reseting hero status on account switch
* Added Clan Games new version with option to 60min events
* Added New method to get version from Github, using the github API.
* Added Enable/Disable 'Show touch' on emulator under Android TAB
* Added Check CC troops and remove unwanted
* Improved BlueStacks newest versions Undocked and Docked
* Improved Using Siege to attack deadbase while DropTrophy
* Improved Collect, added conditions for collect
* Improved Collect, optionally collect Loot Cart before Resources
* Improved Delay between remaining troops drop
* Improved COM obj errors detection to Telegram and change to InetRead
* Improved Remain Troops, less clicks,  at Smart-Farm
* Improved Double Train with making donated troops for army 1
* Improved Donate CC - skip reading spell and siege when not needed
* Improved SC_id login on MEmu 2.5.0 and 2.8.6 , smaller buttons! reported NguyenAnhHD
* Changed MyBot icons
* Removed 24 unnecessary ocr/bundle files
* Updated scripts Attacks to last version
* Updated German lang file by Black-sTyle-Vii
* Updated Azerbaijani lang file by Z E C K
* Updated Turkish lang file by Z E C K
  • Loading branch information
promac2k committed Aug 25, 2018
1 parent d1cd478 commit 9e480d1
Show file tree
Hide file tree
Showing 234 changed files with 3,407 additions and 3,908 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
* **V7.6.2**
* Fixed Bluestacks 4.x and CoC PB message , different font and place.
* Fixed Siege Build when queued empty and camp is full, making a double sieges.
* Fixed Conflict with Balloons and siege on attack bar, reported by @Black-sTyle-Vii
* Fixed Donate only - Switch account and a second train army reported by @hrishikesh
* Fixed UI translate code reported by @Black-sTyle-Vii
* Fixed Group of 10 clicks issue, when android click is enabled + Adb Screencapture
* Fixed Deployed Sides [DS] at attack log when was csv attack
* Fixed Failed Switch to Clash Castle at attack bar because the delay, reported by @Pepito
* fixed Switch account and Heroes status , reseting hero status on account switch
* Added Clan Games new version with option to 60min events
* Added New method to get version from Github, using the github API.
* Added Enable/Disable 'Show touch' on emulator under Android TAB
* Added Check CC troops and remove unwanted
* Improved BlueStacks newest versions Undocked and Docked
* Improved Using Siege to attack deadbase while DropTrophy
* Improved Collect, added conditions for collect
* Improved Collect, optionally collect Loot Cart before Resources
* Improved Delay between remaining troops drop
* Improved COM obj errors detection to Telegram and change to InetRead
* Improved Remain Troops, less clicks, at Smart-Farm
* Improved Double Train with making donated troops for army 1
* Improved Donate CC - skip reading spell and siege when not needed
* Improved SC_id login on MEmu 2.5.0 and 2.8.6 , smaller buttons! reported @NguyenAnhHD
* Changed MyBot icons
* Removed 24 unnecessary ocr/bundle files
* Updated scripts Attacks to last version
* Updated German lang file by @Black-sTyle-Vii
* Updated Azerbaijani lang file by @Z E C K
* Updated Turkish lang file by @Z E C K

* **V7.6.1**
* Fixed Queen activation at scripted Attacks
* Fixed Train Sieges on Quick Train , by @ChacalGyn
Expand Down
10 changes: 10 additions & 0 deletions COCBot/GUI/MBR GUI Control Android.au3
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,13 @@ Func cmbAndroidBackgroundMode()
$g_iAndroidBackgroundMode = _GUICtrlComboBox_GetCurSel($g_hCmbAndroidBackgroundMode)
UpdateAndroidBackgroundMode()
EndFunc ;==>cmbAndroidBackgroundMode

func EnableShowTouchs()
AndroidAdbSendShellCommand("content insert --uri content://settings/system --bind name:s:show_touches --bind value:i:1")
SetDebugLog("EnableShowTouchs ON")
EndFunc

func DisableShowTouchs()
AndroidAdbSendShellCommand("content insert --uri content://settings/system --bind name:s:show_touches --bind value:i:0")
SetDebugLog("EnableShowTouchs OFF")
EndFunc
55 changes: 17 additions & 38 deletions COCBot/GUI/MBR GUI Control BOT Options.au3
Original file line number Diff line number Diff line change
Expand Up @@ -561,52 +561,31 @@ Func btnTestSendText()
EndFunc ;==>btnTestSendText

Func btnTestAttackBar()
BeginImageTest() ; get image for testing
Local $currentOCR = $g_bDebugOcr
Local $currentRunState = $g_bRunState
Local $bCurrentOCR = $g_bDebugOcr, $bCurrentRunState = $g_bRunState, $bCurrentDebugImage = $g_bDebugImageSave

_GUICtrlTab_ClickTab($g_hTabMain, 0)

$g_bDebugOcr = True
$g_bDebugImageSave = True
$g_bRunState = True
ForceCaptureRegion()
SetLog(_PadStringCenter(" Test Attack Bar begin (" & $g_sBotVersion & ")", 54, "="), $COLOR_INFO)

_CaptureRegion2(0, 571 + $g_iBottomOffsetY, 859, 671 + $g_iBottomOffsetY)
Local $result = DllCallMyBot("searchIdentifyTroop", "ptr", $g_hHBitmap2)
SetLog("DLL Troopsbar list: " & $result[0], $COLOR_DEBUG)
If $g_bForceClanCastleDetection Then $result[0] = FixClanCastle($result[0])
Local $aTroopDataList = StringSplit($result[0], "|")
Local $aTemp[12][3]
If $result[0] <> "" Then
For $i = 1 To $aTroopDataList[0]
Local $troopData = StringSplit($aTroopDataList[$i], "#", $STR_NOCOUNT)
;~ $aTemp[Number($troopData[1])][0] = $troopData[0]
;~ $aTemp[Number($troopData[1])][1] = Number($troopData[2])
;~ SetLog("-" & NameOfTroop( $aTemp[$i][0]) & " pos " & $aTemp[$i][0] & " qty " & $aTemp[$i][2])
If $troopData[0] = 17 Or $troopData[0] = 18 Or $troopData[0] = 19 Or $troopData[0] = 20 Then $troopData[2] = 1
SetLog("position: " & $troopData[1] & " | troop code: " & $troopData[0] & " troop name:" & NameOfTroop($troopData[0]) & " | qty: " & $troopData[2])
Next
EndIf

;make snapshot start
_CaptureRegion(0, 630, $g_iDEFAULT_WIDTH)
Local $savefolder = $g_sProfileTempDebugPath
$savefolder = $g_sProfileTempDebugPath & "Test_Attack_Bar\"
DirCreate($savefolder)
Local $debugfile
Local $Date = @MDAY & "." & @MON & "." & @YEAR
Local $Time = @HOUR & "." & @MIN & "." & @SEC
$debugfile = "Test_Attack_Bar_" & $g_sBotVersion & "_" & $Date & "_" & $Time & ".png"
_GDIPlus_ImageSaveToFile($g_hBitmap, $savefolder & $debugfile)
;make snapshot end
SetLog(_PadStringCenter(" Begin AttackBar Detection", 54, "="), $COlOR_INFO)

EndImageTest() ; clear test image handle
Local $aAttackBar = StringSplit(AttackBarCheck(False, $DB, True), "|", $STR_NOCOUNT)
Local $aTroop

SetLog(_PadStringCenter(" Test Attack Bar end ", 54, "="), $COLOR_INFO)
ShellExecute($savefolder)
If IsArray($aAttackBar) And UBound($aAttackBar, 1) >= 1 Then
SetLog("Found " & UBound($aAttackBar, 1) & " Slots", $COlOR_SUCCESS)
For $i = 0 To UBound($aAttackBar, 1) - 1
$aTroop = StringSplit($aAttackBar[$i], "#", $STR_NOCOUNT)
If IsArray($aTroop) And UBound($aTroop, 1) = 3 Then SetLog("- Slot " & $aTroop[1] & ": " & $aTroop[2] & " " & GetTroopName($aTroop[0], $aTroop[2]), $COLOR_SUCCESS)
Next
EndIf
SetLog(_PadStringCenter(" End AttackBar Detection ", 54, "="), $COlOR_INFO)

$g_bDebugOcr = $currentOCR
$g_bRunState = $currentRunState
$g_bDebugOcr = $bCurrentOCR
$g_bDebugImageSave = $bCurrentDebugImage
$g_bRunState = $bCurrentRunState
EndFunc ;==>btnTestAttackBar


Expand Down
13 changes: 11 additions & 2 deletions COCBot/GUI/MBR GUI Control Child Misc.au3
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,19 @@ EndFunc ;==>chkTrophyHeroes

Func ChkCollect()
If GUICtrlRead($g_hChkCollect) = $GUI_CHECKED Then
GUICtrlSetState($g_hChkCollectCartFirst, $GUI_ENABLE)
GUICtrlSetState($g_hChkTreasuryCollect, $GUI_ENABLE)
GUICtrlSetState($g_hTxtCollectGold, $GUI_ENABLE)
GUICtrlSetState($g_hTxtCollectElixir, $GUI_ENABLE)
GUICtrlSetState($g_hTxtCollectDark, $GUI_ENABLE)
Else
GUICtrlSetState($g_hChkCollectCartFirst, $GUI_UNCHECKED)
GUICtrlSetState($g_hChkCollectCartFirst, $GUI_DISABLE)
GUICtrlSetState($g_hChkTreasuryCollect, $GUI_UNCHECKED)
GUICtrlSetState($g_hChkTreasuryCollect, $GUI_DISABLE)
GUICtrlSetState($g_hTxtCollectGold, $GUI_DISABLE)
GUICtrlSetState($g_hTxtCollectElixir, $GUI_DISABLE)
GUICtrlSetState($g_hTxtCollectDark, $GUI_DISABLE)
EndIf
ChkTreasuryCollect()
EndFunc ;==>ChkCollect
Expand Down Expand Up @@ -593,7 +602,7 @@ EndFunc ;==>chkStartClockTowerBoost

Func chkActivateClangames()
If GUICtrlRead($g_hChkClanGamesEnabled) = $GUI_CHECKED Then
GUICtrlSetState($g_hChkClanGamesOnly, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGames60, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesAir, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesGround, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesMisc, $GUI_ENABLE)
Expand All @@ -611,7 +620,7 @@ Func chkActivateClangames()
GUICtrlSetState($g_hChkClanGamesStopBeforeReachAndPurge, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesDebug, $GUI_ENABLE)
Else
GUICtrlSetState($g_hChkClanGamesOnly, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGames60, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesAir, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesGround, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesMisc, $GUI_DISABLE)
Expand Down
17 changes: 17 additions & 0 deletions COCBot/GUI/MBR GUI Control Tab Village.au3
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,15 @@ EndFunc ;==>chkRequestCCHours
Func chkRequestCountCC()
If GUICtrlRead($g_hChkRequestType_Troops) = $GUI_CHECKED Then
GUICtrlSetState($g_hTxtRequestCountCCTroop, $GUI_ENABLE)
For $i = $g_ahCmbClanCastleTroop[0] To $g_ahCmbClanCastleTroop[2]
GUICtrlSetState($i, $GUI_ENABLE)
Next
CmbClanCastleTroop()
Else
GUICtrlSetState($g_hTxtRequestCountCCTroop, $GUI_DISABLE)
For $i = $g_ahCmbClanCastleTroop[0] To $g_ahTxtClanCastleTroop[2]
GUICtrlSetState($i, $GUI_DISABLE)
Next
EndIf
If GUICtrlRead($g_hChkRequestType_Spells) = $GUI_CHECKED Then
GUICtrlSetState($g_hTxtRequestCountCCSpell, $GUI_ENABLE)
Expand All @@ -65,6 +72,16 @@ Func chkRequestCountCC()
EndIf
EndFunc ;==>chkRequestCountCC

Func CmbClanCastleTroop()
For $i = 0 To UBound($g_ahCmbClanCastleTroop) - 1
If _GUICtrlComboBox_GetCurSel($g_ahCmbClanCastleTroop[$i]) <= $eTroopBowler Then
GUICtrlSetState($g_ahTxtClanCastleTroop[$i], $GUI_ENABLE)
Else
GUICtrlSetState($g_ahTxtClanCastleTroop[$i], $GUI_DISABLE)
EndIf
Next
EndFunc ;==>CmbClanCastleTroop

Func cmbClanCastleSpell()
Local $iSpellSelection = _GUICtrlComboBox_GetCurSel($g_hCmbClanCastleSpell)
If $iSpellSelection < 5 Then
Expand Down
4 changes: 2 additions & 2 deletions COCBot/GUI/MBR GUI Design About.au3
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ Func ShowCommandLineHelp()

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

Expand Down
4 changes: 2 additions & 2 deletions COCBot/GUI/MBR GUI Design Child Attack - Deadbase-Search.au3
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ Func CreateAttackSearchDeadBaseSearch()
GetTranslatedFileIni("MBR GUI Design Child Attack - Search", "ChkSpellsWait_Info_02", "Warning: Do not enable unless you have spell factory or bot will not attack!"))
GUICtrlSetOnEvent(-1, "chkDBSpellsWait")

$g_hChkDBWaitForCastle = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Attack - Search", "ChkWaitForCastle", "Wait for Clan Castle to be full"), $x, $y + 20, -1, -1)
_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR GUI Design Child Attack - Search", "ChkWaitForCastle_Info_01", "Wait until your Clan Castle be Full"))
$g_hChkDBWaitForCastle = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Attack - Search", "ChkWaitForCastle", "Wait for Clan Castle"), $x, $y + 20, -1, -1)
_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR GUI Design Child Attack - Search", "ChkWaitForCastle_Info_01", "Wait until your Clan Castle is filled, as requested."))
GUICtrlCreateGroup("", -99, -99, 1, 1)

Local $x = 220, $y = 45
Expand Down
4 changes: 2 additions & 2 deletions COCBot/GUI/MBR GUI Design Child Attack - Options-Search.au3
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ Func CreateAttackSearchOptionsSearch()
GUICtrlCreateLabel(GetTranslatedFileIni("MBR Global GUI Design", "search(es).", -1), $x + 47, $y + 17, -1, -1)

$y += 45
$g_hChkRestartSearchPickupHero = GUICtrlCreateCheckbox("Restart to pickup healed hero", $x - 5, $y, -1, -1)
_GUICtrlSetTip(-1, "Return to base when a hero is healed and ready to join the attack")
$g_hChkRestartSearchPickupHero = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Attack - Options-Search", "ChkRestartSearchPickupHero", "Restart to pickup healed hero"), $x - 5, $y, -1, -1)
_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR GUI Design Child Attack - Options-Search", "ChkRestartSearchPickupHero_Info_01", "Return to base when a hero is healed and ready to join the attack"))

$y += 25
$g_hChkAlertSearch = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Attack - Options-Search", "ChkAlertSearch", "Alert me when Village found"), $x - 5, $y, -1, -1)
Expand Down
13 changes: 9 additions & 4 deletions COCBot/GUI/MBR GUI Design Child Bot - Android.au3
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include-once

Global $g_hCmbCOCDistributors = 0, $g_hCmbAndroidBackgroundMode = 0, $g_hCmbSuspendAndroid = 0, $g_hChkAndroidAdbClickDragScript = 0, $g_hBtnAndroidAdbShell = 0, $g_hBtnAndroidHome = 0, $g_hBtnAndroidBack = 0, _
$g_hTxtAndroidRebootHours = 0, $g_hChkAndroidCloseWithBot = 0
$g_hTxtAndroidRebootHours = 0, $g_hChkAndroidCloseWithBot = 0 , $g_hBtnAndroidEnableTouch = 0 , $g_hBtnAndroidDisableTouch = 0, $g_lblHelpBot = 0

Func CreateBotAndroid()

Expand Down Expand Up @@ -75,7 +75,7 @@ Func CreateBotAndroid()
$y += $h + 5
$y2 = $y
$w = 240
$h = 80
$h = 120
GUICtrlCreateGroup(GetTranslatedFileIni("Android Control", "Group_03", "Android Control"), $x - 20, $y - 20, $w, $h)
$y -= 2
$g_hBtnAndroidAdbShell = GUICtrlCreateButton(GetTranslatedFileIni("Android Control", "BtnAndroidAdbShell", "Start ADB Shell in new Console Window"), $x - 8, $y, 220, 25)
Expand All @@ -85,6 +85,11 @@ Func CreateBotAndroid()
GUICtrlSetOnEvent(-1, "AndroidHomeButton")
$g_hBtnAndroidBack = GUICtrlCreateButton(GetTranslatedFileIni("Android Control", "BtnAndroidBack", "Send Back"), $x - 8 + 115, $y, 105, 25)
GUICtrlSetOnEvent(-1, "AndroidBackButton")
$y += 30
$g_hBtnAndroidEnableTouch = GUICtrlCreateButton(GetTranslatedFileIni("Android Control", "EnableShowTouchs", "Enable Touchs"), $x - 8, $y, 105, 25)
GUICtrlSetOnEvent(-1, "EnableShowTouchs")
$g_hBtnAndroidDisableTouch = GUICtrlCreateButton(GetTranslatedFileIni("Android Control", "DisableShowTouchs", "Disable Touchs"), $x - 8 + 115, $y, 105, 25)
GUICtrlSetOnEvent(-1, "DisableShowTouchs")
GUICtrlCreateGroup("", -99, -99, 1, 1)

;$x = 25 + $g_iSizeWGrpTab2 - 2 - 10 - $w
Expand All @@ -103,8 +108,8 @@ Func CreateBotAndroid()

$y += 130
$x -= 60
GUICtrlCreateLabel("Command line Help ?", $x - 20, $y - 20, 220, 24, $SS_RIGHT)
GUICtrlSetOnEvent(-1, "ShowCommandLineHelp")
$g_lblHelpBot = GUICtrlCreateLabel("Command line Help ?", $x - 20, $y - 20, 220, 24, $SS_RIGHT)
GUICtrlSetOnEvent($g_lblHelpBot, "ShowCommandLineHelp")
GUICtrlSetCursor(-1, 0)
GUICtrlSetFont(-1, 8.5, $FW_BOLD)
_GUICtrlSetTip(-1, "Click here to get help about command line and option for MyBot.run!")
Expand Down
5 changes: 1 addition & 4 deletions COCBot/GUI/MBR GUI Design Child Bot - Debug.au3
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Global $g_hChkdebugAttackCSV = 0, $g_hChkMakeIMGCSV = 0, $g_hChkDebugDisableZoom

Global $g_hBtnTestTrain = 0, $g_hBtnTestDonateCC = 0, $g_hBtnTestRequestCC = 0, $g_hBtnTestSendText = 0, $g_hBtnTestAttackBar = 0, $g_hBtnTestClickDrag = 0, $g_hBtnTestImage = 0
Global $g_hBtnTestVillageSize = 0, $g_hBtnTestDeadBase = 0, $g_hBtnTestTHimgloc = 0, $g_hBtnTestTrainsimgloc = 0, $g_hBtnTestQuickTrainsimgloc = 0, $g_hTxtTestFindButton = 0
Global $g_hBtnTestFindButton = 0, $g_hBtnTestDeadBaseFolder = 0, $g_hBtnTestCleanYard = 0, $g_hBtnTestAttackCSV = 0, $g_hBtnTestimglocTroopBar = 0, $g_hBtnTestBuildingLocation = 0
Global $g_hBtnTestFindButton = 0, $g_hBtnTestDeadBaseFolder = 0, $g_hBtnTestCleanYard = 0, $g_hBtnTestAttackCSV = 0, $g_hBtnTestBuildingLocation = 0
Global $g_hBtnTestConfigSave = 0, $g_hBtnTestConfigApply = 0, $g_hBtnTestConfigRead = 0, $g_hBtnTestOcrMemory = 0, $g_hBtnTestWeakBase = 0, $g_hBtnTestClickAway = 0, $g_hBtnTestAutoUpgrade = 0
Global $g_hBtnTestUpgradeWindow = 0, $g_hBtnTestSmartWait = 0, $g_hBtnConsoleWindow = 0

Expand Down Expand Up @@ -169,9 +169,6 @@ Func CreateBotDebug()
$g_hBtnTestBuildingLocation = GUICtrlCreateButton(GetTranslatedFileIni("MBR GUI Design Child Bot - Debug", "BtnTestBuildingLocation", "Find Building"), $x - 145, $y, 140, 25)
$y -= $yNext

$g_hBtnTestimglocTroopBar = GUICtrlCreateButton("IMGLOC ATTACKBAR", $x, $y, 140, 25)
$y -= $yNext

$g_hBtnTestConfigSave = GUICtrlCreateButton("Config Save", $x + 20, $y, 120, 25)
$y -= $yNext
$g_hBtnTestConfigApply = GUICtrlCreateButton("Config Apply", $x + 20, $y, 120, 25)
Expand Down
Loading

0 comments on commit 9e480d1

Please sign in to comment.