Skip to content

Commit

Permalink
* **V7.5**
Browse files Browse the repository at this point in the history
* Add Clan Games support (special thx go to ViperZ and Uncle Xbenk)
* Add Collect free magic poisons
* Add support for SuperCell ID accounts switch
* Fix DonateCC "Unable to read Chat Request" in both Chinese languages and Korean language
* Fix "Log in with Supercell ID" screen (push CoC shared_prefs folder if detected, click by account list when shared_prefs is not available and switch accounts enabled)
* Fix rare "ADB Prompt not identified!" issue
* Fix multiple sharef_prefs folders problem and push not working on newer ADB versions
* Fix permission and owner when pushing sharef_prefs folder
* Fix waiting in the cloud not found Clan button
* Fix check treasury when button is smaller than usual due to Clan Games
* Fix never returning from battle when CoC hanging in network re-connecting state with "End Battle" button
* Fix ADB connection error when rebooting Android on error
* Fix ADB connection error when Android is not properly working
* Fix shared_prefs push for Android Nougat
* Fix bot config.ini reset when no space left in profile path (100 MB required free disk space)
* Fix auto upgrade on main base not stopping on first upgrade without enough resources
* Fix auto upgrade new buildings on Builder Island
* Fix brew Spells unconditionally, When the troops queue was empty, create the spells without checking if they were already in the queue.
  • Loading branch information
cosote committed Mar 25, 2018
1 parent 986c5b9 commit b256519
Show file tree
Hide file tree
Showing 146 changed files with 3,805 additions and 1,489 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
* **V7.4.4**
* **V7.5**
* Add Clan Games support (special thx go to ViperZ and Uncle Xbenk)
* Add Collect free magic poisons
* Add support for SuperCell ID accounts switch
* Fix DonateCC "Unable to read Chat Request" in both Chinese languages and Korean language
* Fix "Log in with Supercell ID" screen (push CoC shared_prefs folder if detected, click by account list when shared_prefs is not available and switch accounts enabled)
* Fix rare "ADB Prompt not identified!" issue
* Fix multiple sharef_prefs folders problem and push not working on newer ADB versions
* Fix permission and owner when pushing sharef_prefs folder
* Fix waiting in the cloud not found Clan button
* Fix check treasury when button is smaller than usual due to Clan Games
* Fix never returning from battle when CoC hanging in network re-connecting state with "End Battle" button
* Fix ADB connection error when rebooting Android on error
* Fix ADB connection error when Android is not properly working
* Fix shared_prefs push for Android Nougat
* Fix bot config.ini reset when no space left in profile path (100 MB required free disk space)
* Fix auto upgrade on main base not stopping on first upgrade without enough resources
* Fix auto upgrade new buildings on Builder Island
* Fix brew Spells unconditionally, When the troops queue was empty, create the spells without checking if they were already in the queue.

* **V7.4.4**
* Add AutoIt 3.3.14.3 support (though not advided to use, as still not all problems are resolved!)
* Add CoC shared_prefs folder support to Switch Accounts supporting also SuperCell ID accounts (saved in current users documents folder in MyBot.run-Profiles)
* Add allows account switching in the order: Donate - Shortest Active - Donate.....
Expand Down
24 changes: 19 additions & 5 deletions COCBot/GUI/MBR GUI Control BOT Options.au3
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ Func chkSwitchAcc()
For $i = $g_hCmbTotalAccount To $g_ahChkDonate[7]
GUICtrlSetState($i, $GUI_ENABLE)
Next
chkSmartSwitch()
Else
releaseSwitchAccountMutex()
For $i = $g_hCmbTotalAccount To $g_ahChkDonate[7]
Expand Down Expand Up @@ -281,7 +280,6 @@ Func _cmbSwitchAcc($bReadSaveConfig = True)
GUICtrlSetState($i, (($bEnable) ? $GUI_ENABLE : $GUI_DISABLE))
Next
cmbTotalAcc()
chkSmartSwitch()
$s_bActive = False
EndFunc ;==>_cmbSwitchAcc

Expand Down Expand Up @@ -362,9 +360,25 @@ Func cmbSwitchAccProfileX()
Next
EndFunc ;==>cmbSwitchAccProfileX

Func chkSharedPrefs()
$g_bChkSharedPrefs = GUICtrlRead($g_hChkSharedPrefs) = $GUI_CHECKED
EndFunc ;==>chkSharedPrefs
Func chkAccSwitchMode()
If GUICtrlRead($g_hRadSwitchGooglePlay) = $GUI_CHECKED Then
$g_bChkGooglePlay = True
$g_bChkSuperCellID = False
$g_bChkSharedPrefs = False
ElseIf GUICtrlRead($g_hRadSwitchSuperCellID) = $GUI_CHECKED Then
$g_bChkGooglePlay = False
$g_bChkSuperCellID = True
$g_bChkSharedPrefs = False
ElseIf GUICtrlRead($g_hRadSwitchSharedPrefs) = $GUI_CHECKED Then
$g_bChkGooglePlay = False
$g_bChkSuperCellID = False
$g_bChkSharedPrefs = True
Else
$g_bChkGooglePlay = False
$g_bChkSuperCellID = False
$g_bChkSharedPrefs = False
EndIf
EndFunc ;==>chkAccSwitchMode

; #DEBUG FUNCTION# ==============================================================================================================

Expand Down
3 changes: 1 addition & 2 deletions COCBot/GUI/MBR GUI Control Bottom.au3
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ Func btnStop()
; always invoked in MyBot.run.au3!
EnableControls($g_hFrmBotBottom, False, $g_aFrmBotBottomCtrlState)
$g_bRunState = False ; Exit BotStart()
$g_iBotAction = $eBotStop
ReduceBotMemory()
EndIf
$g_iBotAction = $eBotStop
EndFunc ;==>btnStop

Func btnSearchMode()
Expand Down
49 changes: 49 additions & 0 deletions COCBot/GUI/MBR GUI Control Child Misc.au3
Original file line number Diff line number Diff line change
Expand Up @@ -558,3 +558,52 @@ Func chkStartClockTowerBoost()
GUICtrlSetState($g_hChkCTBoostBlderBz, $GUI_DISABLE)
EndIf
EndFunc ;==>chkStartClockTowerBoost



Func chkActivateClangames()
If GUICtrlRead($g_hChkClanGamesEnabled) = $GUI_CHECKED Then
GUICtrlSetState($g_hChkClanGamesAir, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesGround, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesMisc, $GUI_ENABLE)

;V3
GUICtrlSetState($g_hChkClanGamesLoot, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesBattle, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesDestruction, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesAirTroop, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesGroundTroop, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesMiscellaneous, $GUI_ENABLE)

GUICtrlSetState($g_hChkClanGamesPurge, $GUI_ENABLE)
If GUICtrlRead($g_hChkClanGamesPurge) = $GUI_CHECKED then GUICtrlSetState($g_hcmbPurgeLimit, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesStopBeforeReachAndPurge, $GUI_ENABLE)
GUICtrlSetState($g_hChkClanGamesDebug, $GUI_ENABLE)
Else
GUICtrlSetState($g_hChkClanGamesAir, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesGround, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesMisc, $GUI_DISABLE)

;V3
GUICtrlSetState($g_hChkClanGamesLoot, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesBattle, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesDestruction, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesAirTroop, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesGroundTroop, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesMiscellaneous, $GUI_DISABLE)
GUICtrlSetState($g_hcmbPurgeLimit, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesStopBeforeReachAndPurge, $GUI_DISABLE)

GUICtrlSetState($g_hChkClanGamesPurge, $GUI_DISABLE)
GUICtrlSetState($g_hChkClanGamesDebug, $GUI_DISABLE)
EndIf
EndFunc ;==>chkActivateClangames

Func chkPurgeLimits()
If GUICtrlRead($g_hChkClanGamesPurge) = $GUI_CHECKED AND _
GUICtrlRead($g_hChkClanGamesEnabled) = $GUI_CHECKED Then
GUICtrlSetState($g_hcmbPurgeLimit, $GUI_ENABLE)
Else
GUICtrlSetState($g_hcmbPurgeLimit, $GUI_DISABLE)
EndIf
EndFunc
12 changes: 6 additions & 6 deletions COCBot/GUI/MBR GUI Control Tab SmartZap.au3
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ Func chkSmartLightSpell()
GUICtrlSetState($g_hChkSmartEQSpell, $GUI_ENABLE)
GUICtrlSetState($g_hLblSmartUseLSpell, $GUI_SHOW)
If GUICtrlRead($g_hChkNoobZap) = $GUI_CHECKED Then
GUICtrlSetState($g_hTxtSmartMinDark, $GUI_ENABLE)
GUICtrlSetState($g_hTxtSmartZapMinDE, $GUI_ENABLE)
GUICtrlSetState($g_hTxtSmartExpectedDE, $GUI_ENABLE)
Else
GUICtrlSetState($g_hTxtSmartMinDark, $GUI_DISABLE)
GUICtrlSetState($g_hTxtSmartZapMinDE, $GUI_DISABLE)
GUICtrlSetState($g_hTxtSmartExpectedDE, $GUI_DISABLE)
EndIf
$g_bSmartZapEnable = True
Else
GUICtrlSetState($g_hChkSmartZapDB, $GUI_DISABLE)
GUICtrlSetState($g_hChkSmartZapSaveHeroes, $GUI_DISABLE)
GUICtrlSetState($g_hChkSmartZapFTW, $GUI_DISABLE)
GUICtrlSetState($g_hTxtSmartMinDark, $GUI_DISABLE)
GUICtrlSetState($g_hTxtSmartZapMinDE, $GUI_DISABLE)
GUICtrlSetState($g_hChkNoobZap, $GUI_DISABLE)
GUICtrlSetState($g_hChkSmartEQSpell, $GUI_DISABLE)
GUICtrlSetState($g_hLblSmartUseLSpell, $GUI_HIDE)
Expand All @@ -45,11 +45,11 @@ EndFunc ;==>chkSmartLightSpell

Func chkNoobZap()
If GUICtrlRead($g_hChkNoobZap) = $GUI_CHECKED Then
GUICtrlSetState($g_hTxtSmartMinDark, $GUI_ENABLE)
GUICtrlSetState($g_hTxtSmartZapMinDE, $GUI_ENABLE)
GUICtrlSetState($g_hTxtSmartExpectedDE, $GUI_ENABLE)
$g_bNoobZap = True
Else
GUICtrlSetState($g_hTxtSmartMinDark, $GUI_DISABLE)
GUICtrlSetState($g_hTxtSmartZapMinDE, $GUI_DISABLE)
GUICtrlSetState($g_hTxtSmartExpectedDE, $GUI_DISABLE)
$g_bNoobZap = False
EndIf
Expand Down Expand Up @@ -78,7 +78,7 @@ Func chkSmartZapSaveHeroes()
EndFunc ;==>chkSmartZapSaveHeroes

Func txtMinDark()
$g_iSmartZapMinDE = GUICtrlRead($g_hTxtSmartMinDark)
$g_iSmartZapMinDE = GUICtrlRead($g_hTxtSmartZapMinDE)
EndFunc ;==>txtMinDark

Func txtExpectedDE()
Expand Down
4 changes: 2 additions & 2 deletions COCBot/GUI/MBR GUI Design Child Attack - Options-SmartZap.au3
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

;Global $g_hGUI_NEWSMARTZAP = 0
Global $g_hChkSmartLightSpell = 0, $g_hChkSmartEQSpell = 0, $g_hChkNoobZap = 0, $g_hChkSmartZapDB = 0, $g_hChkSmartZapSaveHeroes = 0, _
$g_hTxtSmartMinDark = 0, $g_hTxtSmartExpectedDE = 0, $g_hChkDebugSmartZap = 0, $g_hChkSmartZapFTW = 0
$g_hTxtSmartZapMinDE = 0, $g_hTxtSmartExpectedDE = 0, $g_hChkDebugSmartZap = 0, $g_hChkSmartZapFTW = 0

Global $g_hLblSmartUseLSpell = 0, $g_hLblSmartUseEQSpell = 0, $g_hLblSmartZap = 0, $g_hLblNoobZap = 0, $g_hLblSmartLightningUsed = 0, $g_hLblSmartEarthQuakeUsed = 0

Expand Down Expand Up @@ -72,7 +72,7 @@ Func CreateAttackNewSmartZap()
_GUICtrlCreateIcon($g_sLibIconPath, $eIcnDark, $x + 200 + 9, $y + 11, 24, 24)
GUICtrlCreateGroup("", $x + 199, $y - 1, 192, 106)
$g_hLblSmartZap = GUICtrlCreateLabel(GetTranslatedFileIni("MBR GUI Design Child Attack - Options-SmartZap", "LblSmartZap", "Min. amount of Dark Elixir") & ":", $x + 160 + 79, $y + 12, -1, -1)
$g_hTxtSmartMinDark = GUICtrlCreateInput("350", $x + 289, $y + 32, 90, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER))
$g_hTxtSmartZapMinDE = GUICtrlCreateInput("350", $x + 289, $y + 32, 90, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER))
_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR GUI Design Child Attack - Options-SmartZap", "LblSmartZap_Info_01", "Set the Value of the minimum amount of Dark Elixir in the Drills"))
GUICtrlSetLimit(-1, 3)
GUICtrlSetOnEvent(-1, "txtMinDark")
Expand Down
17 changes: 12 additions & 5 deletions COCBot/GUI/MBR GUI Design Child Bot - Profiles.au3
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Global $g_hCmbProfile = 0, $g_hTxtVillageName = 0, $g_hBtnAddProfile = 0, $g_hBt
$g_hBtnDeleteProfile = 0, $g_hBtnCancelProfileChange = 0, $g_hBtnRenameProfile = 0, $g_hBtnPullSharedPrefs = 0, $g_hBtnPushSharedPrefs = 0

Global $g_hChkSwitchAcc = 0, $g_hCmbSwitchAcc = 0, $g_hChkSharedPrefs = 0, $g_hCmbTotalAccount = 0, $g_hChkSmartSwitch = 0, $g_hCmbTrainTimeToSkip = 0, $g_hChkDonateLikeCrazy = 0, _
$g_ahChkAccount[8], $g_ahCmbProfile[8], $g_ahChkDonate[8]
$g_ahChkAccount[8], $g_ahCmbProfile[8], $g_ahChkDonate[8], _
$g_hRadSwitchGooglePlay = 0, $g_hRadSwitchSuperCellID = 0, $g_hRadSwitchSharedPrefs = 0

Func CreateBotProfiles()

Expand Down Expand Up @@ -136,10 +137,16 @@ Func CreateBotProfiles()
GUICtrlSetOnEvent(-1, "cmbTotalAcc")
GUICtrlCreateLabel(GetTranslatedFileIni("MBR GUI Design Child Bot - Profiles", "CmbTotalAccount", "Total CoC Accounts") & ": ", $x + 220, $y + 4, -1, -1)

$g_hChkSharedPrefs = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Bot - Profiles", "ChkSharedPrefs", "Switch Accounts using shared_prefs folder"), $x + 204, $y - 25, -1, -1)
GUICtrlSetOnEvent(-1, "chkSharedPrefs")
_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR GUI Design Child Bot - Profiles", "ChkSharedPrefs_Info_01", "Push and pull CoC shared_prefs folder. Usefull when GUI switch fails or using accounts with SuperCell ID."))

$g_hRadSwitchGooglePlay = GUICtrlCreateRadio(GetTranslatedFileIni("MBR GUI Design Child Bot - Profiles", "RadSwitchGooglePlay", "Google Play"), $x + 185, $y - 30, -1, -1)
_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR GUI Design Child Bot - Profiles", "RadSwitchGooglePlay_Info_01", "Only support for all Google Play accounts"))
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "chkAccSwitchMode")
$g_hRadSwitchSuperCellID = GUICtrlCreateRadio(GetTranslatedFileIni("MBR GUI Design Child Bot - Profiles", "RadSwitchSuperCellID", "SuperCell ID"), $x + 265, $y - 30, -1, -1)
_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR GUI Design Child Bot - Profiles", "RadSwitchSuperCellID_Info_01", "Only support for all SuperCell ID accounts"))
GUICtrlSetOnEvent(-1, "chkAccSwitchMode")
$g_hRadSwitchSharedPrefs = GUICtrlCreateRadio(GetTranslatedFileIni("MBR GUI Design Child Bot - Profiles", "RadSwitchSharedPrefs", "Shared_prefs"), $x + 345, $y - 30, -1, -1)
_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR GUI Design Child Bot - Profiles", "RadSwitchSharedPrefs_Info_01", "Support for Google Play and SuperCell ID accounts"))
GUICtrlSetOnEvent(-1, "chkAccSwitchMode")

$y += 23
$g_hChkSmartSwitch = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Bot - Profiles", "ChkSmartSwitch", "Smart switch"), $x, $y, -1, -1)
Expand Down
Loading

0 comments on commit b256519

Please sign in to comment.