Skip to content

Commit

Permalink
Release v7.1.4 hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyhunter01 committed May 4, 2017
1 parent 98c811a commit 211e702
Show file tree
Hide file tree
Showing 32 changed files with 499 additions and 616 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
* **V7.1.3**
* **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-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
* Update Russian Language File by @Vlab97

* **V7.1.3**
* Add Suspend Computer option to SmartWait and Attack Schedule (see https://mybot.run/forums/index.php?/topic/29562-how-to-use-new-suspendsleep-computer-support/ for more details)
* Add Inferno lv4 , Mortar Lv9/10 , WizardTower lv10 , Xbow lv5 and AD lv9 to weakBase Images/GUI settings
* Add ObjEvent Code to handle with Objects errors and Poor Connection on Notify.
Expand Down
2 changes: 1 addition & 1 deletion COCBot/GUI/MBR GUI Design Child Bot - Options.au3
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Func CreateBotOptions()
GUICtrlSetState(-1, $GUI_CHECKED)
_GUICtrlSetTip(-1, GetTranslated(636,9, "Delete temp files older than this specified No. of days."))
GUICtrlSetOnEvent(-1, "chkDeleteTemp")
$g_hTxtDeleteTempDays = GUICtrlCreateInput("2", $x + 120, $y + 2, 25, 16, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER))
$g_hTxtDeleteTempDays = GUICtrlCreateInput("5", $x + 120, $y + 2, 25, 16, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER, $ES_NUMBER))
_GUICtrlSetTip(-1, $sTxtTip)
GUICtrlSetLimit(-1, 2)
GUICtrlSetFont(-1, 8)
Expand Down
13 changes: 9 additions & 4 deletions COCBot/MBR Global Variables.au3
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ Global $g_iVILLAGE_OFFSET[3] = [0, 0, 1]

Local Const $UserDebugEnable = 0 ; <<< change this value equal to 1, to enable USER debug mode when posting bugs in MBR forums!

; This will be the ObjEvent to handle with object errors
Global $g_oCOMErrorHandler = 0

; <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
; <><><><> Individual error flags for debugging individual sections of code! <><><><>
; <><><><> Can be manually set when required, Enabled when = 1, disabled when = 0 <><><><>
Expand Down Expand Up @@ -150,6 +147,9 @@ Global $g_aZombie = ["" _ ; 0=Filename
Global $g_iDebugGDICountMax = 0 ; max value of GDI Handle count
Global $g_oDebugGDIHandles = ObjCreate("Scripting.Dictionary") ; stores GDI handles when $g_iDebugGDICount <> 0

; This will be the ObjEvent to handle with object errors
Global $g_oCOMErrorHandler = 0

; <><><><><><><><><><><><><><><><><><>
#EndRegion debugging

Expand Down Expand Up @@ -255,6 +255,11 @@ Global $__Droid4X_Window[3][3] = _ ; Alternative window sizes (array must be ord
["0.10.0", $g_iDEFAULT_WIDTH + 6, $g_iDEFAULT_HEIGHT + 53], _
["0.8.6", $g_iDEFAULT_WIDTH + 10, $g_iDEFAULT_HEIGHT + 50] _
]
Global $__Nox_Config[2][2] = _ ; Alternative Nox Control ID (array must be ordered by version descending!)
[ _ ; Version|$g_sAppClassInstance
["3.8.1.3", "[CLASS:subWin; INSTANCE:1]"], _
["3.1.0", "[CLASS:Qt5QWindowIcon; INSTANCE:4]"] _
]
; 0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14
; $g_sAndroidEmulator |$g_sAndroidTitle |$g_sAppClassInstance |$g_sAppPaneName |$g_iAndroidClientWidth|$g_iAndroidClientHeight|$g_iAndroidWindowWidth|$g_iAndroidWindowHeight|$ClientOffsetY|$g_sAndroidAdbDevice|$g_iAndroidSupportFeature|$g_sAndroidShellPrompt|$g_sAndroidMouseDevice |$g_bAndroidEmbed/$g_iAndroidEmbedMode
; |$g_sAndroidInstance| | | | | | | | | |1 = Normal background mode | |-1 = Not available
Expand All @@ -271,7 +276,7 @@ Global $g_avAndroidAppConfig[8][15] = [ _ ; |
["LeapDroid", "vm1", "Leapd", "[CLASS:subWin; INSTANCE:1]", "", $g_iDEFAULT_WIDTH, $g_iDEFAULT_HEIGHT - 48, $g_iDEFAULT_WIDTH, $g_iDEFAULT_HEIGHT - 48, 0, "emulator-5554", 1 + 8 + 16 + 32, '# ', 'qwerty2', 1], _
["iTools", "iToolsVM", "iTools ", "[CLASS:subWin; INSTANCE:1]", "", $g_iDEFAULT_WIDTH, $g_iDEFAULT_HEIGHT - 48, $g_iDEFAULT_WIDTH + 2, $g_iDEFAULT_HEIGHT - 13, 0, "127.0.0.1:54001", 1 + 8 + 16 + 32 + 64, '# ', 'iTools Virtual PassThrough Input', 0], _
["Droid4X", "droid4x", "Droid4X ", "[CLASS:subWin; INSTANCE:1]", "", $g_iDEFAULT_WIDTH, $g_iDEFAULT_HEIGHT - 48, $g_iDEFAULT_WIDTH + 10, $g_iDEFAULT_HEIGHT + 50, 0, "127.0.0.1:26944", 0 + 2 + 4 + 8 + 16 + 32, '# ', 'droid4x Virtual Input', 0], _
["Nox", "nox", "No", "[CLASS:Qt5QWindowIcon; INSTANCE:4]", "", $g_iDEFAULT_WIDTH, $g_iDEFAULT_HEIGHT - 48, $g_iDEFAULT_WIDTH + 4, $g_iDEFAULT_HEIGHT - 10, 0, "127.0.0.1:62001", 0 + 2 + 4 + 8 + 16 + 32, '# ', '(nox Virtual Input|Android Input)', -1] _
["Nox", "nox", "No", "[CLASS:subWin; INSTANCE:1]", "", $g_iDEFAULT_WIDTH, $g_iDEFAULT_HEIGHT - 48, $g_iDEFAULT_WIDTH + 4, $g_iDEFAULT_HEIGHT - 10, 0, "127.0.0.1:62001", 0 + 2 + 4 + 8 + 16 + 32, '# ', '(nox Virtual Input|Android Input)', 1] _
]

; Startup detection
Expand Down
41 changes: 21 additions & 20 deletions COCBot/functions/Android/Android.au3
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ Func AndroidAdbLaunchShellInstance($wasRunState = $g_bRunState, $rebootAndroidIf
EndIf
; check shared folder
;If StringInStr($g_sAndroidPicturesPath, "|", $STR_NOCASESENSEBASIC) > 0 Then
If True Then ; always validate picture patch
If $g_bRunState = True Then ; always validate picture patch
If ConnectAndroidAdb($rebootAndroidIfNeccessary) = False Then
Return SetError(3, 0)
EndIf
Expand All @@ -1393,31 +1393,32 @@ Func AndroidAdbLaunchShellInstance($wasRunState = $g_bRunState, $rebootAndroidIf
Local $path = $g_sAndroidPicturesPath
If StringRight($path, 1) = "/" Then $path = StringLeft($path, StringLen($path) - 1)
Local $aRegExResult = StringRegExp($s, $path, $STR_REGEXPARRAYMATCH)
If @error = 0 Then
; check which path contains dummy file
Local $dummyFile = StringMid(_Crypt_HashData($g_sBotTitle & _Now(), $CALG_SHA1), 3)
FileWriteLine($g_sAndroidPicturesHostPath & $dummyFile, _Now())
For $i = 0 To UBound($aRegExResult) - 1
$path = $aRegExResult[$i]
If StringRight($path, 1) <> "/" Then $path &= "/"
$s = AndroidAdbSendShellCommand("ls " & $path & $dummyFile, Default, $wasRunState, False)
If StringInStr($s, "No such file or directory") = 0 Then
$pathFound = True
$g_sAndroidPicturesPath = $path
SetDebugLog("Using " & $g_sAndroidPicturesPath & " for Android shared folder")
ExitLoop
EndIf
Next
; delete dummy FileChangeDir
FileDelete($g_sAndroidPicturesHostPath & $dummyFile)
EndIf
SetError(0)
If UBound($aRegExResult) = 0 Then Local $aRegExResult = []
_ArrayConcatenate($aRegExResult, StringSplit(((StringLeft($path, 1) = "(" And StringRight($path, 1) = ")") ? StringMid($path, 2, StringLen($path) - 2) : $path), "|", $STR_NOCOUNT))
; check which path contains dummy file
Local $dummyFile = StringMid(_Crypt_HashData($g_sBotTitle & _Now(), $CALG_SHA1), 3)
FileWriteLine($g_sAndroidPicturesHostPath & $dummyFile, _Now())
For $i = 0 To UBound($aRegExResult) - 1
$path = $aRegExResult[$i]
If StringRight($path, 1) <> "/" Then $path &= "/"
$s = AndroidAdbSendShellCommand("ls '" & $path & $dummyFile & "'", Default, $wasRunState, False)
If StringInStr($s, "No such file or directory") = 0 And StringInStr($s, "syntax error:") = 0 Then
$pathFound = True
$g_sAndroidPicturesPath = $path
SetDebugLog("Using " & $g_sAndroidPicturesPath & " for Android shared folder")
ExitLoop
EndIf
Next
; delete dummy FileChangeDir
FileDelete($g_sAndroidPicturesHostPath & $dummyFile)
If $pathFound = True Then ExitLoop
If $iMount = 0 Then
SetLog("Waiting for shared folder to get mounted...", $COLOR_GREEN)
Else
SetDebugLog("Still waiting for shared folder to get mounted...")
EndIf
If _Sleep(3000) Then Return
If _Sleep(6000) Then Return
Next
If $pathFound = False Then
SetLog($g_sAndroidEmulator & " cannot use ADB on shared folder, """ & $g_sAndroidPicturesPath & """ not found", $COLOR_ERROR)
Expand Down
32 changes: 28 additions & 4 deletions COCBot/functions/Android/AndroidNox.au3
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ Func GetNoxRtPath()
If FileExists($path) = 0 Then
$path = EnvGet("ProgramFiles(x86)") & "\Bignox\BigNoxVM\RT\"
EndIf
If FileExists($path) = 0 Then
$path = EnvGet("ProgramFiles") & "\Bignox\BigNoxVM\RT\"
EndIf
SetError(0, 0, 0)
Return StringReplace($path, "\\", "\")
EndFunc ;==>GetNoxRtPath
Expand Down Expand Up @@ -200,14 +203,34 @@ Func InitNox($bCheckOnly = False)
$g_bAndroidSharedFolderAvailable = True
$g_sAndroidPicturesHostPath = $aRegExResult[UBound($aRegExResult) - 1] & "\"
Else
$g_bAndroidSharedFolderAvailable = False
$g_bAndroidAdbScreencap = False
$g_sAndroidPicturesHostPath = ""
SetLog($g_sAndroidEmulator & " Background Mode is not available", $COLOR_ERROR)
; Check the shared folder 'Nox_share' , this is the default path on last version
If FileExists(@MyDocumentsDir & "\Nox_share\") then
$g_bAndroidSharedFolderAvailable = True
$g_sAndroidPicturesHostPath = @MyDocumentsDir & "\Nox_share\Other\"
If not FileExists($g_sAndroidPicturesHostPath) then
; Just in case of 'Other' Folder doesn't exist
DirCreate($g_sAndroidPicturesHostPath)
EndIf
Else
$g_bAndroidSharedFolderAvailable = False
$g_bAndroidAdbScreencap = False
$g_sAndroidPicturesHostPath = ""
SetLog($g_sAndroidEmulator & " Background Mode is not available", $COLOR_ERROR)
EndIf
EndIf

$__VBoxGuestProperties = LaunchConsole($__VBoxManage_Path, "guestproperty enumerate " & $g_sAndroidInstance, $process_killed)

Local $v = GetVersionNormalized($g_sAndroidVersion)
For $i = 0 To UBound($__Nox_Config) - 1
Local $v2 = GetVersionNormalized($__Nox_Config[$i][0])
If $v >= $v2 Then
SetDebugLog("Using Android Config of " & $g_sAndroidEmulator & " " & $__Nox_Config[$i][0])
$g_sAppClassInstance = $__Nox_Config[$i][1]
ExitLoop
EndIf
Next

; Update Android Screen and Window
;UpdateNoxConfig()
EndIf
Expand All @@ -233,6 +256,7 @@ Func SetScreenNox()
; remove tailing backslash
Local $path = $g_sAndroidPicturesHostPath
If StringRight($path, 1) = "\" Then $path = StringLeft($path, StringLen($path) - 1)
$cmdOutput = LaunchConsole($__VBoxManage_Path, "sharedfolder remove " & $g_sAndroidInstance & " --name Other", $process_killed)
$cmdOutput = LaunchConsole($__VBoxManage_Path, "sharedfolder add " & $g_sAndroidInstance & " --name Other --hostpath """ & $path & """ --automount", $process_killed)
EndIf

Expand Down
8 changes: 5 additions & 3 deletions COCBot/functions/Android/getBSPos.au3
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,13 @@ Func getAndroidPos($FastCheck = False, $RetryCount1 = 0, $RetryCount2 = 0, $bWid
WinMove($g_hAndroidWindow, "", $AndroidWinPos[0], $AndroidWinPos[1], $aAndroidWindow[0] - 2, $aAndroidWindow[1] - 2) ; force invalid resize (triggers Android rendering control resize)
;Sleep($DELAYSLEEP)
$AndroidWinPos = WinGetPos($g_hAndroidWindow)
$WinWidth = $AndroidWinPos[2]
$WinHeight = $AndroidWinPos[3]
If UBound($AndroidWinPos) > 3 Then
$WinWidth = $AndroidWinPos[2]
$WinHeight = $AndroidWinPos[3]
EndIf
EndIf

If UBound($AndroidWinPos) > 2 Then ; Check expected Window size
If UBound($AndroidWinPos) > 3 Then ; Check expected Window size

WinMove2($g_hAndroidWindow, "", $AndroidWinPos[0], $AndroidWinPos[1], $aAndroidWindow[0], $aAndroidWindow[1]) ; resized to expected window size
;WinMove($g_hAndroidWindow, "", $AndroidWinPos[0], $AndroidWinPos[1], $aAndroidWindow[0], $aAndroidWindow[1])
Expand Down
54 changes: 28 additions & 26 deletions COCBot/functions/Attack/RedArea/GetLocation.au3
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,41 @@

Func GetLocationMine()

If $g_iDetectedImageType = 0 Then
Local $result = DllCall($g_hLibMyBot, "str", "getLocationMineExtractor", "ptr", $g_hHBitmap2)
If $g_iDebugBuildingPos = 1 Then Setlog("#*# GetLocationMine: " & $result[0], $COLOR_DEBUG1)
If $g_iDebugGetLocation = 1 Then DebugImageGetLocation($result[0], "Mine")
Return GetListPixel($result[0])
Else
Local $directory = @ScriptDir & "\imgxml\Storages\Mines_Snow"
Local $Maxpositions = 7
Local $aResult = returnMultipleMatches($directory, $Maxpositions)
Local $result = ConvertImgloc2MBR($aResult, $Maxpositions)
If $g_iDebugBuildingPos = 1 Then Setlog("#*# GetLocationSnowMine: " & $result, $COLOR_DEBUG1)
If $g_iDebugGetLocation = 1 Then DebugImageGetLocation($result, "SnowMine")
Return GetListPixel($result)
Local $directory = @ScriptDir & "\imgxml\Storages\GoldMines"
Local $txt = "Mines"
Local $Maxpositions = 7

; Snow Theme detected
If $g_iDetectedImageType = 1 Then
$directory = @ScriptDir & "\imgxml\Storages\Mines_Snow"
$txt = "SnowMines"
EndIf

Local $aResult = returnMultipleMatches($directory, $Maxpositions)
Local $result = ConvertImgloc2MBR($aResult, $Maxpositions)
If $g_iDebugBuildingPos = 1 Then Setlog("#*# GetLocation"& $txt &": " & $result, $COLOR_DEBUG1)
If $g_iDebugGetLocation = 1 Then DebugImageGetLocation($result, $txt)

Return GetListPixel($result)
EndFunc ;==>GetLocationMine

Func GetLocationElixir()
If $g_iDetectedImageType = 0 Then
Local $result = DllCall($g_hLibMyBot, "str", "getLocationElixirExtractor", "ptr", $g_hHBitmap2)
If $g_iDebugBuildingPos = 1 Then Setlog("#*# GetLocationElixir: " & $result[0], $COLOR_DEBUG1)
If $g_iDebugGetLocation = 1 Then DebugImageGetLocation($result[0], "Elixir")
Return GetListPixel($result[0])
Else
Local $directory = @ScriptDir & "\imgxml\Storages\Collectors_Snow"
Local $Maxpositions = 7
Local $aResult = returnMultipleMatches($directory, $Maxpositions)
Local $result = ConvertImgloc2MBR($aResult, $Maxpositions)
If $g_iDebugBuildingPos = 1 Then Setlog("#*# GetLocationSnowElixir: " & $result, $COLOR_DEBUG1)
If $g_iDebugGetLocation = 1 Then DebugImageGetLocation($result, "SnowElixir")
Return GetListPixel($result)
Local $directory = @ScriptDir & "\imgxml\Storages\Collectors"
Local $txt = "Collectors"
Local $Maxpositions = 7

; Snow Theme detected
If $g_iDetectedImageType = 1 Then
$directory = @ScriptDir & "\imgxml\Storages\Collectors_Snow"
$txt = "SnowCollectors"
EndIf

Local $aResult = returnMultipleMatches($directory, $Maxpositions)
Local $result = ConvertImgloc2MBR($aResult, $Maxpositions)
If $g_iDebugBuildingPos = 1 Then Setlog("#*# GetLocation"& $txt &": " & $result, $COLOR_DEBUG1)
If $g_iDebugGetLocation = 1 Then DebugImageGetLocation($result, $txt)

Return GetListPixel($result)
EndFunc ;==>GetLocationElixir

Func GetLocationDarkElixir()
Expand Down
12 changes: 6 additions & 6 deletions COCBot/functions/Attack/Troops/CheckHeroesHealth.au3
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,31 @@ Func CheckHeroesHealth()

If $g_iDebugSetlog = 1 Then
Setlog(" CheckHeroesHealth started ")
Local $KingPixelColor = _GetPixelColor($aKingHealthCopy[0], $aKingHealthCopy[1], $g_bCapturePixel)
Local $QueenPixelColor = _GetPixelColor($aQueenHealthCopy[0], $aQueenHealthCopy[1], $g_bCapturePixel)
Local $WardenPixelColor = _GetPixelColor($aWardenHealthCopy[0], $aWardenHealthCopy[1], $g_bCapturePixel)
If _Sleep($DELAYRESPOND) Then Return ; improve pause button response
EndIf

If $g_bCheckKingPower Then
Local $KingPixelColor = _GetPixelColor($aKingHealthCopy[0], $aKingHealthCopy[1], $g_bCapturePixel)
If $g_iDebugSetlog = 1 Then Setlog(" King _GetPixelColor(" & $aKingHealthCopy[0] & "," & $aKingHealthCopy[1] & "): " & $KingPixelColor, $COLOR_DEBUG)
If _CheckPixel($aKingHealthCopy, $g_bCapturePixel, "Red") Then
If Not _CheckPixel2($aKingHealthCopy, $KingPixelColor, "Red+Blue") Then
SetLog("King is getting weak, Activating King's power", $COLOR_INFO)
SelectDropTroop($g_iKingSlot)
$g_bCheckKingPower = False
EndIf
EndIf
If $g_bCheckQueenPower Then
Local $QueenPixelColor = _GetPixelColor($aQueenHealthCopy[0], $aQueenHealthCopy[1], $g_bCapturePixel)
If $g_iDebugSetlog = 1 Then Setlog(" Queen _GetPixelColor(" & $aQueenHealthCopy[0] & "," & $aQueenHealthCopy[1] & "): " & $QueenPixelColor, $COLOR_DEBUG)
If _CheckPixel($aQueenHealthCopy, $g_bCapturePixel, "Red") Then
If Not _CheckPixel2($aQueenHealthCopy, $QueenPixelColor, "Red+Blue") Then
SetLog("Queen is getting weak, Activating Queen's power", $COLOR_INFO)
SelectDropTroop($g_iQueenSlot)
$g_bCheckQueenPower = False
EndIf
EndIf
If $g_bCheckWardenPower Then
Local $WardenPixelColor = _GetPixelColor($aWardenHealthCopy[0], $aWardenHealthCopy[1], $g_bCapturePixel)
If $g_iDebugSetlog = 1 Then Setlog(" Grand Warden _GetPixelColor(" & $aWardenHealthCopy[0] & "," & $aWardenHealthCopy[1] & "): " & $WardenPixelColor, $COLOR_DEBUG)
If _CheckPixel($aWardenHealthCopy, $g_bCapturePixel, "Red") Then
If Not _CheckPixel2($aWardenHealthCopy, $WardenPixelColor, "Red+Blue") Then
SetLog("Grand Warden is getting weak, Activating Warden's power", $COLOR_INFO)
SelectDropTroop($g_iWardenSlot)
$g_bCheckWardenPower = False
Expand Down
6 changes: 3 additions & 3 deletions COCBot/functions/Config/ScreenCoordinates.au3
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ Global $aAttackForTreasury[4] = [88, 619 + $g_iMidOffsetY, 0xF0EBE8, 5] ; Red pi

; Check healthy color RGB ( 220,255,19~27) ; the king and queen haves the same Y , but warden is a little lower ...
; King Crown ; background pixel not at green bar
Global $aKingHealth = [-1, 569 + $g_iBottomOffsetY, 0x543e20, 15] ; Attack Screen, Check King's Health, X coordinate is dynamic, not used from array ; -> with slot compensation 0xbfb29e
Global $aKingHealth = [-1, 569 + $g_iBottomOffsetY, 0x00D500, 15] ; Attack Screen, Check King's Health, X coordinate is dynamic, not used from array ; -> with slot compensation 0xbfb29e
; Queen purple between crown ; background pixel not at green bar
Global $aQueenHealth = [-1, 569 + $g_iBottomOffsetY, 0x4b35b5, 15] ; Attack Screen, Check Queen's Health, X coordinate is dynamic, not used from array ; -> with slot compensation 0xe08227
Global $aQueenHealth = [-1, 569 + $g_iBottomOffsetY, 0x00D500, 15] ; Attack Screen, Check Queen's Health, X coordinate is dynamic, not used from array ; -> with slot compensation 0xe08227
; Warden hair ; background pixel not at green bar
Global $aWardenHealth = [-1, 569 + $g_iBottomOffsetY, 0xd2696c, 15] ; Attack Screen, Check Warden's Health, X coordinate is dynamic, not used from array ; -> with slot compensation 0xe08227
Global $aWardenHealth = [-1, 569 + $g_iBottomOffsetY, 0x00D500, 15] ; Attack Screen, Check Warden's Health, X coordinate is dynamic, not used from array ; -> with slot compensation 0xe08227


;attack report... stars won
Expand Down
14 changes: 14 additions & 0 deletions COCBot/functions/Config/_Ini_Table.au3
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,23 @@ Func _Ini_Save($filename)
If $asParts[1] <> $sCurrentSection Then
$sCurrentSection = $asParts[1]
FileWriteLine($hFile, "[" & $sCurrentSection & "]")
; Strategies File
If $g_sProfileSecondaryOutputFileName <> "" Then
If $sCurrentSection = "search" Or $sCurrentSection = "attack" Or $sCurrentSection = "troop" Or $sCurrentSection = "spells" Or $sCurrentSection = "milkingattack" Or $sCurrentSection = "endbattle" Or $sCurrentSection = "collectors" then
FileWriteLine($g_sProfileSecondaryOutputFileName, "[" & $sCurrentSection & "]")
EndIF
EndIf
EndIf

FileWriteLine($hFile, $asParts[2] & "=" & $g_asIniTable[$i][1])

; Strategies File
If $g_sProfileSecondaryOutputFileName <> "" Then
If $sCurrentSection = "search" Or $sCurrentSection = "attack" Or $sCurrentSection = "troop" Or $sCurrentSection = "spells" Or $sCurrentSection = "milkingattack" Or $sCurrentSection = "endbattle" Or $sCurrentSection = "collectors" Then
FileWriteLine($g_sProfileSecondaryOutputFileName, $asParts[2] & "=" & $g_asIniTable[$i][1])
EndIf
EndIf

Next
FileClose($hFile)

Expand Down
Loading

0 comments on commit 211e702

Please sign in to comment.