Skip to content

Commit 7c84bbf

Browse files
committed
* **V7.4.2**
* Fix BlueStacks2 reboot loop due to DPI=160 not correctly set in registry * Fix "No upgrade here... Wrong click.." auto upgrade error
1 parent b5b56e0 commit 7c84bbf

13 files changed

Lines changed: 29 additions & 14 deletions

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* **V7.4.2**
2+
* Fix BlueStacks2 reboot loop due to DPI=160 not correctly set in registry
3+
* Fix "No upgrade here... Wrong click.." auto upgrade error
4+
15
* **V7.4.1**
26
* Fix BlueStacks reboot loop due to DPI=160 not correctly set in registry
37

COCBot/functions/Android/AndroidBlueStacks.au3

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,11 @@ Func SetScreenBlueStacks2()
449449
$REGISTRY_KEY_DIRECTORY = $g_sHKLM & "\SOFTWARE\BlueStacks\Guests\" & $g_sAndroidInstance
450450
Local $BootParameter = RegRead($REGISTRY_KEY_DIRECTORY, "BootParameters")
451451
$BootParameter = StringRegExpReplace($BootParameter, "DPI=\d+", "DPI=160")
452-
If @error = 0 Then
452+
If @error = 0 And @extended > 0 Then
453453
RegWrite($REGISTRY_KEY_DIRECTORY, "BootParameters", "REG_SZ", $BootParameter)
454+
Else
455+
; DPI=160 was missing
456+
RegWrite($REGISTRY_KEY_DIRECTORY, "BootParameters", "REG_SZ", $BootParameter & " DPI=160")
454457
EndIf
455458
EndFunc ;==>SetScreenBlueStacks2
456459

COCBot/functions/Config/DelayTimes.au3

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,9 @@ Global Const $g_iQuickTrainButtonRetryDelay = 1000
304304
Global Const $DELAYISTRAINPAGE1 = 100
305305
Global Const $DELAYISTRAINPAGE2 = 1000
306306

307+
;AutoUpgradeBuilding
308+
Global Const $DELAYAUTOUPGRADEBUILDING1 = 1000
309+
307310
;UpgradeBuilding
308311
Global Const $DELAYUPGRADEBUILDING1 = 200
309312
Global Const $DELAYUPGRADEBUILDING2 = 500

COCBot/functions/Image Search/QuickMIS.au3

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Func QuickMIS($ValueReturned, $directory, $Left = 0, $Top = 0, $Right = $g_iGAME
2222
If $bNeedCapture Then _CaptureRegion2($Left, $Top, $Right, $Bottom)
2323
Local $Res = DllCallMyBot("SearchMultipleTilesBetweenLevels", "handle", $g_hHBitmap2, "str", $directory, "str", "FV", "Int", 0, "str", "FV", "Int", 0, "Int", 1000)
2424
If @error Then _logErrorDLLCall($g_sLibMyBotPath, @error)
25+
If $g_bDebugImageSave Then DebugImageSave("QuickMIS_" & $ValueReturned, False)
2526

2627
If IsArray($Res) Then
2728
If $Debug Then _ArrayDisplay($Res)

COCBot/functions/Village/Auto Upgrade.au3

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Func _AutoUpgrade()
4141
If $iLoopAmount >= $iLoopMax Or $iLoopAmount >= 12 Then ExitLoop ; 6 loops max, to avoid infinite loop
4242

4343
ClickP($aAway, 1, 0, "#0000") ;Click Away
44-
randomSleep(1000)
44+
randomSleep($DELAYAUTOUPGRADEBUILDING1)
4545
VillageReport()
4646

4747
If $g_iFreeBuilderCount < 1 Then
@@ -63,7 +63,7 @@ Func _AutoUpgrade()
6363

6464
; open the builders menu
6565
Click(295, 30)
66-
If _Sleep(1000) Then Return
66+
If _Sleep($DELAYAUTOUPGRADEBUILDING1) Then Return
6767

6868
; search for 000 in builders menu, if 000 found, a possible upgrade is available
6969
If QuickMIS("BC1", $g_sImgAUpgradeZero, 180, 80 + $g_iNextLineOffset, 480, 350) Then
@@ -83,7 +83,7 @@ Func _AutoUpgrade()
8383

8484
; if it's an upgrade, will click on the upgrade, in builders menu
8585
Click(180 + $g_iQuickMISX, 80 + $g_iCurrentLineOffset)
86-
If _Sleep(500) Then Return
86+
If _Sleep($DELAYAUTOUPGRADEBUILDING1) Then Return
8787

8888
; check if any wrong click by verifying the presence of the Upgrade button (the hammer)
8989
If Not QuickMIS("BC1", $g_sImgAUpgradeUpgradeBtn, 120, 630, 740, 670) Then
@@ -141,7 +141,7 @@ Func _AutoUpgrade()
141141

142142
; if upgrade don't have to be ignored, click on the Upgrade button to open Upgrade window
143143
Click(120 + $g_iQuickMISX, 630 + $g_iQuickMISY)
144-
If _Sleep(1000) Then Return
144+
If _Sleep($DELAYAUTOUPGRADEBUILDING1) Then Return
145145

146146
Switch $g_aUpgradeNameLevel[1]
147147
Case "Barbarian King", "Archer Queen", "Grand Warden"

MyBot.run.MiniGui.exe

0 Bytes
Binary file not shown.

MyBot.run.MiniGui_stripped.au3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#pragma compile(LegalCopyright, © https://mybot.run)
1010
#Au3Stripper_Off
1111
#Au3Stripper_On
12-
Global $g_sBotVersion = "v7.4.1"
12+
Global $g_sBotVersion = "v7.4.2"
1313
Opt("MustDeclareVars", 1)
1414
Global $g_sBotTitle = ""
1515
Global $g_hFrmBot = 0

MyBot.run.Watchdog.exe

0 Bytes
Binary file not shown.

MyBot.run.Watchdog_stripped.au3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#pragma compile(LegalCopyright, © https://mybot.run)
1010
#Au3Stripper_Off
1111
#Au3Stripper_On
12-
Global $g_sBotVersion = "v7.4.1"
12+
Global $g_sBotVersion = "v7.4.2"
1313
Opt("MustDeclareVars", 1)
1414
Global Const $WAIT_TIMEOUT = 258
1515
Global Const $STDERR_MERGED = 8

MyBot.run.Wmi.exe

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)