Skip to content

Commit

Permalink
* **V7.6.3**
Browse files Browse the repository at this point in the history
* Fixed Google Play account switch
* Fixed lab status display
* Added Donate only troops and spells in queue
* Added Double train siege machine when it is set to build only 1 type of siege machine
* Added Translating troop list in Request CC to other languages
* Improved multi-stats, improved SwitchAccount stats display for current account only
* Improved CC spell selection
* Improved check & remove unwanted CC spells
* Improved lab check, only check once every 6 hours
* Improved double train with less open & close army window
  • Loading branch information
promac2k committed Oct 6, 2018
1 parent 9e480d1 commit e27c5cc
Show file tree
Hide file tree
Showing 53 changed files with 2,102 additions and 1,760 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
* **V7.6.3**
* Fixed Google Play account switch
* Fixed lab status display
* Added Donate only troops and spells in queue
* Added Double train siege machine when it is set to build only 1 type of siege machine
* Added Translating troop list in Request CC to other languages
* Improved multi-stats, improved SwitchAccount stats display for current account only
* Improved CC spell selection
* Improved check & remove unwanted CC spells
* Improved lab check, only check once every 6 hours
* Improved double train with less open & close army window

* **V7.6.2**
* Fixed Bluestacks 4.x and CoC PB message , different font and place.
* Fixed Siege Build when queued empty and camp is full, making a double sieges.
Expand Down
8 changes: 0 additions & 8 deletions COCBot/GUI/MBR GUI Control BOT Options.au3
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,6 @@ Func btnTestTrain()
If @error Then $result = "Error " & @error & ", " & @extended & ", " & ((IsArray($result)) ? (_ArrayToString($result, ",")) : ($result))
SetLog("Result ArmyHeroStatus(0, 1, 2) = " & ((IsArray($result)) ? ("Array: " & _ArrayToString($result, ",")) : ($result)), $COLOR_INFO)

SetLog("Testing GetCurCCSpell()", $COLOR_INFO)
$result = GetCurCCSpell(1)
If @error Then $result = "Error " & @error & ", " & @extended & ", " & ((IsArray($result)) ? ("Array: " & _ArrayToString($result, ",")) : ($result))
SetLog("Result GetCurCCSpell(1) = " & ((IsArray($result)) ? ("Array: " & _ArrayToString($result, ",")) : ($result)), $COLOR_INFO)
$result = GetCurCCSpell(2)
If @error Then $result = "Error " & @error & ", " & @extended & ", " & ((IsArray($result)) ? ("Array: " & _ArrayToString($result, ",")) : ($result))
SetLog("Result GetCurCCSpell(2) = " & ((IsArray($result)) ? ("Array: " & _ArrayToString($result, ",")) : ($result)), $COLOR_INFO)

SetLog("Testing Train DONE", $COLOR_INFO)
EndImageTest()

Expand Down
3 changes: 0 additions & 3 deletions COCBot/GUI/MBR GUI Control Bottom.au3
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ Func Initiate()
$g_bFirstStart = True
$g_bInitiateSwitchAcc = True
$g_iFirstTimeLab = 0
$g_bDoubleTrainDone = False
Local $abEmptyDoubleTrainDone = [False, False, False, False, False, False, False, False]
$g_abDoubleTrainDone = $abEmptyDoubleTrainDone

;~ If $g_bNotifyDeleteAllPushesOnStart Then _DeletePush()

Expand Down
36 changes: 35 additions & 1 deletion COCBot/GUI/MBR GUI Control Donate.au3
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ Func btnDonateTroop()
If GUICtrlGetState($g_ahGrpDonateTroop[$i]) = BitOR($GUI_HIDE, $GUI_ENABLE) Then
_DonateBtn($g_ahGrpDonateTroop[$i], $g_ahTxtBlacklistTroop[$i]) ;Hide/Show controls on Donate tab
EndIf
GUICtrlSetState($g_hChkDonateQueueSpellOnly, $GUI_HIDE)
If $i <= $eTroopCount - 1 + $g_iCustomDonateConfigs Then
GUICtrlSetState($g_hChkDonateQueueTroopOnly, $GUI_SHOW)
If GUICtrlRead($g_ahChkDonateTroop[$i]) = $GUI_CHECKED Or GUICtrlRead($g_ahChkDonateAllTroop[$i]) = $GUI_CHECKED Then
GUICtrlSetState($g_hChkDonateQueueTroopOnly, $GUI_ENABLE)
Else
GUICtrlSetState($g_hChkDonateQueueTroopOnly, $GUI_DISABLE)
EndIf
Else
GUICtrlSetState($g_hChkDonateQueueTroopOnly, $GUI_HIDE)
EndIf
ExitLoop
EndIf
Next
Expand All @@ -35,6 +46,13 @@ Func btnDonateSpell()
If GUICtrlGetState($g_ahGrpDonateSpell[$i]) = BitOR($GUI_HIDE, $GUI_ENABLE) Then
_DonateBtn($g_ahGrpDonateSpell[$i], $g_ahTxtBlacklistSpell[$i])
EndIf
GUICtrlSetState($g_hChkDonateQueueTroopOnly, $GUI_HIDE)
GUICtrlSetState($g_hChkDonateQueueSpellOnly, $GUI_SHOW)
If GUICtrlRead($g_ahChkDonateSpell[$i]) = $GUI_CHECKED Or GUICtrlRead($g_ahChkDonateAllSpell[$i]) = $GUI_CHECKED Then
GUICtrlSetState($g_hChkDonateQueueSpellOnly, $GUI_ENABLE)
Else
GUICtrlSetState($g_hChkDonateQueueSpellOnly, $GUI_DISABLE)
EndIf
ExitLoop
EndIf
Next
Expand All @@ -44,15 +62,19 @@ Func btnDonateBlacklist()
If GUICtrlGetState($g_hGrpDonateGeneralBlacklist) = BitOR($GUI_HIDE, $GUI_ENABLE) Then
_DonateBtn($g_hGrpDonateGeneralBlacklist, $g_hTxtGeneralBlacklist)
EndIf
GUICtrlSetState($g_hChkDonateQueueTroopOnly, $GUI_HIDE)
GUICtrlSetState($g_hChkDonateQueueSpellOnly, $GUI_HIDE)
EndFunc ;==>btnDonateBlacklist

Func chkDonateTroop()
For $i = 0 To $eTroopCount-1 + $g_iCustomDonateConfigs + $eSiegeMachineCount
If @GUI_CtrlId = $g_ahChkDonateTroop[$i] Then
If GUICtrlRead($g_ahChkDonateTroop[$i]) = $GUI_CHECKED Then
_DonateControls($i)
If $i <= $eTroopCount - 1 + $g_iCustomDonateConfigs Then GUICtrlSetState($g_hChkDonateQueueTroopOnly, $GUI_ENABLE)
Else
GUICtrlSetBkColor($g_ahLblDonateTroop[$i], $GUI_BKCOLOR_TRANSPARENT)
If $i <= $eTroopCount - 1 + $g_iCustomDonateConfigs And GUICtrlRead($g_ahChkDonateAllTroop[$i]) = $GUI_UNCHECKED Then GUICtrlSetState($g_hChkDonateQueueTroopOnly, $GUI_DISABLE)
EndIf
EndIf
Next
Expand All @@ -61,6 +83,11 @@ EndFunc ;==>chkDonateTroop
Func chkDonateAllTroop()
For $i = 0 To $eTroopCount - 1 + $g_iCustomDonateConfigs
If @GUI_CtrlId = $g_ahChkDonateAllTroop[$i] Then
If GUICtrlRead($g_ahChkDonateAllTroop[$i]) = $GUI_CHECKED Then
GUICtrlSetState($g_hChkDonateQueueTroopOnly, $GUI_ENABLE)
ElseIf GUICtrlRead($g_ahChkDonateTroop[$i]) = $GUI_UNCHECKED Then
GUICtrlSetState($g_hChkDonateQueueTroopOnly, $GUI_DISABLE)
EndIf
_DonateAllControls($i, GUICtrlRead($g_ahChkDonateAllTroop[$i]) = $GUI_CHECKED ? True : False)
ExitLoop
EndIf
Expand All @@ -72,8 +99,10 @@ Func chkDonateSpell()
If @GUI_CtrlId = $g_ahChkDonateSpell[$i] Then
If GUICtrlRead($g_ahChkDonateSpell[$i]) = $GUI_CHECKED Then
_DonateControlsSpell($i)
GUICtrlSetState($g_hChkDonateQueueSpellOnly, $GUI_ENABLE)
Else
GUICtrlSetBkColor($g_ahLblDonateSpell[$i], $GUI_BKCOLOR_TRANSPARENT)
If GUICtrlRead($g_ahChkDonateAllSpell[$i]) = $GUI_UNCHECKED Then GUICtrlSetState($g_hChkDonateQueueSpellOnly, $GUI_DISABLE)
EndIf
EndIf
Next
Expand All @@ -82,6 +111,11 @@ EndFunc ;==>chkDonateSpell
Func chkDonateAllSpell()
For $i = 0 To $eSpellCount - 1
If @GUI_CtrlId = $g_ahChkDonateAllSpell[$i] Then
If GUICtrlRead($g_ahChkDonateAllSpell[$i]) = $GUI_CHECKED Then
GUICtrlSetState($g_hChkDonateQueueSpellOnly, $GUI_ENABLE)
Else
If GUICtrlRead($g_ahChkDonateSpell[$i]) = $GUI_UNCHECKED Then GUICtrlSetState($g_hChkDonateQueueSpellOnly, $GUI_DISABLE)
EndIf
_DonateAllControlsSpell($i, GUICtrlRead($g_ahChkDonateAllSpell[$i]) = $GUI_CHECKED ? True : False)
ExitLoop
EndIf
Expand Down Expand Up @@ -157,7 +191,7 @@ Func _DonateControls($iTroopIndex)
If GUICtrlGetBkColor($g_ahLblDonateTroop[$i]) = $COLOR_NAVY Then GUICtrlSetBkColor($g_ahLblDonateTroop[$i], $GUI_BKCOLOR_TRANSPARENT)
EndIf

GUICtrlSetState($g_ahChkDonateAllTroop[$i], $GUI_UNCHECKED)
If $iTroopIndex < $eTroopCount + $g_iCustomDonateConfigs Then GUICtrlSetState($g_ahChkDonateAllTroop[$i], $GUI_UNCHECKED)
If BitAND(GUICtrlGetState($g_ahTxtDonateTroop[$i]), $GUI_DISABLE) = $GUI_DISABLE Then GUICtrlSetState($g_ahTxtDonateTroop[$i], $GUI_ENABLE)
If BitAND(GUICtrlGetState($g_ahTxtBlacklistTroop[$i]), $GUI_DISABLE) = $GUI_DISABLE Then GUICtrlSetState($g_ahTxtBlacklistTroop[$i], $GUI_ENABLE)
Next
Expand Down
29 changes: 22 additions & 7 deletions COCBot/GUI/MBR GUI Control Tab Stats.au3
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,38 @@ Func UpdateMultiStats()
Local $iCmbTotalAcc = _GUICtrlComboBox_GetCurSel($g_hCmbTotalAccount) + 1 ; combobox data starts with 2
For $i = 0 To 7
If $bEnableSwitchAcc And $i <= $iCmbTotalAcc Then
For $j = $g_ahGrpVillageAcc[$i] To $g_ahLblHourlyStatsTrophyAcc[$i]
GUICtrlSetState($j, $GUI_SHOW)
Next
_GUI_Value_STATE("SHOW", $g_ahGrpDefaultAcc[$i])
If GUICtrlGetState($g_ahLblHourlyStatsGoldAcc[$i]) = $GUI_ENABLE + $GUI_HIDE Then _GUI_Value_STATE("SHOW", $g_ahGrpReportAcc[$i])

If GUICtrlRead($g_ahChkAccount[$i]) = $GUI_CHECKED Then
If GUICtrlRead($g_ahChkDonate[$i]) = $GUI_UNCHECKED Then
GUICtrlSetData($g_ahGrpVillageAcc[$i], GUICtrlRead($g_ahCmbProfile[$i]) & " (Active)")
Else
GUICtrlSetData($g_ahGrpVillageAcc[$i], GUICtrlRead($g_ahCmbProfile[$i]) & " (Donate)")
EndIf

Else
GUICtrlSetData($g_ahGrpVillageAcc[$i], GUICtrlRead($g_ahCmbProfile[$i]) & " (Idle)")
EndIf
Else
For $j = $g_ahGrpVillageAcc[$i] To $g_ahLblHourlyStatsTrophyAcc[$i]
GUICtrlSetState($j, $GUI_HIDE)
Next
_GUI_Value_STATE("HIDE", $g_ahGrpDefaultAcc[$i] & "#" & $g_ahGrpReportAcc[$i] & "#" & $g_ahGrpStatsAcc[$i])
EndIf
Next
EndFunc ;==>UpdateMultiStats

Func SwitchVillageInfo()
For $i = 0 To 7
If @GUI_CtrlId = $g_ahPicArrowLeft[$i] Or @GUI_CtrlId = $g_ahPicArrowRight[$i] Then
Return _SwitchVillageInfo($i)
EndIf
Next
EndFunc

Func _SwitchVillageInfo($i)
If GUICtrlGetState($g_ahLblResultGoldNowAcc[$i]) = $GUI_ENABLE + $GUI_SHOW Then
_GUI_Value_STATE("HIDE", $g_ahGrpReportAcc[$i])
_GUI_Value_STATE("SHOW", $g_ahGrpStatsAcc[$i])
Else
_GUI_Value_STATE("HIDE", $g_ahGrpStatsAcc[$i])
_GUI_Value_STATE("SHOW", $g_ahGrpReportAcc[$i])
EndIf
EndFunc
32 changes: 17 additions & 15 deletions COCBot/GUI/MBR GUI Control Tab Village.au3
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ Func chkRequestCountCC()
EndIf
If GUICtrlRead($g_hChkRequestType_Spells) = $GUI_CHECKED Then
GUICtrlSetState($g_hTxtRequestCountCCSpell, $GUI_ENABLE)
GUICtrlSetState($g_hCmbClanCastleSpell, $GUI_ENABLE)
cmbClanCastleSpell()
For $i = $g_ahCmbClanCastleSpell[0] To $g_ahCmbClanCastleSpell[1]
GUICtrlSetState($i, $GUI_ENABLE)
Next
CmbClanCastleSpell()
Else
GUICtrlSetState($g_hTxtRequestCountCCSpell, $GUI_DISABLE)
GUICtrlSetState($g_hCmbClanCastleSpell, $GUI_DISABLE)
GUICtrlSetState($g_hTxtClanCastleSpell, $GUI_DISABLE)
GUICtrlSetState($g_hCmbClanCastleSpell2, $GUI_DISABLE)
For $i = $g_ahCmbClanCastleSpell[0] To $g_ahTxtClanCastleSpell[1]
GUICtrlSetState($i, $GUI_DISABLE)
Next
EndIf
EndFunc ;==>chkRequestCountCC

Expand All @@ -82,16 +84,16 @@ Func CmbClanCastleTroop()
Next
EndFunc ;==>CmbClanCastleTroop

Func cmbClanCastleSpell()
Local $iSpellSelection = _GUICtrlComboBox_GetCurSel($g_hCmbClanCastleSpell)
If $iSpellSelection < 5 Then
GUICtrlSetState($g_hCmbClanCastleSpell2, BitOR($GUI_HIDE, $GUI_DISABLE))
GUICtrlSetState($g_hTxtClanCastleSpell, BitOR($GUI_HIDE, $GUI_DISABLE))
Else
GUICtrlSetState($g_hCmbClanCastleSpell2, BitOR($GUI_SHOW, $GUI_ENABLE))
GUICtrlSetState($g_hTxtClanCastleSpell, BitOR($GUI_SHOW, $GUI_ENABLE))
EndIf
EndFunc ;==>cmbDBWaitForCCSpell
Func CmbClanCastleSpell()
For $i = 0 To UBound($g_ahCmbClanCastleSpell) - 1
If _GUICtrlComboBox_GetCurSel($g_ahCmbClanCastleSpell[$i]) = $eCSpell - $eLSpell Then _GUICtrlComboBox_SetCurSel($g_ahCmbClanCastleSpell[$i], $eSkSpell - $eLSpell + 1)
If _GUICtrlComboBox_GetCurSel($g_ahCmbClanCastleSpell[$i]) <= $eSkSpell - $eLSpell Then
GUICtrlSetState($g_ahTxtClanCastleSpell[$i], $GUI_ENABLE)
Else
GUICtrlSetState($g_ahTxtClanCastleSpell[$i], $GUI_DISABLE)
EndIf
Next
EndFunc ;==>CmbClanCastleSpell

Func chkRequestCCHoursE1()
If GUICtrlRead($g_hChkRequestCCHoursE1) = $GUI_CHECKED And GUICtrlRead($g_ahChkRequestCCHours[0]) = $GUI_CHECKED Then
Expand Down
Loading

0 comments on commit e27c5cc

Please sign in to comment.