Skip to content

Commit

Permalink
* **V7.2.4**
Browse files Browse the repository at this point in the history
 * Add Bot / Android Option to select preferred Android Background Mode
 * Add BlueStacks2/3 and iTools support for ADB screencap Background Mode
 * Add KOPLAYER and Nox WinAPI/DirectX support for Background Mode
 * Add Nox Dock Mode support
 * Add Ability to Disable Bot Notifications suggested By HarchH
 * Fix Bad Pixel Check in Training when Bot runs while Troops change
 * Fix closing WerFault Message
 * Fix Share Replay Function
 * Fix SmartWait for Heroes
 * Update DropTrophy Drop Location to drop Troops/Heroes further into the grass
 * Update Azerbaijan and Turkish Language By Z E C K
 * Update Vietnamese Language by NguyenAnhHD
  • Loading branch information
cosote committed Aug 31, 2017
1 parent 6b415ed commit 5a0c65e
Show file tree
Hide file tree
Showing 41 changed files with 1,228 additions and 720 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
* **V7.2.4**
* Add Bot / Android Option to select preferred Android Background Mode
* Add BlueStacks2/3 and iTools support for ADB screencap Background Mode
* Add KOPLAYER and Nox WinAPI/DirectX support for Background Mode
* Add Nox Dock Mode support
* Add Ability to Disable Bot Notifications suggested By HarchH
* Fix Bad Pixel Check in Training when Bot runs while Troops change
* Fix closing WerFault Message
* Fix Share Replay Function
* Fix SmartWait for Heroes
* Update DropTrophy Drop Location to drop Troops/Heroes further into the grass
* Update Azerbaijan and Turkish Language By Z E C K
* Update Vietnamese Language by NguyenAnhHD

* **V7.2.3**
* Fix Main Screen Locating & Troop Training for August 4th Update

Expand All @@ -11,7 +25,7 @@
* Fix Bot Crash when Wait for CC is enabled with duplicate Spells in CC
* Fix switching between Builder Base and Normal Village
* Fix Bot crash when computer run cycle reaches 48.7 days
* Fix bot crash when initiate attacks using external edge in most languages except BahasaIND, French, Italian,
* Fix bot crash when initiate attacks using external edge in most languages except BahasaIND, French, Italian,
Spanish
* Fix CSV row number error
* Fix failed to find/press retry search button when every 30 minutes in cloud
Expand Down
7 changes: 6 additions & 1 deletion COCBot/GUI/MBR GUI Control Android.au3
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,13 @@ Func AndroidSuspendIndexToFlags($idx)
$iFlags = 2 + 4
EndSwitch
Return $iFlags
EndFunc ;==>AndroidSuspendFlagsToIndex
EndFunc ;==>AndroidSuspendIndexToFlags

Func cmbSuspendAndroid()
$g_iAndroidSuspendModeFlags = AndroidSuspendIndexToFlags(_GUICtrlComboBox_GetCurSel($g_hCmbSuspendAndroid))
EndFunc ;==>cmbSuspendAndroid

Func cmbAndroidBackgroundMode()
$g_iAndroidBackgroundMode = _GUICtrlComboBox_GetCurSel($g_hCmbAndroidBackgroundMode)
UpdateAndroidBackgroundMode()
EndFunc ;==>cmbAndroidBackgroundMode
9 changes: 6 additions & 3 deletions COCBot/GUI/MBR GUI Control BOT Options.au3
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Func cmbLanguage()
$g_sLanguage = $aLanguageFile[$g_sLanguageIndex][0] ; the filename = 0, the display name = 1
MsgBox("", "", GetTranslatedFileIni("MBR Popups", "Func_cmbLanguage", "Restart Bot to load program with new language:") & " " & $aLanguageFile[$g_sLanguageIndex][1] & " (" & $g_sLanguage & ")")
IniWriteS($g_sProfileConfigPath, "other", "language", $g_sLanguage) ; save language before restarting
ShellExecute(@ScriptFullPath, $g_sProfileCurrentName & " " & $g_sAndroidEmulator & " " & $g_sAndroidInstance & " /r")
RestartBot(False, False)
EndFunc ;==>cmbLanguage

Func chkBotCustomTitleBarClick()
Expand All @@ -82,6 +82,10 @@ Func chkBotAutoSlideClick()
$g_iBotDesignFlags = BitOR(BitAND($g_iBotDesignFlags, BitNOT(2)), (($bChecked) ? 2 : 0))
EndFunc ;==>chkBotAutoSlideClick

Func chkDisableNotifications()
$g_bDisableNotifications = (GUICtrlRead($g_hChkDisableNotifications) = $GUI_CHECKED)
EndFunc

Func chkUseRandomClick()
$g_bUseRandomClick = (GUICtrlRead($g_hChkUseRandomClick) = $GUI_CHECKED)
EndFunc ;==>chkUseRandomClick
Expand Down Expand Up @@ -893,5 +897,4 @@ Func btnTestOcrMemory()

Next

EndFunc ;==>btnTestOcrMemory

EndFunc ;==>btnTestOcrMemory
20 changes: 15 additions & 5 deletions COCBot/GUI/MBR GUI Design Child Bot - Android.au3
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
; ===============================================================================================================================
#include-once

Global $g_hCmbCOCDistributors = 0, $g_hCmbSuspendAndroid = 0, $g_hChkAndroidAdbClickDragScript = 0
Global $g_hCmbCOCDistributors = 0, $g_hCmbAndroidBackgroundMode = 0, $g_hCmbSuspendAndroid = 0, $g_hChkAndroidAdbClickDragScript = 0

Func CreateBotAndroid()
Local $x = 25, $y = 45, $w = 210, $h = 50
Local $x = 25, $y = 45, $y2, $w = 210, $h = 50
GUICtrlCreateGroup(GetTranslatedFileIni("MBR Distributors", "Group_01", "Distributors"), $x - 20, $y - 20, $w, $h) ; $g_iSizeWGrpTab2, $g_iSizeHGrpTab2
$y -= 2
$g_hCmbCOCDistributors = GUICtrlCreateCombo("", $x - 8, $y, 185, -1, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
Expand All @@ -28,16 +28,26 @@ Func CreateBotAndroid()
GUICtrlCreateGroup("", -99, -99, 1, 1)

$y += $h + 5
$y2 = $y
$w = $g_iSizeWGrpTab2 - 2
$h = 80
GUICtrlCreateGroup(GetTranslatedFileIni("Android", "Android_Options", "Android Options"), $x - 20, $y - 20, $w, $h)
;$y -=2
;$y -= 2
GUICtrlCreateLabel(GetTranslatedFileIni("Android", "LblBackgroundMode", "Screencapture Background Mode"), $x - 8, $y + 5, 180, 22, $SS_RIGHT)
$g_hCmbAndroidBackgroundMode = GUICtrlCreateCombo("", $x - 8 + 180 + 5, $y, 200, -1, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, GetTranslatedFileIni("Android", "CmbBackgroundMode", "Default|Use WinAPI (need Android DirectX)|Use ADB screencap"))
_GUICtrlSetTip(-1, GetTranslatedFileIni("Android", "CmbBackgroundMode_Info", 'Control how the Android screenshot is taken in background mode.\nDefault chooses WinAPI or screencap based on Android Emulator.\nInfo: WinAPI is faster than screencap, but screencap always works,\neven if screen is off (we call that the "True Background Mode")!'))
_GUICtrlComboBox_SetCurSel(-1, $g_iAndroidBackgroundMode)
GUICtrlSetOnEvent(-1, "cmbAndroidBackgroundMode")
$y += 25
$g_hChkAndroidAdbClickDragScript = GUICtrlCreateCheckbox(GetTranslatedFileIni("Android", "ChkAdbClickDragScript", "Use script for accurate Click && Drag"), $x, $y, -1, -1)
_GUICtrlSetTip(-1, GetTranslatedFileIni("Android", "ChkAdbClickDragScript_Info", "Use Android specific script file for Click & Drag.\r\nIf unchecked use more compatible 'input swipe'."))
GUICtrlSetState(-1, (($g_bAndroidAdbClickDragScript) ? ($GUI_CHECKED) : ($GUI_UNCHECKED)))
GUICtrlCreateGroup("", -99, -99, 1, 1)

$y += $h + 5
$y = $y2 + $h + 5
$w = $g_iSizeWGrpTab2 - 2
$h = 50
GUICtrlCreateGroup(GetTranslatedFileIni("MBR Distributors", "Group_02", "Advanced Android Options"), $x - 20, $y - 20, $w, $h)
$y -= 2
GUICtrlCreateLabel(GetTranslatedFileIni("MBR Distributors", "LblAdvanced_Android_Options", "Suspend/Resume Android"), $x - 8, $y + 5, 180, 22, $SS_RIGHT)
Expand All @@ -49,7 +59,7 @@ Func CreateBotAndroid()
GUICtrlCreateGroup("", -99, -99, 1, 1)

$y += $h + 5
Local $y2 = $y
$y2 = $y
$w = 240
$h = 80
GUICtrlCreateGroup(GetTranslatedFileIni("Android Control", "Group_03", "Android Control"), $x - 20, $y - 20, $w, $h)
Expand Down
22 changes: 12 additions & 10 deletions COCBot/GUI/MBR GUI Design Child Bot - Options.au3
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Global $g_hTxtGlobalActiveBotsAllowed = 0, $g_hTxtGlobalThreads = 0, $g_hTxtThre
;Global $g_hChkUpdatingWhenMinimized = 0
Global $g_hChkBotCustomTitleBarClick = 0, $g_hChkBotAutoSlideClick = 0, $g_hChkHideWhenMinimized = 0, $g_hChkUseRandomClick = 0, $g_hChkScreenshotType = 0, _
$g_hChkScreenshotHideName = 0, $g_hTxtTimeAnotherDevice = 0
Global $g_hChkSinglePBTForced = 0, $g_hTxtSinglePBTimeForced = 0, $g_hTxtPBTimeForcedExit = 0, $g_hChkFixClanCastle = 0, $g_hChkAutoResume = 0, $g_hTxtAutoResumeTime = 0
Global $g_hChkSinglePBTForced = 0, $g_hTxtSinglePBTimeForced = 0, $g_hTxtPBTimeForcedExit = 0, $g_hChkFixClanCastle = 0, $g_hChkAutoResume = 0, $g_hTxtAutoResumeTime = 0, $g_hChkDisableNotifications = 0

Func CreateBotOptions()

Expand Down Expand Up @@ -133,15 +133,15 @@ Func CreateBotOptions()
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateGroup("", -99, -99, 1, 1)

$y += 85
GUICtrlCreateGroup(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "Group_08", "Processor/Thread Advanced"), $x - 20, $y - 20, 330, 85)
$y += 52
GUICtrlCreateGroup(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "Group_08", "Processor/Thread Advanced"), $x - 20, $y - 20, 210, 85)
$y -= 2
$g_hTxtGlobalActiveBotsAllowed = GUICtrlCreateInput($g_iGlobalActiveBotsAllowed, $x, $y + 2, 25, 16, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER))
$sTxtTip = GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "TxtGlobalActiveBotsAllowed_Info_01", "When running multiple bots, specify how many can run at the same time.\r\nThis reduces your CPU utilization significantly.\r\nHalf of available logical processors is a good number.\r\nThis configuration is shared across all profiles/instances and a restart of all bots is required (close all, wait, and start all again!).")
GUICtrlSetOnEvent(-1, "txtGlobalActiveBotsAllowed")
GUICtrlSetLimit(-1, 2)
_GUICtrlSetTip(-1, $sTxtTip)
GUICtrlCreateLabel(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "LblGlobalActiveBotsAllowed_Info_01", "Bots can run parallel at the same time"), $x + 30, $y + 4)
GUICtrlCreateLabel(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "LblGlobalActiveBotsAllowed_Info_01", "Bots can run at the same time"), $x + 30, $y + 3)
_GUICtrlSetTip(-1, $sTxtTip)

$y += 20
Expand All @@ -150,7 +150,7 @@ Func CreateBotOptions()
GUICtrlSetOnEvent(-1, "txtGlobalThreads")
GUICtrlSetLimit(-1, 2)
_GUICtrlSetTip(-1, $sTxtTip)
GUICtrlCreateLabel(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "LblGlobalThreads_Info_01", "Global image processing threads will be used for all bots"), $x + 30, $y + 4)
GUICtrlCreateLabel(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "LblGlobalThreads_Info_01", "Img processing threads for all bots"), $x + 30, $y + 3)
_GUICtrlSetTip(-1, $sTxtTip)

$y += 20
Expand All @@ -159,12 +159,12 @@ Func CreateBotOptions()
GUICtrlSetOnEvent(-1, "txtThreads")
GUICtrlSetLimit(-1, 2)
_GUICtrlSetTip(-1, $sTxtTip)
GUICtrlCreateLabel(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "LblThreads_Info_01", "Image processing threads will be used for this bot"), $x + 30, $y + 4)
GUICtrlCreateLabel(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "LblThreads_Info_01", "Img processing threads for this bot"), $x + 30, $y + 3)
_GUICtrlSetTip(-1, $sTxtTip)
GUICtrlCreateGroup("", -99, -99, 1, 1)

Local $x = 240, $y = 45, $yGroup = $y
Local $hGroup = GUICtrlCreateGroup(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "Group_04", "Advanced"), $x - 20, $y - 20, 0, 0)
Local $hGroup = GUICtrlCreateGroup(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "Group_04", "Advanced"), $x - 20, $y - 20, 225, 140)
#cs
$g_hChkUpdatingWhenMinimized = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "ChkUpdatingWhenMinimized", "Updating when minimized"), $x, $y, -1, -1)
GUICtrlSetState(-1, $GUI_DISABLE) ; must be always enabled
Expand Down Expand Up @@ -193,13 +193,15 @@ Func CreateBotOptions()
$g_hTxtAutoResumeTime = GUICtrlCreateInput("5",$x + 132, $y + 5, 30, 16, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER))
GUICtrlCreateLabel(GetTranslatedFileIni("MBR Global GUI Design", "min.", -1), $x + 167, $y + 6, 27, 15)
$y += 19
$g_hChkDisableNotifications = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "ChkDisableNotifications", "Disable Notifications"), $x, $y, -1, -1)
_GUICtrlSetTip(-1,GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "ChkDisableNotifications_Info_01", "Disable Notifications sent by the Bot"))
GUICtrlSetOnEvent(-1, "chkDisableNotifications")
$y += 19
$g_hChkUseRandomClick = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "ChkUseRandomClick", "Random Click"), $x, $y, -1, -1)
GUICtrlSetOnEvent(-1, "chkUseRandomClick")
$y += 19
GUICtrlSetPos($hGroup, $x - 20, $yGroup - 20, 255, (($y - $yGroup) / 19) * 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)

$y += 30
$y += 45
GUICtrlCreateGroup(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "Group_05", "Photo Screenshot Options"), $x - 20, $y - 17, 225, 60)
$g_hChkScreenshotType = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Bot - Options", "ChkScreenshotType", "Make in PNG format"), $x, $y, -1, -1)
GUICtrlSetState(-1, $GUI_CHECKED)
Expand Down
Loading

0 comments on commit 5a0c65e

Please sign in to comment.