Skip to content

Commit

Permalink
* v8.0.2 **
Browse files Browse the repository at this point in the history
* Respond faster to "Stop" during zoomout.
* Fixed CheckZoomOut reset.
* Converted some coords to use offsets.
* Laboratory Last Page, 5 columns coordinates.
* Fixed TH Weapon Level.
* Clan Capital : Just Green Bar check for upgrades not started yet.
* Remove tutorial checks for Clan Capital (Bringed some false postive).
* Fixed Drag Rider Training when 2 unlocked Elixir Super Troops.
* Fixed "Any siege" option in scripted attacks.
* MultiCheck For Sieges level before attacks.
* Add CCSPL optionnal command for scripted attacks.
* Added GetDiamondFromRect2
* Added Amazon CoC to Distributors List - temporary removed Google
* Change default to Amazon
* Added Skeleton Park District Support.
* Clan Capital : Remove Green Bar Progression Check for Prioritized not started yet.
* Fixed OCR for Heroes Upgrades Cost.
* Improve Resource Detection for Wall Upgrade (Home village).
* Added Tombs to decoration list (Clan Capital).
* Added Super Miner.
* Improve Dead Eagle Detection.
* Added game distribution reset button.
* Fixed SCID login screen.
* Added Siege OCR template.
* Reduced StoneJS image tolerance.
* Added reset message if bot failed to find CoC.
* Added 'Connection Error' template and adjusted some obstacles checks.
* Fixed OCR Level 0 Read When "Any siege".
* Typo and addings for donate keywords.
  • Loading branch information
GrumpyHog committed Jan 1, 2023
1 parent c5f860e commit 08e4595
Show file tree
Hide file tree
Showing 122 changed files with 1,105 additions and 834 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
* v8.0.2 **
* Respond faster to "Stop" during zoomout.
* Fixed CheckZoomOut reset.
* Converted some coords to use offsets.
* Laboratory Last Page, 5 columns coordinates.
* Fixed TH Weapon Level.
* Clan Capital : Just Green Bar check for upgrades not started yet.
* Remove tutorial checks for Clan Capital (Bringed some false postive).
* Fixed Drag Rider Training when 2 unlocked Elixir Super Troops.
* Fixed "Any siege" option in scripted attacks.
* MultiCheck For Sieges level before attacks.
* Add CCSPL optionnal command for scripted attacks.
* Added GetDiamondFromRect2
* Added Amazon CoC to Distributors List - temporary removed Google
* Change default to Amazon
* Added Skeleton Park District Support.
* Clan Capital : Remove Green Bar Progression Check for Prioritized not started yet.
* Fixed OCR for Heroes Upgrades Cost.
* Improve Resource Detection for Wall Upgrade (Home village).
* Added Tombs to decoration list (Clan Capital).
* Added Super Miner.
* Improve Dead Eagle Detection.
* Added game distribution reset button.
* Fixed SCID login screen.
* Added Siege OCR template.
* Reduced StoneJS image tolerance.
* Added reset message if bot failed to find CoC.
* Added 'Connection Error' template and adjusted some obstacles checks.
* Fixed OCR Level 0 Read When "Any siege".
* Typo and addings for donate keywords.

* v8.0.1 **
* Design. New GUI Icons.
* Builder Base & Clan Capital Resources always in Number Format.
Expand Down
60 changes: 55 additions & 5 deletions COCBot/GUI/MBR GUI Control Attack Scripted.au3
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,11 @@ 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 $iSlot = 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, 0]
Local $aiCSVSpells[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Local $sCSVCCSpl[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Local $ToIgnore[$eSpellCount] = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
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
Expand All @@ -278,7 +281,7 @@ Func ApplyScriptDB()
Local $sFilename = $aTemp[_GUICtrlComboBox_GetCurSel($g_hCmbScriptNameDB) + 1]

SetLog("CSV settings apply starts: " & $sFilename, $COLOR_INFO)
$iApply = ParseAttackCSV_Settings_variables($aiCSVTroops, $aiCSVSpells, $aiCSVSieges, $aiCSVHeros, $aiCSVWardenMode, $iCSVRedlineRoutineItem, $iCSVDroplineEdgeItem, $sCSVCCReq, $sFilename)
$iApply = ParseAttackCSV_Settings_variables($aiCSVTroops, $aiCSVSpells, $aiCSVSieges, $aiCSVHeros, $aiCSVWardenMode, $iCSVRedlineRoutineItem, $iCSVDroplineEdgeItem, $sCSVCCReq, $sCSVCCSpl, $sFilename)
If Not $iApply Then
SetLog("CSV settings apply failed", $COLOR_ERROR)
Return
Expand Down Expand Up @@ -307,7 +310,7 @@ Func ApplyScriptDB()
EndIf

If IsArray($aiCSVSieges) And $iApplySieges > 0 Then
Local $aMachine = _ArrayMaxIndex($aiCSVSieges, 0, 1)
Local $aMachine = _ArrayMaxIndex($aiCSVSieges)
_GUICtrlComboBox_SetCurSel($g_hCmbDBSiege, $aMachine + 1)
GUICtrlSetState($g_hChkDBDropCC, $GUI_CHECKED)
GUICtrlSetState($g_hCmbDBSiege, $GUI_ENABLE)
Expand Down Expand Up @@ -365,10 +368,32 @@ Func ApplyScriptDB()
If IsArray($ahChkDBSpell) Then
For $i = 0 To UBound($ahChkDBSpell) - 1
GUICtrlSetState($ahChkDBSpell[$i], $aiCSVSpells[$i] > 0 ? $GUI_CHECKED : $GUI_UNCHECKED)
If $sCSVCCSpl[$i] = 1 Then GUICtrlSetState($ahChkDBSpell[$i], $GUI_CHECKED)
If $aiCSVSpells[$i] > 0 Then $iApply += 1
Next
If $iApply > 0 Then SetLog("CSV 'Attack with' Spell settings applied", $COLOR_SUCCESS)
EndIf

For $t = 0 To UBound($sCSVCCSpl) - 1
If $sCSVCCSpl[$t] = 1 Then $iSlot += 1
Next
If $iSlot > 0 Then
GUICtrlSetState($g_hChkRequestType_Spells, $GUI_CHECKED)
For $x = 0 To UBound($g_ahCmbClanCastleSpell) - 1
_GUICtrlComboBox_SetCurSel($g_ahCmbClanCastleSpell[$x], 0);Reset To Any
Next
chkRequestCountCC()
EndIf
For $i = 0 To UBound($g_ahCmbClanCastleSpell) - 1
If $i > $iSlot - 1 Then ExitLoop
For $z = 0 To UBound($sCSVCCSpl) - 1
If $sCSVCCSpl[$z] = 1 And $z <> $ToIgnore[$z] Then
_GUICtrlComboBox_SetCurSel($g_ahCmbClanCastleSpell[$i], $z+1)
If $ToIgnore[$z] = -1 Then $ToIgnore[$z] = $z
ExitLoop
EndIf
Next
Next

If $iCSVRedlineRoutineItem > 0 And $iCSVRedlineRoutineItem <= _GUICtrlComboBox_GetCount($g_hCmbScriptRedlineImplDB) + 1 Then
_GUICtrlComboBox_SetCurSel($g_hCmbScriptRedlineImplDB, $iCSVRedlineRoutineItem - 1)
Expand Down Expand Up @@ -396,8 +421,11 @@ 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 $iSlot = 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, 0]
Local $aiCSVSpells[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,0]
Local $sCSVCCSpl[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,0]
Local $ToIgnore[$eSpellCount] = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
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
Expand All @@ -407,7 +435,7 @@ Func ApplyScriptAB()
Local $sFilename = $aTemp[_GUICtrlComboBox_GetCurSel($g_hCmbScriptNameAB) + 1]

SetLog("CSV settings apply starts: " & $sFilename, $COLOR_INFO)
$iApply = ParseAttackCSV_Settings_variables($aiCSVTroops, $aiCSVSpells, $aiCSVSieges, $aiCSVHeros, $aiCSVWardenMode, $iCSVRedlineRoutineItem, $iCSVDroplineEdgeItem, $sCSVCCReq, $sFilename)
$iApply = ParseAttackCSV_Settings_variables($aiCSVTroops, $aiCSVSpells, $aiCSVSieges, $aiCSVHeros, $aiCSVWardenMode, $iCSVRedlineRoutineItem, $iCSVDroplineEdgeItem, $sCSVCCReq, $sCSVCCSpl, $sFilename)
If Not $iApply Then
SetLog("CSV settings apply failed", $COLOR_ERROR)
Return
Expand Down Expand Up @@ -494,10 +522,32 @@ Func ApplyScriptAB()
If IsArray($ahChkABSpell) Then
For $i = 0 To UBound($ahChkABSpell) - 1
GUICtrlSetState($ahChkABSpell[$i], $aiCSVSpells[$i] > 0 ? $GUI_CHECKED : $GUI_UNCHECKED)
If $sCSVCCSpl[$i] = 1 Then GUICtrlSetState($ahChkABSpell[$i], $GUI_CHECKED)
If $aiCSVSpells[$i] > 0 Then $iApply += 1
Next
If $iApply > 0 Then SetLog("CSV 'Attack with' Spell settings applied", $COLOR_SUCCESS)
EndIf

For $t = 0 To UBound($sCSVCCSpl) - 1
If $sCSVCCSpl[$t] = 1 Then $iSlot += 1
Next
If $iSlot > 0 Then
GUICtrlSetState($g_hChkRequestType_Spells, $GUI_CHECKED)
For $x = 0 To UBound($g_ahCmbClanCastleSpell) - 1
_GUICtrlComboBox_SetCurSel($g_ahCmbClanCastleSpell[$x], 0);Reset To Any
Next
chkRequestCountCC()
EndIf
For $i = 0 To UBound($g_ahCmbClanCastleSpell) - 1
If $i > $iSlot - 1 Then ExitLoop
For $z = 0 To UBound($sCSVCCSpl) - 1
If $sCSVCCSpl[$z] = 1 And $z <> $ToIgnore[$z] Then
_GUICtrlComboBox_SetCurSel($g_ahCmbClanCastleSpell[$i], $z+1)
If $ToIgnore[$z] = -1 Then $ToIgnore[$z] = $z
ExitLoop
EndIf
Next
Next

If $iCSVRedlineRoutineItem > 0 And $iCSVRedlineRoutineItem <= _GUICtrlComboBox_GetCount($g_hCmbScriptRedlineImplAB) + 1 Then
_GUICtrlComboBox_SetCurSel($g_hCmbScriptRedlineImplAB, $iCSVRedlineRoutineItem - 1)
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 @@ -674,8 +674,8 @@ 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, $eTroopSuperDragon, $eTroopPekka, $eTroopBabyDragon, $eTroopInfernoDragon, $eTroopMiner, _
$eTroopElectroDragon, $eTroopYeti, $eTroopDragonRider, $eTroopElectroTitan, _
$eTroopSuperWallBreaker, $eTroopBalloon, $eTroopRocketBalloon, $eTroopWizard, $eTroopSuperWizard, $eTroopHealer, $eTroopDragon, $eTroopSuperDragon, $eTroopPekka, $eTroopBabyDragon, $eTroopInfernoDragon, _
$eTroopMiner, $eTroopSuperMiner, $eTroopElectroDragon, $eTroopYeti, $eTroopDragonRider, $eTroopElectroTitan, _
$eTroopMinion, $eTroopSuperMinion, $eTroopHogRider, $eTroopValkyrie, $eTroopSuperValkyrie, $eTroopGolem, $eTroopWitch, $eTroopSuperWitch, _
$eTroopLavaHound, $eTroopIceHound, $eTroopBowler, $eTroopSuperBowler, $eTroopIceGolem, $eTroopHeadhunter]

Expand Down
34 changes: 34 additions & 0 deletions COCBot/GUI/MBR GUI Control Child Misc.au3
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,40 @@ Func btnResetBuilding()
AndroidShield("btnResetBuilding") ; Update shield status due to manual $g_bRunState
EndFunc ;==>btnResetBuilding

Func btnResetDistributor()
Local $wasRunState = $g_bRunState
$g_bRunState = True
While 1
If _Sleep(500) Then Return ; add small delay before display message window

_ExtMsgBoxSet(1 + 64, $SS_CENTER, 0x004080, 0xFFFF00, 12, "Comic Sans MS", 600)
Local $stext = @CRLF & GetTranslatedFileIni("MBR Popups", "Reset_Distributor_info", "Click OK to Reset Game Distributor,") & @CRLF & @CRLF & _
GetTranslatedFileIni("MBR Popups", "Bot_will_exit", "NOTE =>> Bot will exit and need to be restarted when complete") & @CRLF & @CRLF & GetTranslatedFileIni("MBR Popups", "Cancel_to_exit", "Or Click Cancel to exit") & @CRLF
Local $MsgBox = _ExtMsgBox(0, GetTranslatedFileIni("MBR Popups", "Ok_Cancel", "Ok|Cancel"), GetTranslatedFileIni("MBR Popups", "Reset_Game_Distributor_Info", "Delete Game Distributor Infomation ?"), $stext, 120)
If $g_bDebugSetlog Then SetDebugLog("$MsgBox= " & $MsgBox, $COLOR_DEBUG)
If $MsgBox = 1 Then
Local $stext = @CRLF & GetTranslatedFileIni("MBR Popups", "Sure_Game_Distributor_Info", "Are you 100% sure you want to reset Game Distributor information ?") & @CRLF & @CRLF & _
GetTranslatedFileIni("MBR Popups", "Reset_then_restart_bot", "Click OK to Reset and then restart the bot (manually)") & @CRLF & @CRLF & GetTranslatedFileIni("MBR Popups", "Cancel_to_exit", -1) & @CRLF
Local $MsgBox = _ExtMsgBox(0, GetTranslatedFileIni("MBR Popups", "Ok_Cancel", -1), GetTranslatedFileIni("MBR Popups", "Reset_Game_Distributor_Info", -1), $stext, 120)
If $g_bDebugSetlog Then SetDebugLog("$MsgBox= " & $MsgBox, $COLOR_DEBUG)
If $MsgBox = 1 Then
$g_sAndroidGameDistributor = "Amazon" ; Default CoC Game Distributor, loaded from config.ini
$g_sAndroidGamePackage = "com.supercell.clashofclans.amazon" ; Default CoC Game Package, loaded from config.ini
$g_sAndroidGameClass = "com.supercell.titan.amazon.GameAppAmazon" ; Default CoC Game Class, loaded from config.ini
$g_sUserGameDistributor = "Amazon" ; User Added CoC Game Distributor, loaded from config.ini
$g_sUserGamePackage = "com.supercell.clashofclans.amazon" ; User Added CoC Game Package, loaded from config.ini
$g_sUserGameClass = "com.supercell.titan.amazon.GameAppAmazon" ; User Added CoC Game Class, loaded from config.ini

SaveConfig()
BotClose(False)
EndIf
EndIf
ExitLoop
WEnd
$g_bRunState = $wasRunState
AndroidShield("btnResetDistributor") ; Update shield status due to manual $g_bRunState
EndFunc ;==>btnResetDistributor

Func btnLab()
Local $wasRunState = $g_bRunState
$g_bRunState = True
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 @@ -17,7 +17,7 @@
Global $g_aiDonIcons[$eTroopCount + 1] = [$eIcnDonBarbarian, $eIcnSuperBarbarian, $eIcnDonArcher, $eIcnSuperArcher, $eIcnDonGiant, $eIcnSuperGiant, $eIcnDonGoblin, $eIcnSneakyGoblin, _
$eIcnDonWallBreaker, $eIcnSuperWallBreaker, $eIcnDonBalloon, $eIcnRocketBalloon, $eIcnDonWizard, $eIcnSuperWizard, _
$eIcnDonHealer, $eIcnDonDragon, $eIcnSuperDragon, $eIcnDonPekka, $eIcnDonBabyDragon, _
$eIcnInfernoDragon, $eIcnDonMiner, $eIcnElectroDragon, $eIcnYeti, $eIcnDragonRider, $eIcnElectroTitan, _
$eIcnInfernoDragon, $eIcnDonMiner, $eIcnSuperMiner, $eIcnElectroDragon, $eIcnYeti, $eIcnDragonRider, $eIcnElectroTitan, _
$eIcnDonMinion, $eIcnSuperMinion, $eIcnDonHogRider, $eIcnDonValkyrie, $eIcnSuperValkyrie, $eIcnDonGolem, _
$eIcnDonWitch, $eIcnSuperWitch, $eIcnDonLavaHound, $eIcnIceHound, $eIcnDonBowler, $eIcnSuperBowler, $eIcnIceGolem, $eIcnHeadhunter, $eIcnDonBlank]

Expand Down
2 changes: 1 addition & 1 deletion 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", "Super Dragons", "Pekkas", "Baby Dragons", "Inferno Dragons", "Miners", "Electro Dragons", "Yetis", "Dragon Riders", _
"Dragons", "Super Dragons", "Pekkas", "Baby Dragons", "Inferno Dragons", "Miners", "Super Miners", "Electro Dragons", "Yetis", "Dragon Riders", _
"Electro Titans", "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
29 changes: 22 additions & 7 deletions COCBot/GUI/MBR GUI Design Child Attack - Troops.au3
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ Global $g_hGUI_TRAINTYPE_TAB = 0, $g_hGUI_TRAINTYPE_TAB_ITEM1 = 0, $g_hGUI_TRAIN

; Troops/Spells sub-tab
Global $g_hRadCustomTrain = 0, $g_hRadQuickTrain = 0, $g_ahChkArmy[3] = [0, 0, 0]
Global $g_ahTxtTrainArmyTroopCount[$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]
Global $g_ahTxtTrainArmyTroopCount[$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, 0]
Global $g_ahTxtTrainArmySpellCount[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Global $g_ahTxtTrainArmySiegeCount[$eSiegeMachineCount] = [0, 0, 0, 0, 0, 0, 0]
Global $g_hTxtFullTroop = 0, $g_hChkTotalCampForced = 0, $g_hTxtTotalCampForced = 0
Global $g_hChkDoubleTrain = 0, $g_hChkPreciseArmy = 0

Global $g_hGrpTrainTroops = 0
Global $g_ahPicTrainArmyTroop[$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]
Global $g_ahPicTrainArmyTroop[$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, 0]
Global $g_ahPicTrainArmySpell[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Global $g_ahPicTrainArmySiege[$eSiegeMachineCount] = [0, 0, 0, 0, 0, 0, 0]
Global $g_hLblTotalTimeCamp = 0, $g_hLblElixirCostCamp = 0, $g_hLblDarkCostCamp = 0, $g_hCalTotalTroops = 0, $g_hLblTotalProgress = 0, $g_hLblCountTotal = 0, _
Expand All @@ -44,7 +44,7 @@ Global $g_hLblTotalTimeCamp = 0, $g_hLblElixirCostCamp = 0, $g_hLblDarkCostCamp

; Quick Train sub-tab
Global $g_aQuickTroopIcon[$eTroopCount] = [$eIcnBarbarian, $eIcnSuperBarbarian, $eIcnArcher, $eIcnSuperArcher, $eIcnGiant, $eIcnSuperGiant, $eIcnGoblin, $eIcnSneakyGoblin, $eIcnWallBreaker, $eIcnSuperWallBreaker, _
$eIcnBalloon, $eIcnRocketBalloon, $eIcnWizard, $eIcnSuperWizard, $eIcnHealer, $eIcnDragon, $eIcnSuperDragon, $eIcnPekka, $eIcnBabyDragon, $eIcnInfernoDragon, $eIcnMiner, $eIcnElectroDragon, $eIcnYeti, $eIcnDragonRider, $eIcnElectroTitan, $eIcnMinion, $eIcnSuperMinion, _
$eIcnBalloon, $eIcnRocketBalloon, $eIcnWizard, $eIcnSuperWizard, $eIcnHealer, $eIcnDragon, $eIcnSuperDragon, $eIcnPekka, $eIcnBabyDragon, $eIcnInfernoDragon, $eIcnMiner, $eIcnSuperMiner, $eIcnElectroDragon, $eIcnYeti, $eIcnDragonRider, $eIcnElectroTitan, $eIcnMinion, $eIcnSuperMinion, _
$eIcnHogRider, $eIcnValkyrie, $eIcnSuperValkyrie, $eIcnGolem, $eIcnWitch, $eIcnSuperWitch, $eIcnLavaHound, $eIcnIceHound, $eIcnBowler, $eIcnSuperBowler, $eIcnIceGolem, $eIcnHeadhunter]
Global $g_aQuickSpellIcon[$eSpellCount] = [$eIcnLightSpell, $eIcnHealSpell, $eIcnRageSpell, $eIcnJumpSpell, $eIcnFreezeSpell, $eIcnCloneSpell, $eIcnInvisibilitySpell, $eIcnRecallSpell, $eIcnPoisonSpell, $eIcnEarthQuakeSpell, $eIcnHasteSpell, $eIcnSkeletonSpell, $eIcnBatSpell]
Global $g_ahChkUseInGameArmy[3], $g_ahPicTotalQTroop[3], $g_ahPicTotalQSpell[3], $g_ahLblTotalQTroop[3], $g_ahLblTotalQSpell[3]
Expand All @@ -55,7 +55,7 @@ Global $g_hGUI_QuickTrainEdit = 0, $g_hGrp_QTEdit = 0
Global $g_hBtnRemove_QTEdit, $g_hBtnSave_QTEdit, $g_hBtnCancel_QTEdit
Global $g_ahPicQTEdit_Troop[7], $g_ahTxtQTEdit_Troop[7], $g_ahPicQTEdit_Spell[7], $g_ahTxtQTEdit_Spell[7]
Global $g_ahLblQTEdit_TotalTroop, $g_ahLblQTEdit_TotalSpell
Global $g_ahPicTroop_QTEdit[$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]
Global $g_ahPicTroop_QTEdit[$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, 0]
Global $g_ahPicSpell_QTEdit[$eSpellCount] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

; Boost sub-tab
Expand Down Expand Up @@ -91,6 +91,7 @@ Func LoadTranslatedTrainTroopsOrderList()
GetTranslatedFileIni("MBR Global GUI Design Names Troops", "TxtBabyDragons", "Baby Dragons"), _
GetTranslatedFileIni("MBR Global GUI Design Names Troops", "TxtInfernoDragons", "Inferno Dragons"), _
GetTranslatedFileIni("MBR Global GUI Design Names Troops", "TxtMiners", "Miners"), _
GetTranslatedFileIni("MBR Global GUI Design Names Troops", "TxtSuperMiners", "Super Miners"), _
GetTranslatedFileIni("MBR Global GUI Design Names Troops", "TxtElectroDragons", "Electro Dragons"), _
GetTranslatedFileIni("MBR Global GUI Design Names Troops", "TxtYetis", "Yetis"), _
GetTranslatedFileIni("MBR Global GUI Design Names Troops", "TxtDragonRiders", "Dragon Riders"), _
Expand All @@ -112,8 +113,8 @@ Func LoadTranslatedTrainTroopsOrderList()
EndFunc ;==>LoadTranslatedTrainTroopsOrderList

Global $g_hChkCustomTrainOrderEnable = 0
Global $g_ahCmbTroopOrder[$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]
Global $g_ahImgTroopOrder[$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]
Global $g_ahCmbTroopOrder[$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, 0]
Global $g_ahImgTroopOrder[$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, 0]
Global $g_hBtnTroopOrderSet = 0, $g_ahImgTroopOrderSet = 0
Global $g_hBtnRemoveTroops

Expand Down Expand Up @@ -855,6 +856,20 @@ $x += $iIconAndSpace
GUICtrlSetLimit(-1, 2)
GUICtrlSetOnEvent(-1, "TrainTroopCountEdit")

$x += $iIconAndSpace
; Super Miner
Local $sTroopName = GetTranslatedFileIni("MBR Global GUI Design Names Troops", "TxtSuperMiners", "Super Miners")
$g_ahPicTrainArmyTroop[$eTroopInfernoDragon] = _GUICtrlCreateIcon($g_sLibIconPath, $eIcnSuperMiner, $x, $y - 5, 32, 32)
;_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR Global GUI Design", "Level", -1) & " " & $sTroopName & ":" & @CRLF & GetTranslatedFileIni("MBR GUI Design Child Attack - Troops", "Mouse_Left_Click", -1))
;GUICtrlSetOnEvent(-1, "TrainTroopLevelClick")
;$g_ahLblTrainArmyTroopLevel[$eTroopInfernoDragon] = GUICtrlCreateLabel("0", $x + 2, $y + 14, 10, 11, $SS_CENTER)
;GUICtrlSetBkColor(-1, $COLOR_WHITE)
;GUICtrlSetFont(-1, 7, 400)
$g_ahTxtTrainArmyTroopCount[$eTroopSuperMiner] = GUICtrlCreateInput("0", $x + 1, $y + 29, 30, 17, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER))
_GUICtrlSetTip(-1, $sTxtSetPerc & " " & $sTroopName & " " & $sTxtSetPerc2)
GUICtrlSetLimit(-1, 2)
GUICtrlSetOnEvent(-1, "TrainTroopCountEdit")

$x += $iIconAndSpace
; Super Minions
Local $sTroopName = GetTranslatedFileIni("MBR Global GUI Design Names Troops", "TxtSuperMinions", "SuperMinions")
Expand Down Expand Up @@ -1554,7 +1569,7 @@ Func CreateOrderTroopsSubTab()
Else
If $z = 26 Then
$x += 145
$y = 53
$y = 40
EndIf
GUICtrlCreateLabel($z + 1 & ":", $x - 13, $y + 2, -1, 18)
$g_ahCmbTroopOrder[$z] = GUICtrlCreateCombo("", $x + 4, $y, 94, 18, BitOR($CBS_DROPDOWNLIST + $WS_VSCROLL, $CBS_AUTOHSCROLL))
Expand Down
Loading

0 comments on commit 08e4595

Please sign in to comment.