Skip to content

Commit

Permalink
* v7.9.8
Browse files Browse the repository at this point in the history
* Super Dragon support ( Sdrag ) added
* Flame Flinger siege machine support ( FlameF ) added
* Updated hero upgrade costs
* Updated wall upgrade costs
* Add FlameFlinger and SuperDragon @xbebenk
* Improve handling of frozen game during ReturnHome
* Improve handling network connection lost
* Disable shared_prefs resetting snow (thanks @Famine098)
* Fix SCID switching with less than 4 accounts
* Fix for "blue sale prices" on siege machines.
* New TH10 image (thanks @grumphog)
* Worked on lab to get FlameF working.  Fixed latent 2nd row bug.
* Fix price to upgrade level 10 walls to 11.
* Zoom-out temp fix due to update May 2022 by Grumpyhog
* Improved TH8 detection reported by Priapus
* Added Clan Capital Collect, Forge and Auto upgrade by xbebenk + small fixes for CollectCCGold+Forge
* Fix Trader MAY22 Update
  • Loading branch information
TFKNazGul committed May 30, 2022
1 parent 3cab62a commit be73537
Show file tree
Hide file tree
Showing 144 changed files with 1,840 additions and 477 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
* v7.9.8
* May 22 Update
* Added support for Sdrag and FlameF
* Added Clan Capital
* Fix SCID switching with less than 4 accounts
* Fixed FreeTrader MAY22 update
* Fixed Zoomout MAY22 update

* **v.7.9.7**
* Fix boost SuporTroops for slower VPS reported by @Wazzock1972
* Fix ClanGames get information by @xbebenk
Expand Down
4 changes: 2 additions & 2 deletions COCBot/GUI/MBR GUI Control Attack Scripted.au3
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ EndFunc ;==>DuplicateScriptAB

Func ApplyScriptDB()
Local $iApply = 0
Local $aiCSVTroops[$eTroopCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Local $aiCSVTroops[$eTroopCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Local $aiCSVSpells[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Local $aiCSVHeros[$eHeroCount][2] = [[0, 0], [0, 0], [0, 0], [0, 0]]
Local $iCSVRedlineRoutineItem = 0, $iCSVDroplineEdgeItem = 0
Expand Down Expand Up @@ -376,7 +376,7 @@ EndFunc ;==>ApplyScriptDB

Func ApplyScriptAB()
Local $iApply = 0
Local $aiCSVTroops[$eTroopCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Local $aiCSVTroops[$eTroopCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Local $aiCSVSpells[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Local $aiCSVHeros[$eHeroCount][2] = [[0, 0], [0, 0], [0, 0], [0, 0]]
Local $iCSVRedlineRoutineItem = 0, $iCSVDroplineEdgeItem = 0
Expand Down
105 changes: 105 additions & 0 deletions COCBot/GUI/MBR GUI Control BOT Options.au3
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ Func btnTestClickDrag()
EndFunc ;==>btnTestClickDrag

Func btnTestImage()
_GUICtrlTab_ClickTab($g_hTabMain, 0)

Local $sImageFile = BeginImageTest() ; get image for testing
If $sImageFile = False Then $sImageFile = "Live Screenshot"
Expand Down Expand Up @@ -598,6 +599,9 @@ Func btnTestImage()
EndFunc ;==>btnTestImage

Func btnTestVillageSize()
SetLog("Test Village Size")

_GUICtrlTab_ClickTab($g_hTabMain, 0)

BeginImageTest()
Local $currentRunState = $g_bRunState
Expand All @@ -623,6 +627,23 @@ Func btnTestVillageSize()
SetLog("Village offset y: " & $village[3])
SetLog("Village stone " & $village[6] & ": " & $village[4] & ", " & $village[5])
SetLog("Village tree " & $village[9] & ": " & $village[7] & ", " & $village[8])

If $village[4] > 0 And $village[5] > 0 And $village[7] > 0 And $village[8] > 0 And $i < 1 Then
; 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

ConvertInternalExternArea()

SaveVillageDebugImage()
EndIf



EndIf
Next
EndImageTest()
Expand Down Expand Up @@ -1134,3 +1155,87 @@ Func SQLiteExport()
Setlog("Export successfully completed.", $COLOR_SUCCESS)

EndFunc ;==>SQLiteExport

Func SaveVillageDebugImage()

Local $EditedImage = _GDIPlus_BitmapCreateFromHBITMAP($g_hHBitmap2)
Local $testx
Local $hGraphic = _GDIPlus_ImageGetGraphicsContext($EditedImage)
Local $hBrush = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
Local $pixel

; Open box of crayons :-)
Local $hPenLtGreen = _GDIPlus_PenCreate(0xFF00DC00, 2)
Local $hPenDkGreen = _GDIPlus_PenCreate(0xFF006E00, 2)
Local $hPenMdGreen = _GDIPlus_PenCreate(0xFF4CFF00, 2)
Local $hPenRed = _GDIPlus_PenCreate(0xFFFF0000, 2)
Local $hPenDkRed = _GDIPlus_PenCreate(0xFF6A0000, 2)
Local $hPenNavyBlue = _GDIPlus_PenCreate(0xFF000066, 2)
Local $hPenBlue = _GDIPlus_PenCreate(0xFF0000CC, 2)
Local $hPenSteelBlue = _GDIPlus_PenCreate(0xFF0066CC, 2)
Local $hPenLtBlue = _GDIPlus_PenCreate(0xFF0080FF, 2)
Local $hPenPaleBlue = _GDIPlus_PenCreate(0xFF66B2FF, 2)
Local $hPenCyan = _GDIPlus_PenCreate(0xFF00FFFF, 2)
Local $hPenYellow = _GDIPlus_PenCreate(0xFFFFD800, 2)
Local $hPenLtGrey = _GDIPlus_PenCreate(0xFFCCCCCC, 2)
Local $hPenWhite = _GDIPlus_PenCreate(0xFFFFFFFF, 2)
Local $hPenMagenta = _GDIPlus_PenCreate(0xFFFF00F6, 2)


;-- DRAW EXTERNAL PERIMETER LINES
_GDIPlus_GraphicsDrawLine($hGraphic, $ExternalArea[0][0], $ExternalArea[0][1], $ExternalArea[2][0], $ExternalArea[2][1], $hPenLtGreen)
_GDIPlus_GraphicsDrawLine($hGraphic, $ExternalArea[0][0], $ExternalArea[0][1], $ExternalArea[3][0], $ExternalArea[3][1], $hPenLtGreen)
_GDIPlus_GraphicsDrawLine($hGraphic, $ExternalArea[1][0], $ExternalArea[1][1], $ExternalArea[2][0], $ExternalArea[2][1], $hPenLtGreen)
_GDIPlus_GraphicsDrawLine($hGraphic, $ExternalArea[1][0], $ExternalArea[1][1], $ExternalArea[3][0], $ExternalArea[3][1], $hPenLtGreen)

SetLog($ExternalArea[0][0] & $ExternalArea[0][1] & $ExternalArea[2][0] & $ExternalArea[2][1])

;-- DRAW EXTERNAL PERIMETER LINES
_GDIPlus_GraphicsDrawLine($hGraphic, $InternalArea[0][0], $InternalArea[0][1], $InternalArea[2][0], $InternalArea[2][1], $hPenDkGreen)
_GDIPlus_GraphicsDrawLine($hGraphic, $InternalArea[0][0], $InternalArea[0][1], $InternalArea[3][0], $InternalArea[3][1], $hPenDkGreen)
_GDIPlus_GraphicsDrawLine($hGraphic, $InternalArea[1][0], $InternalArea[1][1], $InternalArea[2][0], $InternalArea[2][1], $hPenDkGreen)
_GDIPlus_GraphicsDrawLine($hGraphic, $InternalArea[1][0], $InternalArea[1][1], $InternalArea[3][0], $InternalArea[3][1], $hPenDkGreen)

;-- DRAW VERTICAL AND ORIZONTAL LINES
_GDIPlus_GraphicsDrawLine($hGraphic, $InternalArea[2][0], 0, $InternalArea[2][0], $g_iDEFAULT_HEIGHT, $hPenDkGreen)
_GDIPlus_GraphicsDrawLine($hGraphic, 0, $InternalArea[0][1], $g_iDEFAULT_WIDTH, $InternalArea[0][1], $hPenDkGreen)

;-- DRAW DIAGONALS LINES
_GDIPlus_GraphicsDrawLine($hGraphic, $ExternalArea[4][0], $ExternalArea[4][1], $ExternalArea[7][0], $ExternalArea[7][1], $hPenLtGreen)
_GDIPlus_GraphicsDrawLine($hGraphic, $ExternalArea[5][0], $ExternalArea[5][1], $ExternalArea[6][0], $ExternalArea[6][1], $hPenLtGreen)

Local $Date = @YEAR & "-" & @MON & "-" & @MDAY
Local $Time = @HOUR & "." & @MIN & "." & @SEC
Local $filename = $g_sProfileTempDebugPath & String("VillageDebug_" & $Date & "_" & $Time) & ".jpg"
_GDIPlus_ImageSaveToFile($EditedImage, $filename)
If @error Then SetLog("Debug Image save error: " & @extended, $COLOR_ERROR)
SetDebugLog("Village image saved: " & $filename)


_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_BitmapDispose($EditedImage)

; Clean up resources
_GDIPlus_PenDispose($hPenLtGreen)
_GDIPlus_PenDispose($hPenDkGreen)
_GDIPlus_PenDispose($hPenMdGreen)
_GDIPlus_PenDispose($hPenRed)
_GDIPlus_PenDispose($hPenDkRed)
_GDIPlus_PenDispose($hPenBlue)
_GDIPlus_PenDispose($hPenNavyBlue)
_GDIPlus_PenDispose($hPenSteelBlue)
_GDIPlus_PenDispose($hPenLtBlue)
_GDIPlus_PenDispose($hPenPaleBlue)
_GDIPlus_PenDispose($hPenCyan)
_GDIPlus_PenDispose($hPenYellow)
_GDIPlus_PenDispose($hPenLtGrey)
_GDIPlus_PenDispose($hPenWhite)
_GDIPlus_PenDispose($hPenMagenta)
_GDIPlus_BrushDispose($hBrush)

; open image
If TestCapture() = True Then
ShellExecute($filename)
EndIf

EndFunc
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control Child Army.au3
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ Func BtnTroopOrderSet()
Local $bMissingTroop = False ; flag for when troops are not assigned by user
Local $aiUsedTroop[$eTroopCount] = [ _
$eTroopBarbarian, $eTroopSuperBarbarian, $eTroopArcher, $eTroopSuperArcher, $eTroopGiant, $eTroopSuperGiant, $eTroopGoblin, $eTroopSneakyGoblin, $eTroopWallBreaker, _
$eTroopSuperWallBreaker, $eTroopBalloon, $eTroopRocketBalloon, $eTroopWizard, $eTroopSuperWizard, $eTroopHealer, $eTroopDragon, $eTroopPekka, $eTroopBabyDragon, $eTroopInfernoDragon, $eTroopMiner, _
$eTroopSuperWallBreaker, $eTroopBalloon, $eTroopRocketBalloon, $eTroopWizard, $eTroopSuperWizard, $eTroopHealer, $eTroopDragon, $eTroopSuperDragon, $eTroopPekka, $eTroopBabyDragon, $eTroopInfernoDragon, $eTroopMiner, _
$eTroopElectroDragon, $eTroopYeti, $eTroopDragonRider, $eTroopMinion, $eTroopSuperMinion, $eTroopHogRider, $eTroopValkyrie, $eTroopSuperValkyrie, $eTroopGolem, $eTroopWitch, $eTroopSuperWitch, _
$eTroopLavaHound, $eTroopIceHound, $eTroopBowler, $eTroopSuperBowler, $eTroopIceGolem, $eTroopHeadhunter]

Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Control Donate.au3
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include-once

Global $g_aiDonIcons[$eTroopCount + 1] = [$eIcnDonBarbarian, $eIcnSuperBarbarian, $eIcnDonArcher, $eIcnSuperArcher, $eIcnDonGiant, $eIcnSuperGiant, $eIcnDonGoblin, $eIcnSneakyGoblin, _
$eIcnDonWallBreaker, $eIcnSuperWallBreaker, $eIcnDonBalloon, $eIcnRocketBalloon, $eIcnDonWizard, $eIcnSuperWizard, $eIcnDonHealer, $eIcnDonDragon, $eIcnDonPekka, $eIcnDonBabyDragon, _
$eIcnDonWallBreaker, $eIcnSuperWallBreaker, $eIcnDonBalloon, $eIcnRocketBalloon, $eIcnDonWizard, $eIcnSuperWizard, $eIcnDonHealer, $eIcnDonDragon, $eIcnSuperDragon, $eIcnDonPekka, $eIcnDonBabyDragon, _
$eIcnInfernoDragon, $eIcnDonMiner, $eIcnElectroDragon, $eIcnYeti, $eIcnDragonRider, $eIcnDonMinion, $eIcnSuperMinion, $eIcnDonHogRider, $eIcnDonValkyrie, $eIcnSuperValkyrie, $eIcnDonGolem, _
$eIcnDonWitch, $eIcnSuperWitch, $eIcnDonLavaHound, $eIcnIceHound, $eIcnDonBowler, $eIcnSuperBowler, $eIcnIceGolem, $eIcnHeadhunter, $eIcnDonBlank]

Expand Down
16 changes: 8 additions & 8 deletions COCBot/GUI/MBR GUI Design Attack.au3
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Func LoadTranslatedDropOrderList()
Global $g_asDropOrderList = ["", _
"Barbarians", "Super Barbarians", "Archers", "Super Archers", "Giants", "Super Giants", "Goblins", "Sneaky Goblins", _
"Wall Breakers", "Super Wall Breakers", "Balloons", "Rocket Balloons", "Wizards", "Super Wizards", "Healers", _
"Dragons", "Pekkas", "Baby Dragons", "Inferno Dragons", "Miners", "Electro Dragons", "Yetis", "Dragon Riders", _
"Dragons", "Super Dragons", "Pekkas", "Baby Dragons", "Inferno Dragons", "Miners", "Electro Dragons", "Yetis", "Dragon Riders", _
"Minions", "Super Minions", "Hog Riders", "Valkyries", "Super Valkyries", "Golems", _
"Witchs", "Super Witchs", "Lava Hounds", "Ice Hounds", "Bowlers", "Super Bowlers", "Ice Golems", "Headhunters", "Clan Castle", "Heroes"]
EndFunc ;==>LoadTranslatedDropOrderList
Expand Down Expand Up @@ -60,12 +60,12 @@ EndFunc ;==>CreateAttackTab

Func CreateDropOrderGUI()

$g_hGUI_DropOrder = _GUICreate(GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "GUI_DropOrder", "Attack Custom Dropping Order"), 525, 480, -1, -1, $WS_BORDER, $WS_EX_CONTROLPARENT)
$g_hGUI_DropOrder = _GUICreate(GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "GUI_DropOrder", "Attack Custom Dropping Order"), 525, 520, -1, -1, $WS_BORDER, $WS_EX_CONTROLPARENT)
SetDefaultDropOrderGroup(False)
LoadTranslatedDropOrderList()

Local $x = 25, $y = 25
GUICtrlCreateGroup(GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Group_03", "Custom Dropping Order"), $x - 20, $y - 20, 511, 377)
GUICtrlCreateGroup(GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Group_03", "Custom Dropping Order"), $x - 20, $y - 20, 511, 397)
$x += 10
$y += 20

Expand All @@ -86,7 +86,7 @@ Func CreateDropOrderGUI()

$y += 5
For $p = 0 To $eDropOrderCount - 1
If $p < 13 Then
If $p < 14 Then
GUICtrlCreateLabel($p + 1 & ":", $x - 19, $y + 3, -1, 18)
$g_ahCmbDropOrder[$p] = GUICtrlCreateCombo("", $x, $y, 120, 18, BitOR($CBS_DROPDOWNLIST + $WS_VSCROLL, $CBS_AUTOHSCROLL))
GUICtrlSetOnEvent(-1, "GUIDropOrder")
Expand All @@ -95,8 +95,8 @@ Func CreateDropOrderGUI()
GUICtrlSetState(-1, $GUI_DISABLE)
$g_ahImgDropOrder[$p] = _GUICtrlCreateIcon($g_sLibIconPath, $eIcnOptions, $x + 122, $y + 1, 18, 18)
$y += 25 ; move down to next combobox location
ElseIf $p < 26 Then
If $p = 13 Then
ElseIf $p < 28 Then
If $p = 14 Then
$x += 150
$y = 49
EndIf
Expand All @@ -109,7 +109,7 @@ Func CreateDropOrderGUI()
$g_ahImgDropOrder[$p] = _GUICtrlCreateIcon($g_sLibIconPath, $eIcnOptions, $x + 132, $y + 1, 18, 18)
$y += 25 ; move down to next combobox location
Else
If $p = 26 Then
If $p = 28 Then
$x += 160
$y = 49
EndIf
Expand All @@ -125,7 +125,7 @@ Func CreateDropOrderGUI()
Next

$x = 125
$y = 390
$y = 410
; Create push button to set training order once completed
$g_hBtnDropOrderSet = GUICtrlCreateButton(GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "BtnDropOrderSet", "Apply New Order"), $x, $y, 100, 25)
GUICtrlSetState(-1, BitOR($GUI_UNCHECKED, $GUI_ENABLE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Func CreateAttackSearchActiveBaseAttack()
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_04", -1) & "|" & _
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_07", -1) & "|" & _
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_08", -1) & "|" & _
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_09", -1) & "|" & _
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_05", -1) & "|" & _
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_06", -1), GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_06", -1))
$sTxtTip = GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Tip", -1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Func CreateAttackSearchDeadBaseAttack()
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_04", "Stone Slammer") & "|" & _
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_07", "Siege Barracks") & "|" & _
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_08", "Log Launcher") & "|" & _
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_09", "Flame Flinger") & "|" & _
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_05", "Any Siege") & "|" & _
GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_06", "Default"), GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Item_06", -1))
$sTxtTip = GetTranslatedFileIni("MBR GUI Design Child Attack - Attack", "Cmb-Siege_Tip", "Select Castle or Siege to be used." & @CRLF & _
Expand Down
Loading

0 comments on commit be73537

Please sign in to comment.