Skip to content

Commit

Permalink
Release MBR v7.1.1 Hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyhunter01 committed Apr 4, 2017
1 parent 6ba02da commit 86a611f
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 80 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
* **V7.1**
* **V7.1.1**
* Fix DPI awareness switch from scaled compensation title bar height in classic window title bar design mode (docked Android window was cut off at bottom)
* Fix classic window title bar design mode resizing/hiding active window during bot launch
* Fix some incorrect GUI translate references

* **V7.1**
* Fix General BlackList Donations GUI setting not saved
* Stop troop training in Halt Mode(s) -On-line Only & -Donate Only
* Fix memory leak in OCR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ Func CreateAttackSearchOptionsTrophySettings()
$g_hCmbTrophyHeroesPriority = GUICtrlCreateCombo("", $x + 125, $y - 4 , 170, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
_GUICtrlSetTip(-1, GetTranslated(609,12, "Set the order on which Hero the Bot drops first when available."))
Local $txtPriorityConnector = ">"
Local $txtPriorityDefault = GetTranslated(644,2,-1) & $txtPriorityConnector & GetTranslated(644,1,-1) & $txtPriorityConnector & GetTranslated(644,3,-1) ; default value Queen, King, G.Warden
Local $txtPriorityDefault = GetTranslated(644, 2, "Queen") & $txtPriorityConnector & GetTranslated(644, 1, "King") & $txtPriorityConnector & GetTranslated(644, 3, "G.Warden") ; default value Queen, King, G.Warden
Local $txtPriorityList = "" & _
GetTranslated(644,2,-1) & $txtPriorityConnector & GetTranslated(644,1,-1) & $txtPriorityConnector & GetTranslated(644,3,-1) & "|" & _
GetTranslated(644,2,-1) & $txtPriorityConnector & GetTranslated(644,3,-1) & $txtPriorityConnector & GetTranslated(644,1,-1) & "|" & _
GetTranslated(644,1,-1) & $txtPriorityConnector & GetTranslated(644,2,-1) & $txtPriorityConnector & GetTranslated(644,3,-1) & "|" & _
GetTranslated(644,1,-1) & $txtPriorityConnector & GetTranslated(644,3,-1) & $txtPriorityConnector & GetTranslated(644,2,-1) & "|" & _
GetTranslated(644,3,-1) & $txtPriorityConnector & GetTranslated(644,1,-1) & $txtPriorityConnector & GetTranslated(644,2,-1) & "|" & _
GetTranslated(644,3,-1) & $txtPriorityConnector & GetTranslated(644,2,-1) & $txtPriorityConnector & GetTranslated(644,1,-1) & "|" & _
GetTranslated(644, 2, -1) & $txtPriorityConnector & GetTranslated(644, 1, -1) & $txtPriorityConnector & GetTranslated(644, 3, -1) & "|" & _
GetTranslated(644, 2, -1) & $txtPriorityConnector & GetTranslated(644, 3, -1) & $txtPriorityConnector & GetTranslated(644, 1, -1) & "|" & _
GetTranslated(644, 1, -1) & $txtPriorityConnector & GetTranslated(644, 2, -1) & $txtPriorityConnector & GetTranslated(644, 3, -1) & "|" & _
GetTranslated(644, 1, -1) & $txtPriorityConnector & GetTranslated(644, 3, -1) & $txtPriorityConnector & GetTranslated(644, 2, -1) & "|" & _
GetTranslated(644, 3, -1) & $txtPriorityConnector & GetTranslated(644, 1, -1) & $txtPriorityConnector & GetTranslated(644, 2, -1) & "|" & _
GetTranslated(644, 3, -1) & $txtPriorityConnector & GetTranslated(644, 2, -1) & $txtPriorityConnector & GetTranslated(644, 1, -1) & "|" & _
""
If $g_iDebugSetlog = 1 Then Setlog($txtPriorityDefault)
If $g_iDebugSetlog = 1 Then Setlog($txtPriorityList)
Expand Down
10 changes: 5 additions & 5 deletions COCBot/GUI/MBR GUI Design Child Attack - Troops.au3
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,20 @@ Func CreateTroopsSpellsSubTab()
$g_hChkUseQuickTrain = GUICtrlCreateCheckbox(GetTranslated(621, 34, "Use Quick Train"), $x + 15, $y + 19, -1, 15)
GUICtrlSetState(-1, $GUI_UNCHECKED)
GUICtrlSetOnEvent(-1, "chkUseQTrain")
$g_hRdoArmy1 = GUICtrlCreateRadio(GetTranslated(621, 37, "Army 1"), $x + 120, $y + 20, 50, 15)
$g_hRdoArmy1 = GUICtrlCreateRadio(GetTranslated(621, 37, "Army 1"), $x + 120, $y + 20, 57, 15)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetState(-1, $GUI_CHECKED)
$g_hRdoArmy2 = GUICtrlCreateRadio(GetTranslated(621, 38, "Army 2"), $x + 180, $y + 20, 50, 15)
$g_hRdoArmy2 = GUICtrlCreateRadio(GetTranslated(621, 38, "Army 2"), $x + 185, $y + 20, 57, 15)
GUICtrlSetState(-1, $GUI_DISABLE)
$g_hRdoArmy3 = GUICtrlCreateRadio(GetTranslated(621, 39, "Army 3"), $x + 240, $y + 20, 50, 15)
$g_hRdoArmy3 = GUICtrlCreateRadio(GetTranslated(621, 39, "Army 3"), $x + 250, $y + 20, 57, 15)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateLabel(GetTranslated(621, 41, "Remove Army"), $x + 335, $y + 20, -1, 15, $SS_LEFT)
GUICtrlCreateIcon($g_sLibIconPath, $eIcnResetButton, $x + 405, $y + 17, 24, 24)
GUICtrlSetOnEvent(-1, "Removecamp")

$x = 10
$y = 45
$g_hGrpTrainTroops = GUICtrlCreateGroup(GetTranslated(1000, 1, "Train Troops"), $x - 5, $y, $g_iSizeWGrpTab3, 195)
$g_hGrpTrainTroops = GUICtrlCreateGroup(GetTranslated(621, 43, "Train Troops"), $x - 5, $y, $g_iSizeWGrpTab3, 195)

$x = 30
$y += 20
Expand Down Expand Up @@ -442,7 +442,7 @@ Func CreateTroopsSpellsSubTab()

$x = 10
$y = 240
$g_hGrpCookSpell = GUICtrlCreateGroup(GetTranslated(1000, 2, "Brew Spells"), $x - 5, $y, $g_iSizeWGrpTab3, 123)
$g_hGrpCookSpell = GUICtrlCreateGroup(GetTranslated(621, 44, "Brew Spells"), $x - 5, $y, $g_iSizeWGrpTab3, 123)
$x += 20
$y += 17
GUICtrlCreateLabel(GetTranslated(622, 2, "Spell Capacity") & " :", $x - 15, $y, -1, -1, $SS_RIGHT)
Expand Down
4 changes: 2 additions & 2 deletions COCBot/GUI/MBR GUI Design Child Bot - Android.au3
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Global $g_hCmbCOCDistributors

Func CreateBotAndroid()
Local $x = 25, $y = 45
GUICtrlCreateGroup(GetTranslated(643,1, "Distributors"), $x - 20, $y - 20, $g_iSizeWGrpTab2, $g_iSizeHGrpTab2)
GUICtrlCreateGroup(GetTranslated(642, 1, "Distributors"), $x - 20, $y - 20, $g_iSizeWGrpTab2, $g_iSizeHGrpTab2)
$y -=2
$g_hCmbCOCDistributors = GUICtrlCreateCombo("", $x - 8 , $y, 185, -1, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
_GUICtrlSetTip(-1, GetTranslated(643,2, "Allow bot to launch COC based on the distribution chosen"))
_GUICtrlSetTip(-1, GetTranslated(642, 2, "Allow bot to launch COC based on the distribution chosen"))
LoadCOCDistributorsComboBox()
SetCurSelCmbCOCDistributors()
GUICtrlSetOnEvent(-1, "cmbCOCDistributors")
Expand Down
1 change: 1 addition & 0 deletions COCBot/MBR GUI Control.au3
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ Func CheckBotShrinkExpandButton($bCheckOnlyParent = False)
EndFunc

Func BotShrinkExpandToggle()
If $g_hFrmBotButtons = 0 Then Return False
If $g_bAndroidEmbedded = False Then
SetDebugLog("BotShrinkExpandToggle: Android not docked")
Return False
Expand Down
7 changes: 3 additions & 4 deletions COCBot/MBR GUI Design.au3
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ Func CreateMainGUIControls()
GUICtrlCreateLabel("", 0, 0, $_GUI_MAIN_WIDTH, $_GUI_MAIN_TOP)
GUICtrlSetOnEvent(-1, "BotMoveRequest")
GUICtrlSetBkColor(-1, $COLOR_WHITE)
WinMove2($g_hFrmBotButtons, "", -1, $_GUI_MAIN_HEIGHT * -1, -1, 0, 0, False)
Else
; align title bar with logo
Local $iTitleX = 25
Expand Down Expand Up @@ -348,7 +347,7 @@ Func ShowMainGUI()
EndIf

GUISetState(@SW_SHOWNOACTIVATE, $g_hFrmBotButtons)
GUISetState(@SW_SHOWNOACTIVATE, $g_hFrmBotEx)
If $g_hFrmBotEx Then GUISetState(@SW_SHOWNOACTIVATE, $g_hFrmBotEx)
GUISetState(@SW_SHOWNOACTIVATE, $g_hFrmBotBottom)
CheckBotShrinkExpandButton()

Expand Down Expand Up @@ -403,9 +402,9 @@ Func CheckDpiAwareness($bCheckOnlyIfAlreadyAware = False, $bForceDpiAware = Fals
If $g_bCustomTitleBarActive = False Then
; Default Windows Title Bar changes height
Local $g_iDpiAwarenessYcomp = _WinAPI_GetSystemMetrics($SM_CYCAPTION)
Local $aResult = DllCall("user32.dll", "boolean", "SetProcessDPIAware")
$g_aFrmBotPosInit[7] = _WinAPI_GetSystemMetrics($SM_CYCAPTION) - $g_iDpiAwarenessYcomp
Local $aResult = SetDebugLog("Enabled DPI Awareness, height compensation: " & $g_aFrmBotPosInit[7])
DllCall("user32.dll", "boolean", "SetProcessDPIAware")
SetDebugLog("Enabled DPI Awareness, height compensation: " & $g_aFrmBotPosInit[7])
;DllCall("user32.dll", "dword", "SetProcessDpiAwareness", "dword", 0)
Else
; custom Custom Title Bar
Expand Down
4 changes: 2 additions & 2 deletions COCBot/functions/Android/Distributors.au3
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Global $g_sNO_COC, $g_sUNKNOWN_COC
Global $_g_asDISTRIBUTORS[19][4]

Func InitializeCOCDistributors() ;initialized in InitializeMBR() after language is detected
$g_sNO_COC = "<" & GetTranslated(642, 1, "No COC") & ">"
$g_sUNKNOWN_COC = "<" & GetTranslated(642, 2, "Unknown COC") & ">"
$g_sNO_COC = "<" & GetTranslated(642, 9, "No COC") & ">"
$g_sUNKNOWN_COC = "<" & GetTranslated(642, 10, "Unknown COC") & ">"

Dim $_g_asDISTRIBUTORS[19][4] = [ _
["Google", "com.supercell.clashofclans", "com.supercell.clashofclans.GameApp", GetTranslated(642, 11, "Google")], _
Expand Down
89 changes: 33 additions & 56 deletions Languages/English.ini
Original file line number Diff line number Diff line change
Expand Up @@ -994,23 +994,8 @@ DisplayName=English
40=Mouse Left Click to Up level\r\nShift + Mouse Left Click to Down level
41=Remove Army
42=Force Brew Spells
200=Training Idle Time
201=Close While Training
202=Option will close CoC app for time required to complete troop training
203=Spell Creation
204=Option will close CoC for training time needed to complete spell cooking
205=Hero Healing
206=Option will close CoC for training time neaded for Hero Regen, Requires wait for hero enabled!
207=Close Emulator
208=Option will close Android Emulator while waiting for troops to train!
209=Use Exact Time
210=Select to wait exact time required for troops to complete training
211=Add Random Time
212=Select to ADD a random extra wait time like human who forgets to clash
213=Enter maximum percentage of additional time to be used creating random wait times,
214=Bot will compute a random wait time between exact time needed, and
215=exact time plus random percent to appear more human
220=Select how much time to wait when feature enables
43=Train Troops
44=Brew Spells

[622]
622=***Section use for Tab Spells***
Expand Down Expand Up @@ -1695,6 +1680,33 @@ DisplayName=English
12=%s already exists.\r\nPlease choose another name for your profile.
14=Are you sure you really want to delete the profile?\r\nThis action can not be undone.
[638]
638=***Section use for SmartZap***
1=SmartZap/NoobZap
2=Use This Spell to Zap Dark Drills
3=Use LSpells
12=This will only SmartZap a Dead Base (Recommended)
4=Check this to drop Lightning Spells on top of Dark Elixir Drills.
5=Remember to go to the tab 'troops' and put the maximum capacity
6=of your spell factory and the number of spells so that the bot can function perfectly.
7=Use EQSpell
8=Check this to drop EarthQuake Castle Spell on any Dark Elixir Drill
9=Use NoobZap
10=Check this to drop lightning spells on any Dark Elixir Drills
11=Only Zap Drills in Dead Bases
13=TH Snipe Not Zap if Heroes Deployed
14=This will stop SmartZap from zapping a base on a Town Hall Snipe if your Heroes were deployed
15=Min. amount of Dark Elixir
16=Set the Value of the minimum amount of Dark Elixir in the Drills
17=Expected gain of Dark Drills
18=Set value for expected gain every dark drill
19=NoobZap will be stopped if the last zap gained less DE than expected
20=Amount of used lightning spells
21=Amount of used EarthQuake Spell
22=Number of dark elixir zapped during the attack with lightning and EarthQuake spell
23=Debug SmartZap
24=Use it to debug SmartZap
[640]
640=***Section use for all Popups***
1=Ok|Cancel
Expand Down Expand Up @@ -1825,11 +1837,12 @@ DisplayName=English
45=Push button to remove all troops from list and start over
46=When not all troop slots are filled, will use random troop order in empty slots!
[642]
642=***Section use for Distributors***
1=No COC
2=Unknown COC
1=Distributors
2=Allow bot to launch COC based on the distribution chosen
9=No COC
10=Unknown COC
11=Google
12=Kunlun
13=Qihoo
Expand All @@ -1850,44 +1863,8 @@ DisplayName=English
28=Yeshen
29=Aiyouxi
[643]
643=***Section use for Tab Bot Android***
1=Distributors
2=Allow bot to launch COC based on the distribution chosen
[644]
644=***Section use for Hero***
1=King
2=Queen
3=G.Warden
[1000]
1=Train Troops
2=Brew Spells
3=Train Options | Times | Costs
[638]
1=SmartZap/NoobZap
2=Use This Spell to Zap Dark Drills
3=Use LSpells
12=This will only SmartZap a Dead Base (Recommended)
4=Check this to drop Lightning Spells on top of Dark Elixir Drills.
5=Remember to go to the tab 'troops' and put the maximum capacity
6=of your spell factory and the number of spells so that the bot can function perfectly.
7=Use EQSpell
8=Check this to drop EarthQuake Castle Spell on any Dark Elixir Drill
9=Use NoobZap
10=Check this to drop lightning spells on any Dark Elixir Drills
11=Only Zap Drills in Dead Bases
13=TH Snipe Not Zap if Heroes Deployed
14=This will stop SmartZap from zapping a base on a Town Hall Snipe if your Heroes were deployed
15=Min. amount of Dark Elixir
16=Set the Value of the minimum amount of Dark Elixir in the Drills
17=Expected gain of Dark Drills
18=Set value for expected gain every dark drill
19=NoobZap will be stopped if the last zap gained less DE than expected
20=Amount of used lightning spells
21=Amount of used EarthQuake Spell
22=Number of dark elixir zapped during the attack with lightning and EarthQuake spell
23=Debug SmartZap
24=Use it to debug SmartZap
Binary file modified MyBot.run.Watchdog.exe
Binary file not shown.
Binary file modified MyBot.run.Wmi.exe
Binary file not shown.
6 changes: 3 additions & 3 deletions MyBot.run.au3
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
#pragma compile(Icon, "Images\MyBot.ico")
#pragma compile(FileDescription, Clash of Clans Bot - A Free Clash of Clans bot - https://mybot.run)
#pragma compile(ProductName, My Bot)
#pragma compile(ProductVersion, 7.1)
#pragma compile(FileVersion, 7.1)
#pragma compile(ProductVersion, 7.1.1)
#pragma compile(FileVersion, 7.1.1)
#pragma compile(LegalCopyright, © https://mybot.run)
#pragma compile(Out, MyBot.run.exe) ; Required

; Enforce variable declarations
Opt("MustDeclareVars", 1)

Global $g_sBotVersion = "v7.1" ;~ Don't add more here, but below. Version can't be longer than vX.y.z because it is also use on Checkversion()
Global $g_sBotVersion = "v7.1.1" ;~ Don't add more here, but below. Version can't be longer than vX.y.z because it is also use on Checkversion()
Global $g_sBotTitle = "" ;~ Don't assign any title here, use Func UpdateBotTitle()
Global $g_hFrmBot = 0 ; The main GUI window

Expand Down
Binary file modified MyBot.run.exe
Binary file not shown.

0 comments on commit 86a611f

Please sign in to comment.