Skip to content

Commit

Permalink
* **V7.6.6**
Browse files Browse the repository at this point in the history
* Added check & remove unwanted CC siege machine
* Fixed Custom Drop Order @ViperZ (December 2018 Update)
* Fixed "Wait for Siege Machine", when bot is in "Halt Attack"
* Fixed wait for CC Troops when CC Spells are not used and "Village/Req. & Donate/When lacking" options are not configured
* Fixed several small bugs from previous Version
* Fixed Rearm for Infernos and Xbows/Eagle
* Fixed weak base detection when TH not detected to assume then TH12
* Fixed exiting search due to zoom-out level, now it just measures village
* Fixed reading quantity of Bat Spell in Clan castle
* Fixed Heroes in AutoUpgrade
* Fixed RequestCC can not request, cause Army Overview moves slightly
* Fixed Haste donation
* Fixed Clock tower boost
* Fixed losing CoC Android shared_prefs when shared folder not available
* Fixed BlueStacks2 support for all versions (incl. 4)
* Fixed Smartfarm for Snow theme
* Fixed shared folder detection for all android emulators
* Fixed returning home from battle report
* Fixed heroes activation when getting weak
* Improved deadbase collector lvl 12 and lvl 13 (snow) and  50% detection
* Improved Eagle lvl 1-3 weak base detection, also re-check weak-base after 5 sec.
* Improved Laboratory, prefer units in current army composition
* Improved Giant Deployment in SmartFarm/Standard Attack
  • Loading branch information
cosote committed Jan 5, 2019
1 parent 9d35715 commit 88ab2bf
Show file tree
Hide file tree
Showing 434 changed files with 3,011 additions and 2,584 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
* **V7.6.6**
* Added check & remove unwanted CC siege machine
* Fixed Custom Drop Order @ViperZ (December 2018 Update)
* Fixed "Wait for Siege Machine", when bot is in "Halt Attack"
* Fixed wait for CC Troops when CC Spells are not used and "Village/Req. & Donate/When lacking" options are not configured
* Fixed several small bugs from previous Version
* Fixed Rearm for Infernos and Xbows/Eagle
* Fixed weak base detection when TH not detected to assume then TH12
* Fixed exiting search due to zoom-out level, now it just measures village
* Fixed reading quantity of Bat Spell in Clan castle
* Fixed Heroes in AutoUpgrade
* Fixed RequestCC can not request, cause Army Overview moves slightly
* Fixed Haste donation
* Fixed Clock tower boost
* Fixed losing CoC Android shared_prefs when shared folder not available
* Fixed BlueStacks2 support for all versions (incl. 4)
* Fixed Smartfarm for Snow theme
* Fixed shared folder detection for all android emulators
* Fixed returning home from battle report
* Fixed heroes activation when getting weak
* Improved deadbase collector lvl 12 and lvl 13 (snow) and 50% detection
* Improved Eagle lvl 1-3 weak base detection, also re-check weak-base after 5 sec.
* Improved Laboratory, prefer units in current army composition
* Improved Giant Deployment in SmartFarm/Standard Attack

* **V7.6.5**
* Add Ice Golem Support @ViperZ
* Add Bat Spell Support @ViperZ
Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control Achievements.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: MyBot.run team
; Modified ......: CodeSlinger69 (2017)
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control Android.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: MMHK (11-2016)
; Modified ......: CodeSlinger69 (2017)
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control Attack Scripted.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: MyBot.run team
; Modified ......: CodeSlinger69 (2017), MMHK (01-2008)
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control Attack Standard.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: MyBot.run team
; Modified ......: CodeSlinger69 (2017)
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down
69 changes: 33 additions & 36 deletions COCBot/GUI/MBR GUI Control BOT Options.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: MyBot.run Team
; Modified ......: CodeSlinger69 (2017)
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down Expand Up @@ -492,39 +492,20 @@ Func btnTestTrain()
EndFunc ;==>btnTestTrain

Func btnTestDonateCC()
Local $currentOCR = $g_bDebugOcr
Local $currentRunState = $g_bRunState
Local $currentSetlog = $g_bDebugSetlog
_GUICtrlTab_ClickTab($g_hTabMain, 0)
$g_bDebugOcr = True
$g_bRunState = True
$g_bDebugSetlog = True
ForceCaptureRegion()
DebugImageSave("donateCC_")

SetLog(_PadStringCenter(" Test DonateCC begin (" & $g_sBotVersion & ")", 54, "="), $COLOR_INFO)
$g_iDonationWindowY = 0
Local $aDonWinOffColors[3][3] = [[0xFFFFFF, 0, 1], [0xFFFFFF, 0, 31], [0xABABA8, 0, 32]]
Local $aDonationWindow = _MultiPixelSearch(409, 0, 410, $g_iDEFAULT_HEIGHT, 1, 1, Hex(0xFFFFFF, 6), $aDonWinOffColors, 10)

If IsArray($aDonationWindow) Then
$g_iDonationWindowY = $aDonationWindow[1]
_Sleep(250)
SetLog("$DonationWindowY: " & $g_iDonationWindowY, $COLOR_DEBUG)
Else
SetLog("Could not find the Donate Window :(", $COLOR_ERROR)
Return False
EndIf
SetLog("Detecting Troops...")
DetectSlotTroop($eIceG)
SetLog("Detecting Sieges...")
DetectSlotSiege($eSiegeStoneSlammer)
SetLog("Detecting Spells...")
DetectSlotSpell($eBtSpell)
PrepareDonateCC()
$g_iCurrentSpells = 11
$g_aiCurrentSiegeMachines[$eSiegeWallWrecker] = 1
$g_aiCurrentSiegeMachines[$eSiegeBattleBlimp] = 1
$g_aiCurrentSiegeMachines[$eSiegeStoneSlammer] = 1
DonateCC()
SetLog(_PadStringCenter(" Test DonateCC end ", 54, "="), $COLOR_INFO)
ShellExecute($g_sProfileTempDebugPath & "donateCC_")

$g_bDebugOcr = $currentOCR
$g_bRunState = $currentRunState
$g_bDebugSetlog = $currentSetlog
EndFunc ;==>btnTestDonateCC
Expand Down Expand Up @@ -566,14 +547,12 @@ Func btnTestAttackBar()

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

Local $aAttackBar = StringSplit(AttackBarCheck(False, $DB, True), "|", $STR_NOCOUNT)
Local $aTroop
Local $avAttackBar = AttackBarCheck(False, $DB, True)

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) = 4 Then SetLog("- Slot " & $aTroop[1] & ": " & $aTroop[2] & " " & GetTroopName($aTroop[0], $aTroop[2]), $COLOR_SUCCESS)
If IsArray($avAttackBar) And UBound($avAttackBar, 1) >= 1 Then
SetLog("Found " & UBound($avAttackBar, 1) & " Slots", $COlOR_SUCCESS)
For $i = 0 To UBound($avAttackBar, 1) - 1
SetLog("- Slot " & $avAttackBar[$i][1] & ": " & $avAttackBar[$i][2] & " " & GetTroopName($avAttackBar[$i][0], $avAttackBar[$i][2]) & " (X: " & $avAttackBar[$i][3] & "|Y: " & $avAttackBar[$i][4] & "|OCR X: " & $avAttackBar[$i][5] & "|OCR Y: " & $avAttackBar[$i][6] & ")", $COLOR_SUCCESS)
Next
EndIf
SetLog(_PadStringCenter(" End AttackBar Detection ", 54, "="), $COlOR_INFO)
Expand Down Expand Up @@ -771,7 +750,13 @@ Func btnTestAttackCSV()

$g_iMatchMode = $DB ; define which script to use

SearchZoomOut($aCenterEnemyVillageClickDrag, True, "btnTestAttackCSV")
; reset village measures
setVillageOffset(0, 0, 1)
ConvertInternalExternArea()
;SearchZoomOut($aCenterEnemyVillageClickDrag, True, "btnTestAttackCSV")
If CheckZoomOut("btnTestAttackCSV", True, False) = False Then
SetLog("CheckZoomOut failed", $COLOR_INFO)
EndIf
ResetTHsearch()
SetLog("Testing FindTownhall()", $COLOR_INFO)
SetLog("FindTownhall() = " & FindTownhall(True), $COLOR_INFO)
Expand Down Expand Up @@ -809,7 +794,13 @@ Func btnTestGetLocationBuilding()
$g_bDebugBuildingPos = True
$g_bDebugSetlog = True

SearchZoomOut($aCenterEnemyVillageClickDrag, True, "btnTestAttackCSV")
; reset village measures
setVillageOffset(0, 0, 1)
ConvertInternalExternArea()
;SearchZoomOut($aCenterEnemyVillageClickDrag, True, "btnTestAttackCSV")
If CheckZoomOut("btnTestGetLocationBuilding", True, False) = False Then
SetLog("CheckZoomOut failed", $COLOR_INFO)
EndIf
ResetTHsearch()
SetLog("Testing FindTownhall()", $COLOR_INFO)
SetLog("FindTownhall() = " & FindTownhall(True), $COLOR_INFO)
Expand All @@ -827,6 +818,7 @@ Func btnTestGetLocationBuilding()

_LogObjList($g_oBldgAttackInfo) ; log dictionary contents
btnTestGetLocationBuildingImage() ; create image of locations
;AttackCSVDEBUGIMAGE()

Local $string, $iFindBldgTotalTestTime
Local $iKeys = $g_oBldgAttackInfo.Keys
Expand Down Expand Up @@ -1095,7 +1087,12 @@ Func btnTestWeakBase()
Local $currentRunState = $g_bRunState
$g_bRunState = True
BeginImageTest()
IsWeakBase()
FindTownhall(True)
If ($g_iSearchTH <> "-") Then
IsWeakBase($g_iImglocTHLevel, $g_sImglocRedline, False)
Else
IsWeakBase($g_iMaxTHLevel, "", False)
EndIf
EndImageTest()
$g_bRunState = $currentRunState
EndFunc ;==>btnTestWeakBase
Expand Down
4 changes: 2 additions & 2 deletions COCBot/GUI/MBR GUI Control Bottom.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: GkevinOD (2014)
; Modified ......: Hervidero (2015), KnowJack(July 2015), CodeSlinger69 (2017)
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down Expand Up @@ -44,7 +44,7 @@ Func Initiate()

$g_bFirstStart = True
$g_bInitiateSwitchAcc = True
$g_iFirstTimeLab = 0
$g_sLabUpgradeTime = ""

;~ If $g_bNotifyDeleteAllPushesOnStart Then _DeletePush()

Expand Down
4 changes: 2 additions & 2 deletions COCBot/GUI/MBR GUI Control Child Army.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: GkevinOD (2014)
; Modified ......: Hervidero (2015), Boju (11-2016), MR.ViPER (11-2016), CodeSlinger69 (2017)
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down Expand Up @@ -122,7 +122,7 @@ Func lblTotalCountTroop2()
Local $TotalTotalTimeTroop = 0
Local $NbrOfBarrack = 4 ;For the moment fix to 4 until fine detect level of each Barrack
Local $NbrOfDarkBarrack = 2 ;For the moment fix to 2 until fine detect level of each Barrack
For $i = $eTroopBarbarian To $eTroopIceGolem
For $i = $eTroopBarbarian To $eTroopElectroDragon
Local $NbrOfTroop = GUICtrlRead($g_ahTxtTrainArmyTroopCount[$i])
Local $LevOfTroop = $g_aiTrainArmyTroopLevel[$i]

Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control Child Attack.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: GkevinOD (2014)
; Modified ......: Hervidero (2015), CodeSlinger69 (2017)
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control Child Misc.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: MyBot.run team
; Modified ......:
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control Child Upgrade.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: MyBot.run team
; Modified ......: CodeSlinger69 (2017)
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control Collectors.au3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; Return values .: None
; Author ........: zengzeng
; Modified ......: CodeSlinger69 (2017)
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2018
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2019
; MyBot is distributed under the terms of the GNU GPL
; Related .......:
; Link ..........: https://github.com/MyBotRun/MyBot/wiki
Expand Down
Loading

0 comments on commit 88ab2bf

Please sign in to comment.