Skip to content

Commit

Permalink
* v8.0.1 **
Browse files Browse the repository at this point in the history
* Design. New GUI Icons.
* Builder Base & Clan Capital Resources always in Number Format.
* SkipWall-Upgrade Summary -> SetDebugLog.
* Fix Wall Cost.
* Added Star Lab Check Routine.
* Added Third Page to Multi-Stats : BuilderBase + Clan Capital Stats.
* Added Recalculate Star Lab Upgrade Time when Clock Tower Boost (Depending CT level).
* Added $g_iMinDark4PetUpgrade in Account variables.
* Tips in Auto Upgrade Gui.
* Fixed Super Troops Donation.
* Fix Donate Barb/Suba if on second Row.
* Added Ignore Clan Capital Upgrades not started.
* Update Weak Base Gui & images.
* Added Mine & collector lvl 15 , DE Drill lvl9, Gold & Elixir Storages.
* Added New possibilities in CSV/Apply settings : Train Sieges & Warden Mode.
* Fixed Super DragonS plural name variable, prevented saving the specific donation text.
* Super Dragon detection improvement (Train & Queue).
* Upgrade Wall From level 4 with Elixir.
* Added missing connector in default trophy priority hero drop list.
* Improve Flame Flinger detection in AttackBar.
* Electro Titan detection improvement in queued troops.
* Improve Troops Upgrade Time OCR in Lab When > 10 days.
* New image for Clan Castle in Attack Bar (Confused with Drag Rider).
* Fixed Slot Order Enum in BB Attack Bar.
* Added discount perks for pets upgrade cost.
* Increase tolerance for army train button color variation.
* Increase Lab upgrade time detection length zone.
* Fixed Spells & Sieges Display in Gui depending TH level.
* Use Barbarian Head for SCID slot detection
* Added CloseWindow to close a window replacing ClickAway
* Added upper bound to Spell level OCR
* Updated SmartZap Drill Levels reported @PriapusCranium
* Added CloseWindow To Pet House And Star Lab.
* Added 9 White to coc-uptime2.
* Increase Labs upgrade time (2) detection length zone.
* Fixed Train Troop page.
* Fixed AttackBar with 11 slots.
* Improve Flame Flinger detection when switch is needed.
  • Loading branch information
GrumpyHog committed Nov 21, 2022
1 parent 967ac50 commit c5f860e
Show file tree
Hide file tree
Showing 150 changed files with 1,047 additions and 426 deletions.
40 changes: 40 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
* v8.0.1 **
* Design. New GUI Icons.
* Builder Base & Clan Capital Resources always in Number Format.
* SkipWall-Upgrade Summary -> SetDebugLog.
* Fix Wall Cost.
* Added Star Lab Check Routine.
* Added Third Page to Multi-Stats : BuilderBase + Clan Capital Stats.
* Added Recalculate Star Lab Upgrade Time when Clock Tower Boost (Depending CT level).
* Added $g_iMinDark4PetUpgrade in Account variables.
* Tips in Auto Upgrade Gui.
* Fixed Super Troops Donation.
* Fix Donate Barb/Suba if on second Row.
* Added Ignore Clan Capital Upgrades not started.
* Update Weak Base Gui & images.
* Added Mine & collector lvl 15 , DE Drill lvl9, Gold & Elixir Storages.
* Added New possibilities in CSV/Apply settings : Train Sieges & Warden Mode.
* Fixed Super DragonS plural name variable, prevented saving the specific donation text.
* Super Dragon detection improvement (Train & Queue).
* Upgrade Wall From level 4 with Elixir.
* Added missing connector in default trophy priority hero drop list.
* Improve Flame Flinger detection in AttackBar.
* Electro Titan detection improvement in queued troops.
* Improve Troops Upgrade Time OCR in Lab When > 10 days.
* New image for Clan Castle in Attack Bar (Confused with Drag Rider).
* Fixed Slot Order Enum in BB Attack Bar.
* Added discount perks for pets upgrade cost.
* Increase tolerance for army train button color variation.
* Increase Lab upgrade time detection length zone.
* Fixed Spells & Sieges Display in Gui depending TH level.
* Use Barbarian Head for SCID slot detection
* Added CloseWindow to close a window replacing ClickAway
* Added upper bound to Spell level OCR
* Updated SmartZap Drill Levels reported @PriapusCranium
* Added CloseWindow To Pet House And Star Lab.
* Added 9 White to coc-uptime2.
* Increase Labs upgrade time (2) detection length zone.
* Fixed Train Troop page.
* Fixed AttackBar with 11 slots.
* Improve Flame Flinger detection when switch is needed.

* v8.0.0 **
* fixed SCID switch account missing slot image.
* fixed Builder Base auto upgrade.
Expand Down
70 changes: 54 additions & 16 deletions COCBot/GUI/MBR GUI Control Attack Scripted.au3
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,19 @@ EndFunc ;==>DuplicateScriptAB

Func ApplyScriptDB()
Local $iApply = 0
Local $iApplySieges = 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, 0, 0]
Local $aiCSVSpells[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Local $aiCSVSieges[$eSiegeMachineCount] = [0, 0, 0, 0, 0, 0, 0]
Local $aiCSVHeros[$eHeroCount][2] = [[0, 0], [0, 0], [0, 0], [0, 0]]
Local $aiCSVWardenMode = -1
Local $iCSVRedlineRoutineItem = 0, $iCSVDroplineEdgeItem = 0
Local $sCSVCCReq = ""
Local $aTemp = _GUICtrlComboBox_GetListArray($g_hCmbScriptNameDB)
Local $sFilename = $aTemp[_GUICtrlComboBox_GetCurSel($g_hCmbScriptNameDB) + 1]

SetLog("CSV settings apply starts: " & $sFilename, $COLOR_INFO)
$iApply = ParseAttackCSV_Settings_variables($aiCSVTroops, $aiCSVSpells, $aiCSVHeros, $iCSVRedlineRoutineItem, $iCSVDroplineEdgeItem, $sCSVCCReq, $sFilename)
$iApply = ParseAttackCSV_Settings_variables($aiCSVTroops, $aiCSVSpells, $aiCSVSieges, $aiCSVHeros, $aiCSVWardenMode, $iCSVRedlineRoutineItem, $iCSVDroplineEdgeItem, $sCSVCCReq, $sFilename)
If Not $iApply Then
SetLog("CSV settings apply failed", $COLOR_ERROR)
Return
Expand All @@ -288,20 +291,28 @@ Func ApplyScriptDB()
For $i = 0 To UBound($aiCSVSpells) - 1
If $aiCSVSpells[$i] > 0 Then $iApply += 1
Next
For $i = 0 To UBound($aiCSVSieges) - 1
If $aiCSVSieges[$i] > 0 Then $iApply += 1
If $aiCSVSieges[$i] > 0 Then $iApplySieges += 1
Next
If $iApply > 0 Then
For $t = 0 To UBound($aiCSVTroops) - 1 ; set troops to level 1 if none on GUI
If $aiCSVTroops[$t] > 0 And $g_aiTrainArmyTroopLevel[$t] = 0 Then $g_aiTrainArmyTroopLevel[$t] = 1
Next
$g_aiArmyCustomTroops = $aiCSVTroops
For $s = 0 To UBound($aiCSVSpells) - 1 ; set spells to level 1 if none on GUI
If $aiCSVSpells[$s] > 0 And $g_aiTrainArmySpellLevel[$s] = 0 Then $g_aiTrainArmySpellLevel[$s] = 1
Next
$g_aiArmyCustomSpells = $aiCSVSpells
$g_aiArmyCompSiegeMachines = $aiCSVSieges
ApplyConfig_600_52_2("Read")
SetComboTroopComp() ; GUI refresh
lblTotalCountSpell2()
lblTotalCountSiege2()
SetLog("CSV Train settings applied", $COLOR_SUCCESS)
EndIf

If IsArray($aiCSVSieges) And $iApplySieges > 0 Then
Local $aMachine = _ArrayMaxIndex($aiCSVSieges, 0, 1)
_GUICtrlComboBox_SetCurSel($g_hCmbDBSiege, $aMachine + 1)
GUICtrlSetState($g_hChkDBDropCC, $GUI_CHECKED)
GUICtrlSetState($g_hCmbDBSiege, $GUI_ENABLE)
SetLog("CSV 'Sieges' settings applied", $COLOR_SUCCESS)
EndIf

$iApply = 0
For $i = 0 To UBound($aiCSVHeros) - 1
Expand Down Expand Up @@ -332,10 +343,18 @@ Func ApplyScriptDB()
GUICtrlSetState($g_hChkDBKingAttack, $aiCSVHeros[$eHeroBarbarianKing][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkDBKingAttack))
GUICtrlSetState($g_hChkDBQueenAttack, $aiCSVHeros[$eHeroArcherQueen][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkDBQueenAttack))
GUICtrlSetState($g_hChkDBWardenAttack, $aiCSVHeros[$eHeroGrandWarden][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkDBWardenAttack))
chkDBWardenAttack()
GUICtrlSetState($g_hChkDBChampionAttack, $aiCSVHeros[$eHeroRoyalChampion][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkDBChampionAttack))
SetLog("CSV 'Attack with' Hero settings applied", $COLOR_SUCCESS)
EndIf


If $aiCSVWardenMode >= 0 And $aiCSVWardenMode < 3 Then; 0 = Ground / 1 = Air / 2 = Default
_GUICtrlComboBox_SetCurSel($g_hCmbDBWardenMode, $aiCSVWardenMode)
SetLog("CSV 'Warden Mode' settings applied", $COLOR_SUCCESS)
Else
If $aiCSVWardenMode <> -1 Then SetLog("CSV 'Warden Mode' settings out of bounds", $COLOR_ERROR)
EndIf

If $sCSVCCReq <> "" Then
GUICtrlSetState($g_hChkDBDropCC, $GUI_CHECKED)
SetLog("CSV 'Attack with' CC settings applied", $COLOR_SUCCESS)
Expand Down Expand Up @@ -376,16 +395,19 @@ EndFunc ;==>ApplyScriptDB

Func ApplyScriptAB()
Local $iApply = 0
Local $iApplySieges = 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, 0, 0]
Local $aiCSVSpells[$eSpellCount] = [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, 0 ,0]
Local $aiCSVSieges[$eSiegeMachineCount] = [0, 0, 0, 0, 0, 0, 0]
Local $aiCSVHeros[$eHeroCount][2] = [[0, 0], [0, 0], [0, 0], [0, 0]]
Local $aiCSVWardenMode = -1
Local $iCSVRedlineRoutineItem = 0, $iCSVDroplineEdgeItem = 0
Local $sCSVCCReq = ""
Local $aTemp = _GUICtrlComboBox_GetListArray($g_hCmbScriptNameAB)
Local $sFilename = $aTemp[_GUICtrlComboBox_GetCurSel($g_hCmbScriptNameAB) + 1]

SetLog("CSV settings apply starts: " & $sFilename, $COLOR_INFO)
$iApply = ParseAttackCSV_Settings_variables($aiCSVTroops, $aiCSVSpells, $aiCSVHeros, $iCSVRedlineRoutineItem, $iCSVDroplineEdgeItem, $sCSVCCReq, $sFilename)
$iApply = ParseAttackCSV_Settings_variables($aiCSVTroops, $aiCSVSpells, $aiCSVSieges, $aiCSVHeros, $aiCSVWardenMode, $iCSVRedlineRoutineItem, $iCSVDroplineEdgeItem, $sCSVCCReq, $sFilename)
If Not $iApply Then
SetLog("CSV settings apply failed", $COLOR_ERROR)
Return
Expand All @@ -398,20 +420,28 @@ Func ApplyScriptAB()
For $i = 0 To UBound($aiCSVSpells) - 1
If $aiCSVSpells[$i] > 0 Then $iApply += 1
Next
For $i = 0 To UBound($aiCSVSieges) - 1
If $aiCSVSieges[$i] > 0 Then $iApply += 1
If $aiCSVSieges[$i] > 0 Then $iApplySieges += 1
Next
If $iApply > 0 Then
For $t = 0 To UBound($aiCSVTroops) - 1 ; set troops to level 1 if none on GUI
If $aiCSVTroops[$t] > 0 And $g_aiTrainArmyTroopLevel[$t] = 0 Then $g_aiTrainArmyTroopLevel[$t] = 1
Next
$g_aiArmyCustomTroops = $aiCSVTroops
For $s = 0 To UBound($aiCSVSpells) - 1 ; set spells to level 1 if none on GUI
If $aiCSVSpells[$s] > 0 And $g_aiTrainArmySpellLevel[$s] = 0 Then $g_aiTrainArmySpellLevel[$s] = 1
Next
$g_aiArmyCustomSpells = $aiCSVSpells
$g_aiArmyCompSiegeMachines = $aiCSVSieges
ApplyConfig_600_52_2("Read")
SetComboTroopComp() ; GUI refresh
lblTotalCountSpell2()
lblTotalCountSiege2()
SetLog("CSV Train settings applied", $COLOR_SUCCESS)
EndIf

If IsArray($aiCSVSieges) And $iApplySieges > 0 Then
Local $aMachine = _ArrayMaxIndex($aiCSVSieges, 0, 1)
_GUICtrlComboBox_SetCurSel($g_hCmbABSiege, $aMachine + 1)
GUICtrlSetState($g_hChkABDropCC, $GUI_CHECKED)
GUICtrlSetState($g_hCmbABSiege, $GUI_ENABLE)
SetLog("CSV 'Sieges' settings applied", $COLOR_SUCCESS)
EndIf

$iApply = 0
For $i = 0 To UBound($aiCSVHeros) - 1
Expand Down Expand Up @@ -442,9 +472,17 @@ Func ApplyScriptAB()
GUICtrlSetState($g_hChkABKingAttack, $aiCSVHeros[$eHeroBarbarianKing][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkABKingAttack))
GUICtrlSetState($g_hChkABQueenAttack, $aiCSVHeros[$eHeroArcherQueen][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkABQueenAttack))
GUICtrlSetState($g_hChkABWardenAttack, $aiCSVHeros[$eHeroGrandWarden][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkABWardenAttack))
chkABWardenAttack()
GUICtrlSetState($g_hChkABChampionAttack, $aiCSVHeros[$eHeroRoyalChampion][0] > 0 ? $GUI_CHECKED : GUICtrlGetState($g_hChkABChampionAttack))
SetLog("CSV 'Attack with' Hero settings applied", $COLOR_SUCCESS)
EndIf

If $aiCSVWardenMode >= 0 And $aiCSVWardenMode < 3 Then; 0 = Ground / 1 = Air / 2 = Default
_GUICtrlComboBox_SetCurSel($g_hCmbABWardenMode, $aiCSVWardenMode)
SetLog("CSV 'Warden Mode' settings applied", $COLOR_SUCCESS)
Else
If $aiCSVWardenMode <> -1 Then SetLog("CSV 'Warden Mode' settings out of bounds", $COLOR_ERROR)
EndIf

If $sCSVCCReq <> "" Then
GUICtrlSetState($g_hChkABDropCC, $GUI_CHECKED)
Expand Down
36 changes: 8 additions & 28 deletions COCBot/GUI/MBR GUI Control Child Army.au3
Original file line number Diff line number Diff line change
Expand Up @@ -241,23 +241,18 @@ Func lblTotalCountSiege()
_GUI_Value_STATE("ENABLE", $groupSiegeBarracks)
_GUI_Value_STATE("ENABLE", $groupLogLauncher)
Else
For $i = $eSiegeBarracks To $eSiegeBattleDrill
GUICtrlSetData($g_ahTxtTrainArmySiegeCount[$i], 0)
Next
GUICtrlSetData($g_ahTxtTrainArmySiegeCount[$eSiegeFlameFlinger], 0)
GUICtrlSetData($g_ahTxtTrainArmySiegeCount[$eSiegeBattleDrill], 0)
EndIf

If $g_iTownHallLevel > 13 Or $g_iTownHallLevel = 0 Then
_GUI_Value_STATE("ENABLE", $groupFlameFlinger)
Else
For $i = $eSiegeFlameFlinger To $eSiegeBattleDrill
GUICtrlSetData($g_ahTxtTrainArmySiegeCount[$i], 0)
Next
GUICtrlSetData($g_ahTxtTrainArmySiegeCount[$eSiegeBattleDrill], 0)
EndIf

If $g_iTownHallLevel > 14 Or $g_iTownHallLevel = 0 Then
_GUI_Value_STATE("ENABLE", $groupBattleDrill)
Else
GUICtrlSetData($g_ahTxtTrainArmySiegeCount[$eSiegeBattleDrill], 0)
EndIf

For $i = 0 To $eSiegeMachineCount - 1
Expand All @@ -284,15 +279,15 @@ Func TotalSpellCountClick()
If $g_iTownHallLevel > 5 Or $g_iTownHallLevel = 0 Then
_GUI_Value_STATE("ENABLE", $groupHeal)
Else
For $i = $eSpellHeal To $eSpellBat
For $i = $eSpellRage To $eSpellBat
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$i], 0)
Next
EndIf

If $g_iTownHallLevel > 6 Or $g_iTownHallLevel = 0 Then
_GUI_Value_STATE("ENABLE", $groupRage)
Else
For $i = $eSpellRage To $eSpellBat
For $i = $eSpellJump To $eSpellBat
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$i], 0)
Next
EndIf
Expand All @@ -301,8 +296,6 @@ Func TotalSpellCountClick()
_GUI_Value_STATE("ENABLE", $groupPoison)
_GUI_Value_STATE("ENABLE", $groupEarthquake)
Else
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellPoison], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellEarthquake], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellJump], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellFreeze], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellClone], 0)
Expand All @@ -319,10 +312,6 @@ Func TotalSpellCountClick()
_GUI_Value_STATE("ENABLE", $groupHaste)
_GUI_Value_STATE("ENABLE", $groupSkeleton)
Else
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellJump], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellFreeze], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellHaste], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellSkeleton], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellClone], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellBat], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellInvisibility], 0)
Expand All @@ -333,28 +322,19 @@ Func TotalSpellCountClick()
_GUI_Value_STATE("ENABLE", $groupClone)
_GUI_Value_STATE("ENABLE", $groupBat)
Else
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellClone], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellBat], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellInvisibility], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellRecall], 0)
EndIf

If $g_iTownHallLevel > 10 Or $g_iTownHallLevel = 0 Then
_GUI_Value_STATE("ENABLE", $groupInvisibility)
Else
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellInvisibility], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellRecall], 0)
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellRecall], 0)
EndIf

If $g_iTownHallLevel > 12 Or $g_iTownHallLevel = 0 Then
_GUI_Value_STATE("ENABLE", $groupRecall)
Else
GUICtrlSetData($g_ahTxtTrainArmySpellCount[$eSpellRecall], 0)
EndIf

For $i = 0 To $eSpellCount - 1
GUICtrlSetData($g_aiArmyCustomSpells[$i], GUICtrlRead($g_ahTxtTrainArmySpellCount[$i]))
Next

lblTotalCountSpell2()
SetRedrawBotWindow($bWasRedraw, Default, Default, Default, "TotalSpellCountClick")
Expand Down
40 changes: 14 additions & 26 deletions COCBot/GUI/MBR GUI Control Child Upgrade.au3
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ Func chkUpgradePets()
EndIf
Next
For $i = $ePetCount - 4 To $ePetCount - 1
GUICtrlSetState($g_hChkUpgradePets[$i], BitOR($GUI_DISABLE, $GUI_UNCHECKED))
GUICtrlSetState($g_hChkUpgradePets[$i], $GUI_DISABLE + $GUI_UNCHECKED)
$g_bUpgradePetsEnable[$i] = False
SetDebugLog("Upgrade: " & $g_asPetNames[$i] & " disabled")
Next
Expand All @@ -490,7 +490,7 @@ Func chkUpgradePets()
Next
Else
For $i = 0 to $ePetCount - 1
GUICtrlSetState($g_hChkUpgradePets[$i], BitOR($GUI_DISABLE, $GUI_UNCHECKED))
GUICtrlSetState($g_hChkUpgradePets[$i], $GUI_DISABLE + $GUI_UNCHECKED)
$g_bUpgradePetsEnable[$i] = False
Next
EndIf
Expand Down Expand Up @@ -523,14 +523,11 @@ Func chkWalls()
If GUICtrlRead($g_hChkWalls) = $GUI_CHECKED Then
$g_bAutoUpgradeWallsEnable = True
GUICtrlSetState($g_hRdoUseGold, $GUI_ENABLE)
; GUICtrlSetState($sldMaxNbWall, $GUI_ENABLE)
;GUICtrlSetState($sldToleranceWall, $GUI_ENABLE)
;GUICtrlSetState($g_hBtnFindWalls, $GUI_ENABLE)
; GUICtrlSetState($g_hRdoUseElixir, $GUI_ENABLE)
; GUICtrlSetState($g_hRdoUseElixirGold, $GUI_ENABLE)
GUICtrlSetState($g_hRdoUseElixir, $GUI_ENABLE)
GUICtrlSetState($g_hRdoUseElixirGold, $GUI_ENABLE)
GUICtrlSetState($g_hCmbWalls, $GUI_ENABLE)
GUICtrlSetState($g_hTxtWallMinGold, $GUI_ENABLE)
; GUICtrlSetState($g_hTxtWallMinElixir, $GUI_ENABLE)
GUICtrlSetState($g_hTxtWallMinElixir, $GUI_ENABLE)
cmbWalls()
Else
$g_bAutoUpgradeWallsEnable = False
Expand All @@ -540,10 +537,6 @@ Func chkWalls()
GUICtrlSetState($g_hCmbWalls, $GUI_DISABLE)
GUICtrlSetState($g_hTxtWallMinGold, $GUI_DISABLE)
GUICtrlSetState($g_hTxtWallMinElixir, $GUI_DISABLE)
; GUICtrlSetState($sldMaxNbWall, $GUI_DISABLE)
;GUICtrlSetState($sldToleranceWall, $GUI_DISABLE)
;GUICtrlSetState($g_hBtnFindWalls, $GUI_DISABLE)

EndIf
EndFunc ;==>chkWalls

Expand All @@ -556,20 +549,15 @@ Func cmbWalls()
$g_iWallCost = $g_aiWallCost[$g_iCmbUpgradeWallsLevel]
GUICtrlSetData($g_hLblWallCost, _NumberFormat($g_iWallCost))

For $i = 4 To $g_iCmbUpgradeWallsLevel+5
GUICtrlSetState($g_ahWallsCurrentCount[$i], $GUI_SHOW)
GUICtrlSetState($g_ahPicWallsLevel[$i], $GUI_SHOW)
Next
For $i = $g_iCmbUpgradeWallsLevel+6 To 16
GUICtrlSetState($g_ahWallsCurrentCount[$i], $GUI_HIDE)
GUICtrlSetState($g_ahPicWallsLevel[$i], $GUI_HIDE)
Next

If $g_iCmbUpgradeWallsLevel <= 3 Then GUICtrlSetState($g_hRdoUseGold, $GUI_CHECKED)

GUICtrlSetState($g_hRdoUseElixir, $g_iCmbUpgradeWallsLevel < 1 ? $GUI_DISABLE : $GUI_ENABLE)
GUICtrlSetState($g_hRdoUseElixirGold, $g_iCmbUpgradeWallsLevel < 1 ? $GUI_DISABLE : $GUI_ENABLE)
GUICtrlSetState($g_hTxtWallMinElixir, $g_iCmbUpgradeWallsLevel < 1 ? $GUI_DISABLE : $GUI_ENABLE)
For $i = 4 To $g_iCmbUpgradeWallsLevel+5
GUICtrlSetState($g_ahWallsCurrentCount[$i], $GUI_SHOW)
GUICtrlSetState($g_ahPicWallsLevel[$i], $GUI_SHOW)
Next

For $i = $g_iCmbUpgradeWallsLevel+6 To 16
GUICtrlSetState($g_ahWallsCurrentCount[$i], $GUI_HIDE)
GUICtrlSetState($g_ahPicWallsLevel[$i], $GUI_HIDE)
Next
EndFunc ;==>cmbWalls

Func btnWalls()
Expand Down
4 changes: 2 additions & 2 deletions COCBot/GUI/MBR GUI Control Collectors.au3
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

Func checkCollectors($log = False, $showLabel = True)
Local $anyCollectorsEnabled = 0
For $i = 6 To 14
For $i = 6 To 15
If $g_abCollectorLevelEnabled[$i] Then
$anyCollectorsEnabled = 1
ExitLoop
Expand All @@ -38,7 +38,7 @@ Func checkCollectors($log = False, $showLabel = True)
EndFunc ;==>checkCollectors

Func chkDBCollector()
For $i = 6 To 14
For $i = 6 To 15
If $g_ahChkDBCollectorLevel[$i] = @GUI_CtrlId Then
If $i = 6 Then
$g_abCollectorLevelEnabled[6] = False
Expand Down
Loading

0 comments on commit c5f860e

Please sign in to comment.