Skip to content

Commit

Permalink
release v7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyhunter01 committed May 28, 2017
1 parent 211e702 commit a1802c2
Show file tree
Hide file tree
Showing 329 changed files with 16,449 additions and 13,619 deletions.
48 changes: 44 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,14 +1,54 @@
* **V7.1.4**
* **V7.2**
* Add Nox 3.8.2 and DirectX support, fix Click&Drag and automatic screen config
* Add new system to use translate
* Add Suspend Android options under Bot/Android to suspend Android (CoC process) during Search/Attack or also for every ImgLoc call
* Add SmartZap/NoobZap FTW Mode
* Add Spells Brew Custom Order
* Add Drop On Building CSV attack enhancement: adds MAKE for target building, MAKE near red line closest to building, and can DROP on building locations. Allows spell drop inside base, and targeting of key buildings with special troops during attack.
* Improve thread utilization for multiple running bots sharing maximum number of available logical processors
* Improve thread utilization for running bot limiting maximum number of available logical processors
* Improve multiple bots limiting number of running bots at the same time (command line option /nobotslot or /nbs disables this feature: useful for development/debugging)
* Improve multiple bots launching at the same time to ensure only one is launching
* Improve Android Window resizing to abort earlier when not working
* Replace duplicated "getproperty" ImgLoc DLL call functions with single function
* Reduce duplicate image searching for defense buildings when using both WeakBase filter and CSV scripted attack method
* Improve handling of building data using a scripting dictionary to simplify sharing location data learned between bot features
* Embellish CSV attack scripts SIDEB command with additional target buildings (now includes: EAGLE, INFERNO, XBOW, WIZTOWER, MORTAR, AIRDEFENSE)
* Improve find TH during village search
* Fix Attack Schedule Random Close being an hour wrong
* Fix Attack Schedule Wait Time for Random Close returning negative Value
* Fix MEmu 2.5.0 tool bar width for Window resizing
* Fix Window Resize that did cause wrong height on some systems

***Fixes required for SC May 22 Game Update***
* Change pixel locations/colors & OCR for:
* Main screen (location, reading resources & trophy, gem spend window open, game language)
* Resource Collection (Update collect only one of each type, new collect images, treasury window)
* Request CC (chat tab window open/close)
* Donate CC (numerous changes to button detect, window locations, etc; due differences between emulator rendering)
* Troop Training (tabs, arrows, page detection)
* Attacking (attack button, page detection, wait for clouds, star bonus)
* Upgrade buildings (resource type used, reading building names)
* Added detection of builder base window, and return to main base.

*** WARNING>> SOME BOT FEATURES ARE NOT OPERATIONAL!!!!
Not Working:
>> Building Upgrades, Lab Upgrades
Not Tested:
>> Halt modes, Attack schedule, unbreakable mode, quick train, boosting, alternate attack modes (TH side attack, DE side attack, etc), various CoC Reload error messages, and debug test buttons.


* **V7.1.4**
* Add Nox 3.8.1.3 support
* Fix Strategies save file
* Fix auto-activation of heros sometimes not working
* Fix Android resize bot crash when Andorid crashes or Android Window is unavailable at wrong time
* Fix auto-activation of heroes sometimes not working
* Fix Android resize bot crash when Android crashes or Android Window is unavailable at wrong time
* Fix auto-start delaying also 2nd or more manual starts
* Improve shared folder handling
* Improve the train time click/checks delays
* Update example TH9 GoWiPe Strategy file to be compatible with train revamp changes made in v7.
* Change "Delete Temp Files" feature to include recursive removal of DEBUG files\folders when users enable debug long term.
* Removed the reduncancy on Train log
* Removed the redundancy on Train log
* Update Russian Language File by @Vlab97

* **V7.1.3**
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG_LANGUAGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
* **V7.2**
* Improve thread utilization for multiple running bots sharing maximum number of available logical processors
* Improve thread utilization for running bot limiting maximum number of available logical processors
* Improve multiple bots limiting number of running bots at the same time
[636]
130=Processor/Thread Advanced
131=When running multiple bots, specify how many can run at the same time.\r\nThis reduces your CPU utilization significantly.\r\nHalf of available logical processors is a good number.\r\nThis configuration is shared across all profiles/instances and a restart of all bots is required (close all, wait, and start all again!).
132=Bots can run parallel at the same time
133=When running multiple bots, specify how many global threads for image processing tasks can run at the same time.\r\nThis reduces your CPU utilization significantly.\r\nHalf of available logical processors is a good number.\r\nThis configuration is shared across all profiles/instances and a restart of all bots is required (close all, wait, and start all again!).
134=Global image processing threads will be used for all bots
135=When images are processed, multiple threads are used. Here you specifiy how many threads this bot can use.\r\nLess threads reduce your CPU utilization significantly.\r\nHalf of available logical processors is a good number. Use 0 for all available. Global threads setting has priority.
136=Image processing threads will be used for this bot
* Improve multiple bots limiting number of running bots at the same time
[500]
10=Waiting for bot slot...

* **V7.1.3**
* Add Suspend Computer option to SmartWait and Attack Schedule
[634]
Expand All @@ -11,6 +27,12 @@
2=Attack Type
6=Only drop these troops
19=Special troops to use
* Add Suspend Android options under Bot/Android to suspend Android during Search/Attack or also for every ImgLoc call
[643]
1=Advanced Android Options
11=Suspend/Resume Android
12=Disabled|Only during Search/Attack|For every Image processing call
13=Specify if Android will be suspended for brief time only during search and attack or\r\nfor every ImgLoc/Image processing call. If you experience more frequent network issues\r\ntry to use "Only during Search/Attack" option or disable this feature.

* **V7.1.2**
* Add auto slide bot when docked (when using new My Bot design Title Bar is used)
Expand Down
36 changes: 33 additions & 3 deletions COCBot/GUI/MBR GUI Control Android.au3
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Func LoadCOCDistributorsComboBox()

GUICtrlSetData($g_hCmbCOCDistributors, "", "")
GUICtrlSetData($g_hCmbCOCDistributors, $sDistributors)
EndFunc ;==>LoadCOCdistributorsComboBox
EndFunc ;==>LoadCOCDistributorsComboBox

Func SetCurSelCmbCOCDistributors()
Local $sIniDistributor
Expand All @@ -44,11 +44,11 @@ Func SetCurSelCmbCOCDistributors()
EndIf
GUICtrlSetState($g_hCmbCOCDistributors, $GUI_ENABLE)
EndIf
EndFunc ;==>setCurSelCmbCOCDistributors
EndFunc ;==>SetCurSelCmbCOCDistributors

Func cmbCOCDistributors()
Local $sDistributor
_GUICtrlComboBox_GetLBText($g_hCmbCOCDistributors, _GUICtrlComboBox_GetCurSel($g_hCmbCOCDistributors), $sDistributor)
_GUICtrlComboBox_GetLBText($g_hCmbCOCDistributors, _GUICtrlComboBox_GetCurSel($g_hCmbCOCDistributors), $sDistributor)

If $sDistributor = $g_sUserGameDistributor Then ; ini user option
$g_sAndroidGameDistributor = $g_sUserGameDistributor
Expand All @@ -68,3 +68,33 @@ Func DistributorsBotStopEvent()
LoadCOCDistributorsComboBox()
SetCurSelCmbCOCDistributors()
EndFunc ;==>DistributorsBotStopEvent

Func AndroidSuspendFlagsToIndex($iFlags)
Local $idx = 0
If BitAND($iFlags, 2) > 0 Then
$idx = 2
ElseIf BitAND($iFlags, 1) > 0 Then
$idx = 1
EndIf
If $idx > 0 And BitAND($iFlags, 4) > 0 Then $idx += 2
Return $idx
EndFunc ;==>AndroidSuspendFlagsToIndex

Func AndroidSuspendIndexToFlags($idx)
Local $iFlags = 0
Switch $idx
Case 1
$iFlags = 1
Case 2
$iFlags = 2
Case 3
$iFlags = 1 + 4
Case 4
$iFlags = 2 + 4
EndSwitch
Return $iFlags
EndFunc ;==>AndroidSuspendFlagsToIndex

Func cmbSuspendAndroid()
$g_iAndroidSuspendModeFlags = AndroidSuspendIndexToFlags(_GUICtrlComboBox_GetCurSel($g_hCmbSuspendAndroid))
EndFunc ;==>cmbSuspendAndroid
30 changes: 15 additions & 15 deletions COCBot/GUI/MBR GUI Control Attack Scripted.au3
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,19 @@ Func AttackCSVAssignDefaultScriptName()
EndFunc ;==>AttackCSVAssignDefaultScriptName

;Parse this first on load of bot, needed outside the function to update current language.ini file. Used on Func NewABScript() and NewDBScript()
Local $temp1 = GetTranslated(635, 1, "Create New Script File"), $temp2 = GetTranslated(635, 2, "New Script Filename")
Local $temp3 = GetTranslated(635, 3, "File exists, please input a new name"), $temp4 = GetTranslated(635, 4, "An error occurred when creating the file.")
Local $temp1 = GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Create", "Create New Script File"), $temp2 = GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_New_0", "New Script Filename")
Local $temp3 = GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_File-exists", "File exists, please input a new name"), $temp4 = GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Error", "An error occurred when creating the file.")
Local $temp1 = 0, $temp2 = 0, $temp3 = 0, $temp4 = 0 ; empty temp vars

Func NewScriptDB()
Local $filenameScript = InputBox(GetTranslated(635, 1, -1), GetTranslated(635, 2, -1) & ":")
Local $filenameScript = InputBox(GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Create", -1), GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_New_0", -1) & ":")
If StringLen($filenameScript) > 0 Then
If FileExists($g_sCSVAttacksPath & "\" & $filenameScript & ".csv") Then
MsgBox("", "", GetTranslated(635, 3, -1))
MsgBox("", "", GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_File-exists", -1))
Else
Local $hFileOpen = FileOpen($g_sCSVAttacksPath & "\" & $filenameScript & ".csv", $FO_APPEND)
If $hFileOpen = -1 Then
MsgBox($MB_SYSTEMMODAL, "", GetTranslated(635, 4, -1))
MsgBox($MB_SYSTEMMODAL, "", GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Error", -1))
Return False
Else
FileClose($hFileOpen)
Expand All @@ -201,14 +201,14 @@ EndFunc ;==>NewScriptDB


Func NewScriptAB()
Local $filenameScript = InputBox(GetTranslated(635, 1, -1), GetTranslated(635, 2, -1) & ":")
Local $filenameScript = InputBox(GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Create", -1), GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_New_0", -1) & ":")
If StringLen($filenameScript) > 0 Then
If FileExists($g_sCSVAttacksPath & "\" & $filenameScript & ".csv") Then
MsgBox("", "", GetTranslated(635, 3, -1))
MsgBox("", "", GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_File-exists", -1))
Else
Local $hFileOpen = FileOpen($g_sCSVAttacksPath & "\" & $filenameScript & ".csv", $FO_APPEND)
If $hFileOpen = -1 Then
MsgBox($MB_SYSTEMMODAL, "", GetTranslated(635, 4, -1))
MsgBox($MB_SYSTEMMODAL, "", GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Error", -1))
Return False
Else
FileClose($hFileOpen)
Expand All @@ -224,23 +224,23 @@ EndFunc ;==>NewScriptAB


;Parse this first on load of bot, needed outside the function to update current language.ini file. Used on Func DuplicateABScript() and DuplicateDBScript()
Local $temp1 = GetTranslated(635, 5, "Copy to New Script File"), $temp2 = GetTranslated(635, 6, "Copy"), $temp3 = GetTranslated(635, 7, "to New Script Filename")
Local $temp1 = GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Copy_0", "Copy to New Script File"), $temp2 = GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Copy_1", "Copy"), $temp3 = GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_New_1", "to New Script Filename")
Local $temp1 = 0, $temp2 = 0, $temp3 = 0 ; empty temp vars

Func DuplicateScriptDB()
Local $indexofscript = _GUICtrlComboBox_GetCurSel($g_hCmbScriptNameDB)
Local $scriptname
_GUICtrlComboBox_GetLBText($g_hCmbScriptNameDB, $indexofscript, $scriptname)
$g_sAttackScrScriptName[$DB] = $scriptname
Local $filenameScript = InputBox(GetTranslated(635, 5, -1), GetTranslated(635, 6, -1) & ": <" & $g_sAttackScrScriptName[$DB] & ">" & @CRLF & GetTranslated(635, 7, -1) & ":")
Local $filenameScript = InputBox(GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Copy_0", -1), GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Copy_1", -1) & ": <" & $g_sAttackScrScriptName[$DB] & ">" & @CRLF & GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_New_1", -1) & ":")
If StringLen($filenameScript) > 0 Then
If FileExists($g_sCSVAttacksPath & "\" & $filenameScript & ".csv") Then
MsgBox("", "", GetTranslated(635, 3, -1))
MsgBox("", "", GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_File-exists", -1))
Else
Local $hFileOpen = FileCopy($g_sCSVAttacksPath & "\" & $g_sAttackScrScriptName[$DB] & ".csv", $g_sCSVAttacksPath & "\" & $filenameScript & ".csv")

If $hFileOpen = -1 Then
MsgBox($MB_SYSTEMMODAL, "", GetTranslated(635, 4, -1))
MsgBox($MB_SYSTEMMODAL, "", GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Error", -1))
Return False
Else
FileClose($hFileOpen)
Expand All @@ -258,15 +258,15 @@ Func DuplicateScriptAB()
Local $scriptname
_GUICtrlComboBox_GetLBText($g_hCmbScriptNameAB, $indexofscript, $scriptname)
$g_sAttackScrScriptName[$LB] = $scriptname
Local $filenameScript = InputBox(GetTranslated(635, 5, -1), GetTranslated(635, 6, -1) & ": <" & $g_sAttackScrScriptName[$LB] & ">" & @CRLF & GetTranslated(635, 7, -1) & ":")
Local $filenameScript = InputBox(GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Copy_0", -1), GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Copy_1", -1) & ": <" & $g_sAttackScrScriptName[$LB] & ">" & @CRLF & GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_New_1", -1) & ":")
If StringLen($filenameScript) > 0 Then
If FileExists($g_sCSVAttacksPath & "\" & $filenameScript & ".csv") Then
MsgBox("", "", GetTranslated(635, 3, -1))
MsgBox("", "", GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_File-exists", -1))
Else
Local $hFileOpen = FileCopy($g_sCSVAttacksPath & "\" & $g_sAttackScrScriptName[$LB] & ".csv", $g_sCSVAttacksPath & "\" & $filenameScript & ".csv")

If $hFileOpen = -1 Then
MsgBox($MB_SYSTEMMODAL, "", GetTranslated(635, 4, -1))
MsgBox($MB_SYSTEMMODAL, "", GetTranslatedFileIni("MBR Popups", "Func_AttackCSVAssignDefaultScriptName_Error", -1))
Return False
Else
FileClose($hFileOpen)
Expand Down
Loading

0 comments on commit a1802c2

Please sign in to comment.