Skip to content

Commit

Permalink
* **V7.7.3**
Browse files Browse the repository at this point in the history
* Added Telegram notification when the lab is idle by @mitzu2250
* Added Google Play Services button under Bot/Android Play Store to manually install/update Google Play Services
* Added conditions "TH", "SIEGE" and "TH+SIEGE" to csv WAIT command, to break the wait early thx @Fahid.Mahmood for the inspiration
*       see CSV HowTo Guide or Max-Human-Like TH12 LavaLoonion.csv for usage
* Added Bot/Android "Update shared_prefs" option to always push and pull shared_prefs to reset zoom, set language to English, disable snow and rate popup
* Fixed forum authentication crashing the bot with FileNotFoundException (as reported in Windows Event Log)
* Fixed forum authentication http error 500
* Fixed forum authentication interfering with watch dog
* Fixed forum authentication due to windows permissions, saving .mybot.run.authentication file now in @AppDataDir (existing will be moved)
* Fixed shared_prefs pull/push due to windows permissions, saving now in @AppDataDir\MyBot.run-Profiles (existing will be moved)
* Fixed CSV attack with 11+ slots in attackbar
* Fixed Telegram push for Smart Wait Time by @mitzu2250
* Fixed Clangames "Caravan is not available"
* Fixed minitouch click and click&drag for BlueStacks 4
* Fixed KOPLAYER "device offline" problem
* Fixed MEmu and BlueStacks CoC crashing when using home button or polite close
* Fixed Nox DirectX mode for versions 3.3.0 - 6.2.0 ("Unsupported Nox screen size of 864 x 36" or similar)
* Fixed Nox "Nox unsupported Graphics Engine Type" log message
* Fixed Nox shared folder detection and disabled VM is running check (as it might not work)
* Fixed missing shared folder by adding configuration to instance
* Fixed docked mode manual mouse double click (fixed also mouse device issues for MEmu and LeapDroid)
* Fixed LeapDroid and iTools version identification
* Fixed check obstables not restarting CoC due to recursion
* Improved running different Android Emulator by replacing emulator provided adb.exe with MyBot.run version
  • Loading branch information
cosote committed Mar 22, 2019
1 parent 55d00c4 commit 4215277
Show file tree
Hide file tree
Showing 73 changed files with 2,037 additions and 800 deletions.
28 changes: 27 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
* **V7.7.2**
* **V7.7.3**
* Added Telegram notification when the lab is idle by @mitzu2250
* Added Google Play Services button under Bot/Android Play Store to manually install/update Google Play Services
* Added conditions "TH", "SIEGE" and "TH+SIEGE" to csv WAIT command, to break the wait early thx @Fahid.Mahmood for the inspiration
* see CSV HowTo Guide or Max-Human-Like TH12 LavaLoonion.csv for usage
* Added Bot/Android "Update shared_prefs" option to always push and pull shared_prefs to reset zoom, set language to English, disable snow and rate popup
* Fixed forum authentication crashing the bot with FileNotFoundException (as reported in Windows Event Log)
* Fixed forum authentication http error 500
* Fixed forum authentication interfering with watch dog
* Fixed forum authentication due to windows permissions, saving .mybot.run.authentication file now in @AppDataDir (existing will be moved)
* Fixed shared_prefs pull/push due to windows permissions, saving now in @AppDataDir\MyBot.run-Profiles (existing will be moved)
* Fixed CSV attack with 11+ slots in attackbar
* Fixed Telegram push for Smart Wait Time by @mitzu2250
* Fixed Clangames "Caravan is not available"
* Fixed minitouch click and click&drag for BlueStacks 4
* Fixed KOPLAYER "device offline" problem
* Fixed MEmu and BlueStacks CoC crashing when using home button or polite close
* Fixed Nox DirectX mode for versions 3.3.0 - 6.2.0 ("Unsupported Nox screen size of 864 x 36" or similar)
* Fixed Nox "Nox unsupported Graphics Engine Type" log message
* Fixed Nox shared folder detection and disabled VM is running check (as it might not work)
* Fixed missing shared folder by adding configuration to instance
* Fixed docked mode manual mouse double click (fixed also mouse device issues for MEmu and LeapDroid)
* Fixed LeapDroid and iTools version identification
* Fixed check obstables not restarting CoC due to recursion
* Improved running different Android Emulator by replacing emulator provided adb.exe with MyBot.run version

* **V7.7.2**
* Fixed forum authentication with non ansi characters like Hindi, Cyrillic or Asian
* Fixed incorrect share folder detection when permission denied ocurres
* Fixed removal of "Zone.Identifier" for files in lib\adb and lib\curl folders
Expand Down
2 changes: 2 additions & 0 deletions COCBot/GUI/MBR GUI Control Notify.au3
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Func chkPBTGenabled()
GUICtrlSetState($g_hChkNotifyAlertBAN, $GUI_ENABLE)
GUICtrlSetState($g_hChkNotifyBOTUpdate, $GUI_ENABLE)
GUICtrlSetState($g_hChkNotifyAlertSmartWaitTime, $GUI_ENABLE)
GUICtrlSetState($g_hChkNotifyAlertLaboratoryIdle, $GUI_ENABLE)
Else
GUICtrlSetState($g_hChkNotifyRemote, $GUI_DISABLE)
GUICtrlSetState($g_hTxtNotifyOrigin, $GUI_DISABLE)
Expand All @@ -60,6 +61,7 @@ Func chkPBTGenabled()
GUICtrlSetState($g_hChkNotifyAlertBAN, $GUI_DISABLE)
GUICtrlSetState($g_hChkNotifyBOTUpdate, $GUI_DISABLE)
GUICtrlSetState($g_hChkNotifyAlertSmartWaitTime, $GUI_DISABLE)
GUICtrlSetState($g_hChkNotifyAlertLaboratoryIdle, $GUI_DISABLE)
EndIf
EndFunc ;==>chkPBTGenabled

Expand Down
15 changes: 10 additions & 5 deletions COCBot/GUI/MBR GUI Control Splash.au3
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,16 @@ Func UpdateSplashTitle($title)
GUICtrlSetData($g_lSplashTitle, $title)
EndFunc ;==>UpdateSplashTitle

Func DestroySplashScreen()
If IsHWnd($g_hSplash) Then GUIDelete($g_hSplash)
; allow now other bots to launch
ReleaseMutex($g_hSplashMutex)
$g_hSplashMutex = 0
Func DestroySplashScreen($bReleaseMutex = True)
If $g_hSplash And IsHWnd($g_hSplash) Then
GUIDelete($g_hSplash)
$g_hSplash = 0
EndIf
If $bReleaseMutex Then
; allow now other bots to launch
ReleaseMutex($g_hSplashMutex)
$g_hSplashMutex = 0
EndIf
EndFunc ;==>DestroySplashScreen

Func MoveSplashScreen()
Expand Down
23 changes: 15 additions & 8 deletions COCBot/GUI/MBR GUI Design Child Bot - Android.au3
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

Global $g_hCmbCOCDistributors = 0, $g_hCmbAndroidBackgroundMode = 0, $g_hCmbAndroidZoomoutMode = 0, $g_hCmbSuspendAndroid = 0, $g_hChkAndroidAdbClick = 0, _
$g_hChkAndroidAdbClickDragScript = 0, $g_hBtnAndroidAdbShell = 0, $g_hBtnAndroidHome = 0, $g_hBtnAndroidBack = 0, $g_hTxtAndroidRebootHours = 0, _
$g_hChkAndroidCloseWithBot = 0, $g_hBtnAndroidEnableTouch = 0, $g_hBtnAndroidDisableTouch = 0, $g_lblHelpBot = 0
$g_hChkAndroidCloseWithBot = 0, $g_hChkUpdateSharedPrefs = 0, $g_hBtnAndroidEnableTouch = 0, $g_hBtnAndroidDisableTouch = 0, $g_lblHelpBot = 0

Func CreateBotAndroid()

Expand Down Expand Up @@ -61,13 +61,17 @@ Func CreateBotAndroid()
GUICtrlSetState(-1, (($g_bAndroidCloseWithBot) ? ($GUI_CHECKED) : ($GUI_UNCHECKED)))

$y += 25
GUICtrlCreateLabel(GetTranslatedFileIni("Android", "LblAndroidRebootHours", "Reboot Android in") & ":", $x + 17, $y + 2, -1, -1)
$g_hChkUpdateSharedPrefs = GUICtrlCreateCheckbox(GetTranslatedFileIni("Android", "ChkUpdateSharedPrefs", "Update shared_prefs"), $x, $y, -1, -1)
_GUICtrlSetTip(-1, GetTranslatedFileIni("Android", "ChkUpdateSharedPrefs_Info", "Pull and push shared_prefs to reset zoom,\nset language to English, disable snow and rate popup."))
GUICtrlSetState(-1, (($g_bUpdateSharedPrefs) ? ($GUI_CHECKED) : ($GUI_UNCHECKED)))

GUICtrlCreateLabel(GetTranslatedFileIni("Android", "LblAndroidRebootHours", "Reboot Android in") & ":", $x + 217, $y + 2, -1, -1)
$sTxtTip = GetTranslatedFileIni("Android", "LblAndroidRebootHours_Info", "Enter hours when Android will be automatically rebooted after specified run-time.")
_GUICtrlSetTip(-1, $sTxtTip)
$g_hTxtAndroidRebootHours = GUICtrlCreateInput($g_iAndroidRebootHours, $x + 177, $y + 1, 30, 16, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER))
$g_hTxtAndroidRebootHours = GUICtrlCreateInput($g_iAndroidRebootHours, $x + 327, $y + 1, 30, 16, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER))
_GUICtrlSetTip(-1, $sTxtTip)
GUICtrlSetLimit(-1, 4)
GUICtrlCreateLabel(GetTranslatedFileIni("MBR Global GUI Design", "hrs", -1), $x + 212, $y + 2, -1, -1)
GUICtrlCreateLabel(GetTranslatedFileIni("MBR Global GUI Design", "hrs", -1), $x + 362, $y + 2, -1, -1)
GUICtrlCreateGroup("", -99, -99, 1, 1)

$y = $y2 + $h + 5
Expand Down Expand Up @@ -106,14 +110,17 @@ Func CreateBotAndroid()
;$x = 25 + $g_iSizeWGrpTab2 - 2 - 10 - $w
$x = 25 + 240 + 10 + 30
$y = $y2
$w = 125
$h = 80
$w = 145
$h = 110
GUICtrlCreateGroup(GetTranslatedFileIni("Android Control", "Group_04", "Install Play Store Apps"), $x - 20, $y - 20, $w, $h)
$y -= 2
GUICtrlCreateButton(GetTranslatedFileIni("Android Control", "BtnPlayStoreGame", "Clash of Clans"), $x - 8, $y, 100, 25)
GUICtrlCreateButton(GetTranslatedFileIni("Android Control", "BtnPlayStoreGame", "Clash of Clans"), $x - 8, $y, $w - 24, 25)
GUICtrlSetOnEvent(-1, "OpenPlayStoreGame")
$y += 30
GUICtrlCreateButton(GetTranslatedFileIni("Android Control", "BtnPlayStoreNovaLauncher", "Nova Launcher"), $x - 8, $y, 100, 25)
GUICtrlCreateButton(GetTranslatedFileIni("Android Control", "BtnPlayStoreGooglePlayServices", "Google Play Services"), $x - 8, $y, $w - 24, 25)
GUICtrlSetOnEvent(-1, "OpenPlayStoreGooglePlayServices")
$y += 30
GUICtrlCreateButton(GetTranslatedFileIni("Android Control", "BtnPlayStoreNovaLauncher", "Nova Launcher"), $x - 8, $y, $w - 24, 25)
GUICtrlSetOnEvent(-1, "OpenPlayStoreNovaLauncher")
GUICtrlCreateGroup("", -99, -99, 1, 1)

Expand Down
5 changes: 4 additions & 1 deletion COCBot/GUI/MBR GUI Design Child Village - Notify.au3
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Global $g_hChkNotifyRemote = 0, $g_hTxtNotifyOrigin = 0
Global $g_hChkNotifyAlertMatchFound = 0, $g_hChkNotifyAlertLastRaidIMG = 0, $g_hChkNotifyAlertLastRaidTXT = 0, $g_hChkNotifyAlertCampFull = 0, _
$g_hChkNotifyAlertUpgradeWall = 0, $g_hChkNotifyAlertOutOfSync = 0, $g_hChkNotifyAlertTakeBreak = 0, $g_hChkNotifyAlertBuilderIdle = 0, _
$g_hChkNotifyAlertVillageStats = 0, $g_hChkNotifyAlertLastAttack = 0, $g_hChkNotifyAlertAnotherDevice = 0, $g_hChkNotifyAlertMaintenance = 0, _
$g_hChkNotifyAlertBAN = 0, $g_hChkNotifyBOTUpdate = 0, $g_hChkNotifyAlertSmartWaitTime = 0
$g_hChkNotifyAlertBAN = 0, $g_hChkNotifyBOTUpdate = 0, $g_hChkNotifyAlertSmartWaitTime = 0, $g_hChkNotifyAlertLaboratoryIdle = 0

Global $g_hChkNotifyOnlyHours = 0, $g_hChkNotifyOnlyWeekDays = 0, $g_hChkNotifyhours[24] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], _
$g_hChkNotifyWeekdays[7] = [0, 0, 0, 0, 0, 0, 0]
Expand Down Expand Up @@ -127,6 +127,9 @@ Func CreatePushBulletTelegramSubTab()
$g_hChkNotifyBOTUpdate = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Village - Notify", "ChkNotifyBOTUpdate", "BOT Update"), $x + 210, $y, -1, -1)
_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR GUI Design Child Village - Notify", "ChkNotifyBOTUpdate_Info_01", "Send an Alert when there is a new version of the bot."))
GUICtrlSetState(-1, $GUI_DISABLE)
$g_hChkNotifyAlertLaboratoryIdle = GUICtrlCreateCheckbox(GetTranslatedFileIni("MBR GUI Design Child Village - Notify", "ChkNotifyAlertLaboratoryIdle", "Laboratory Idle"), $x + 315, $y, -1, -1)
_GUICtrlSetTip(-1, GetTranslatedFileIni("MBR GUI Design Child Village - Notify", "ChkNotifyAlertLaboratoryIdle_Info_01", "Send an Alert when the laboratory is idle."))
GUICtrlSetState(-1, $GUI_DISABLE)
$y += 20
; TODO

Expand Down
6 changes: 5 additions & 1 deletion COCBot/GUI/MBR GUI Design Splash.au3
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ Func CreateSplashScreen($iSteps = Default)
GUICtrlSetOnEvent(-1, "MoveSplashScreen")
$g_hSplashProgress = GUICtrlCreateProgress(15, $iY + $iT + $iB + 20, $iX - 30, 10, $PBS_SMOOTH, BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE, $WS_EX_TOOLWINDOW)) ; Splash Progress
$g_lSplashStatus = GUICtrlCreateLabel(GetTranslatedFileIni("MBR GUI Design - Loading", "SplashStep_Loading", "Loading..."), 15, $iY + $iT + $iB + 38, $iX - 30, 15, $SS_CENTER) ; Splash Title
GUICtrlSetOnEvent(-1, "MoveSplashScreen")
Else
$g_lSplashTitle = 0
$g_hSplashProgress = 0
$g_lSplashStatus = 0
EndIf
GUICtrlSetOnEvent(-1, "MoveSplashScreen")

; Cleanup GDI resources
_GDIPlus_BitmapDispose($hSplashImg)
Expand Down
22 changes: 15 additions & 7 deletions COCBot/MBR GUI Action.au3
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@

Func BotStart($bAutostartDelay = 0)
FuncEnter(BotStart)

If Not $g_bSearchMode Then
If $g_hLogFile = 0 Then CreateLogFile() ; only create new log file when doesn't exist yet
CreateAttackLogFile()
If $g_iFirstRun = -1 Then $g_iFirstRun = 1
EndIf
SetLogCentered(" BOT LOG ", Default, Default, True)

If Not ForumAuthentication() Then
; not authenticated exit now, but restore controls first
EnableControls($g_hFrmBotBottom, Default, $g_aFrmBotBottomCtrlState)
SetRedrawBotWindow(True, Default, Default, Default, "BotStart")
Return FuncReturn()
EndIf

ResumeAndroid()
CleanSecureFiles()
CalCostCamp()
Expand All @@ -36,13 +51,6 @@ Func BotStart($bAutostartDelay = 0)
$g_bIsClientSyncError = False
$g_bDisableBreakCheck = False ; reset flag to check for early warning message when bot start/restart in case user stopped in middle

If Not $g_bSearchMode Then
If $g_hLogFile = 0 Then CreateLogFile() ; only create new log file when doesn't exist yet
CreateAttackLogFile()
If $g_iFirstRun = -1 Then $g_iFirstRun = 1
EndIf
SetLogCentered(" BOT LOG ", Default, Default, True)

SaveConfig()
readConfig()
applyConfig(False) ; bot window redraw stays disabled!
Expand Down
9 changes: 7 additions & 2 deletions COCBot/MBR GUI Control.au3
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Func GUIControl_WM_MOUSE($hWin, $iMsg, $wParam, $lParam)
EndIf

Switch $iMsg
Case $WM_LBUTTONDOWN, $WM_LBUTTONUP, $WM_RBUTTONDOWN, $WM_RBUTTONUP
Case $WM_LBUTTONDOWN, $WM_LBUTTONUP, $WM_RBUTTONDOWN, $WM_RBUTTONUP, $WM_LBUTTONDBLCLK
; ensure text box still has focus
Local $hInput = GUICtrlGetHandle($g_hFrmBotEmbeddedShieldInput)
_WinAPI_SetFocus($hInput)
Expand All @@ -339,6 +339,11 @@ Func GUIControl_WM_MOUSE($hWin, $iMsg, $wParam, $lParam)
Local $c = GetPixelFromWindow($x, $y, $g_hAndroidControl)
SetLog(StringFormat("Mouse LBUTTONDOWN %03i,%03i Color %s", $x, $y, $c), $COLOR_DEBUG)
EndIf
Case $WM_LBUTTONDBLCLK
If $g_bDebugClick And AndroidShieldHasFocus() Then
Local $c = GetPixelFromWindow($x, $y, $g_hAndroidControl)
SetLog(StringFormat("Mouse LBUTTONDBLCLK %03i,%03i Color %s", $x, $y, $c), $COLOR_DEBUG)
EndIf
Case $WM_LBUTTONUP, $WM_RBUTTONUP
If $g_iDebugWindowMessages Then
SetDebugLog("GUIControl_WM_MOUSE: " & ($iMsg = $WM_LBUTTONUP ? "$WM_LBUTTONUP" : "$WM_RBUTTONUP") & " $hWin=" & $hWin & ",$iMsg=" & $iMsg & ",$wParam=" & $wParam & ",$lParam=" & $lParam & ", X=" & $x & ", Y=" & $y, Default, True)
Expand Down Expand Up @@ -376,7 +381,7 @@ Func GUIControl_WM_MOUSE($hWin, $iMsg, $wParam, $lParam)
If $s_x <> $x Or $s_y <> $y Then
$iBytesSent = Minitouch($x, $y, 0)
EndIf
Case $WM_LBUTTONDOWN
Case $WM_LBUTTONDOWN, $WM_LBUTTONDBLCLK
$iBytesSent = Minitouch($x, $y, 1)
Case $WM_LBUTTONUP
$iBytesSent = Minitouch($x, $y, 2)
Expand Down
Loading

0 comments on commit 4215277

Please sign in to comment.