Jump to content

[TUTORIAL] How to apply a DIFF file to the bot


Recommended Posts

i merged SmartZap options and want to merged MyBot other *.diff files , but old modified(for exm : SmartZap added in orginal MyBot) mod i cant merged other *.diff files , before when i click "Apply Patch" see this error..

Spoiler

git -c diff.mnemonicprefix=false -c core.quotepath=false apply -v --reject -p 1 "C:\Users\Администратор\Desktop\Android Profile Settings 5.3.2 Patch 1.1.diff"
C:\Users\Администратор\Desktop\Android Profile Settings 5.3.2 Patch 1.1.diff:295: space before tab in indent.
     UpdateAndroidConfig($AndroidInstance)

C:\Users\Администратор\Desktop\Android Profile Settings 5.3.2 Patch 1.1.diff:379: trailing whitespace.
; Syntax ........: 
C:\Users\Администратор\Desktop\Android Profile Settings 5.3.2 Patch 1.1.diff:383: trailing whitespace.
; Modified ......: 
C:\Users\Администратор\Desktop\Android Profile Settings 5.3.2 Patch 1.1.diff:590: trailing whitespace.
                    WindowsArrange("SNAP-BOT-BL",  $iWAOffsetX, $iWAOffsetY)                    
Checking patch COCBot/GUI/MBR GUI Control Bottom.au3...
error: while searching for:

        GUICtrlSetState($chkBackground, $GUI_DISABLE)


        For $i = $FirstControlToHide To $LastControlToHide ; Save state of all controls on tabs

            If $i = $tabGeneral Or $i = $tabSearch Or $i = $tabAttack Or $i = $tabAttackAdv Or $i = $tabDonate Or $i = $tabTroops Or $i = $tabMisc Or $i = $tabNotify Or $i = $tabUpgrades Or $i = $tabEndBattle Or $i = $tabExpert or $i= $tabAttackCSV Then ContinueLoop ; exclude tabs

            If $pEnabled And $i = $btnDeletePBmessages Then ContinueLoop ; exclude the DeleteAllMesages button when PushBullet is enabled
            If $i = $btnMakeScreenshot Then ContinueLoop ; exclude

            If $i = $divider Then ContinueLoop ; exclude divider
            $iPrevState[$i] = GUICtrlGetState($i)

        Next
        For $i = $FirstControlToHide To $LastControlToHide ; Disable all controls in 1 go on all tabs

            If $i = $tabGeneral Or $i = $tabSearch Or $i = $tabAttack Or $i = $tabAttackAdv Or $i = $tabDonate Or $i = $tabTroops Or $i = $tabMisc Or $i = $tabNotify Or $i = $tabUpgrades Or $i = $tabEndBattle Or $i = $tabExpert or $i=$tabAttackCSV Then ContinueLoop ; exclude tabs
            If $pEnabled And $i = $btnDeletePBmessages Then ContinueLoop ; exclude the DeleteAllMesages button when PushBullet is enabled
            If $i = $btnMakeScreenshot Then ContinueLoop ; exclude
            If $i = $divider Then ContinueLoop ; exclude divider


error: patch failed: COCBot/GUI/MBR GUI Control Bottom.au3:203
error: while searching for:
        SetRedrawBotWindow(False)

        For $i = $FirstControlToHide To $LastControlToHide ; Restore previous state of controls
            If $i = $tabGeneral Or $i = $tabSearch Or $i = $tabAttack Or $i = $tabAttackAdv Or $i = $tabDonate Or $i = $tabTroops Or $i = $tabMisc Or $i = $tabNotify Or $i = $tabEndBattle Or $i = $tabExpert Then ContinueLoop ; exclude tabs
            If $pEnabled And $i = $btnDeletePBmessages Then ContinueLoop ; exclude the DeleteAllMesages button when PushBullet is enabled
            If $i = $btnMakeScreenshot Then ContinueLoop ; exclude
            If $i = $divider Then ContinueLoop ; exclude divider

error: patch failed: COCBot/GUI/MBR GUI Control Bottom.au3:282
error: while searching for:
    EndIf
EndFunc   ;==>btnAttackNowTS

Func btnHide()
    ResumeAndroid()
    WinGetAndroidHandle()

error: patch failed: COCBot/GUI/MBR GUI Control Bottom.au3:340
error: while searching for:

    If $Hide = False Then
        GUICtrlSetData($btnHide, GetTranslated(13,25, "Show"))
        Local $a = WinGetPos($HWnD)
        $botPos[0] = $a[0]
        $botPos[1] = $a[1]

error: patch failed: COCBot/GUI/MBR GUI Control Bottom.au3:348
error: while searching for:
        $Hide = True
    Else
        GUICtrlSetData($btnHide, GetTranslated(13,11, "Hide"))

        If $botPos[0] = -32000 Then
            WinMove2($HWnD, "", 0, 0)

error: patch failed: COCBot/GUI/MBR GUI Control Bottom.au3:355
Checking patch COCBot/GUI/MBR GUI Control Tab MOD.au3...
error: COCBot/GUI/MBR GUI Control Tab MOD.au3: already exists in working directory
Checking patch COCBot/GUI/MBR GUI Design Tab Expert.au3...
error: while searching for:
        GUICtrlSetLimit(-1, 2)
        GUICtrlSetFont(-1, 8)
    $y += 23
    $cmbDisposeWindowsCond = GUICtrlCreateCombo("", $x + 15, $y, 160, 20, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
        GUICtrlSetData(-1, GetTranslated(10,22, "0,0: BlueStacks-Bot") & "|" & GetTranslated(10,23, "0,0: Bot-BlueStacks") & "|" & GetTranslated(10,24, "SNAP: Bot TopRight to BS") &"|" & GetTranslated(10,25, "SNAP: Bot TopLeft to BS") & "|" & GetTranslated(10,26, "SNAP: Bot BottomRight to BS") & "|" & GetTranslated(10,27, "SNAP: Bot BottomLeft to BS") , GetTranslated(10,24, "SNAP: Bot TopRight to BS"))
        $txtTip &= @CRLF & GetTranslated(10,28, "0,0: Reposition BS screen to position 0,0 on windows desktop and align Bot window right or left to it.") & @CRLF & GetTranslated(10,29, "SNAP: Only reorder windows, Align Bot window to BlueStacks window at Top Right, Top Left, Bottom Right or Bottom Left.")
        GUICtrlSetTip(-1, $txtTip)
        GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateGroup("", -99, -99, 1, 1)

error: patch failed: COCBot/GUI/MBR GUI Design Tab Expert.au3:92
Checking patch COCBot/GUI/MBR GUI Design Tab MOD.au3...
error: COCBot/GUI/MBR GUI Design Tab MOD.au3: already exists in working directory
Checking patch COCBot/MBR Functions.au3...
error: while searching for:
#include "functions\Village\UpgradeHeroes.au3"
#include "functions\Village\ClanLevel.au3"
#include "functions\Village\StarBonus.au3"

error: patch failed: COCBot/MBR Functions.au3:255
Checking patch COCBot/MBR GUI Control.au3...
error: while searching for:
#include "GUI\MBR GUI Control Tab EndBattle.au3"
#include "GUI\MBR GUI Control Tab Donate.au3"
#include "GUI\MBR GUI Control Tab Misc.au3"
#include "GUI\MBR GUI Control Tab Upgrade.au3"
#include "GUI\MBR GUI Control Tab Notify.au3"
#include "GUI\MBR GUI Control Tab Expert.au3"

error: patch failed: COCBot/MBR GUI Control.au3:54
Checking patch COCBot/MBR GUI Design.au3...
error: while searching for:
#include "GUI\MBR GUI Design Tab EndBattle.au3"
#include "GUI\MBR GUI Design Tab Donate.au3"
#include "GUI\MBR GUI Design Tab Misc.au3"
#include "GUI\MBR GUI Design Tab Upgrade.au3"
#include "GUI\MBR GUI Design Tab Notify.au3"
#include "GUI\MBR GUI Design Tab Expert.au3"

error: patch failed: COCBot/MBR GUI Design.au3:44
Checking patch COCBot/MBR Global Variables.au3...
error: while searching for:
Global $ExtendedCocSearchArea = "15|25|825|625" ; Extended
; Similarity ( like tolerance ) 0,00 to 1,00
Global $ToleranceImgLoc = 0.95

error: patch failed: COCBot/MBR Global Variables.au3:1165
Checking patch COCBot/functions/Android/modifyAndroid.au3...
error: COCBot/functions/Android/modifyAndroid.au3: already exists in working directory
Checking patch COCBot/functions/Android/taskbarIcon.au3...
error: COCBot/functions/Android/taskbarIcon.au3: already exists in working directory
Checking patch COCBot/functions/Config/applyConfig.au3...
error: while searching for:
    chkUseAttackABCSV()


    ; Reenabling window redraw
    If $bRedrawAtExit Then SetRedrawBotWindow(True)


error: patch failed: COCBot/functions/Config/applyConfig.au3:1717
Checking patch COCBot/functions/Config/readConfig.au3...
error: while searching for:
;~         $MilkFarmAlgorithmTh = IniRead($config,"MilkingAttack","TownHallAlgorithm","Bam")
;~         $MilkFarmSnipeEvenIfNoExtractorsFound = IniRead($config,"MilkingAttack","TownHallHitAnyway","1")

    Else

error: patch failed: COCBot/functions/Config/readConfig.au3:667
Checking patch COCBot/functions/Config/saveConfig.au3...
error: while searching for:
;~     IniWrite($config, "MilkingAttack", "TownHallAlgorithm", $MilkFarmAlgorithmTh)
;~     IniWrite($config, "MilkingAttack", "TownHallHitAnyway", $MilkFarmSnipeEvenIfNoExtractorsFound)

    If $hFile <> -1 Then FileClose($hFile)

EndFunc   ;==>saveConfig

error: patch failed: COCBot/functions/Config/saveConfig.au3:1604
Checking patch COCBot/functions/Other/WindowsArrange.au3...
error: while searching for:
; Parameters ....: None
; Return values .: None
; Author ........: Sardo (2015-06) (2015-09)
; Modified ......:
;
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2016
;                  MyBot is distributed under the terms of the GNU GPL

error: patch failed: COCBot/functions/Other/WindowsArrange.au3:5
error: while searching for:
        Local $BOTw = $BOTPos[2]
        Local $BOTh = $BOTPos[3]
        ;Setlog($sBotTitle & " position found:" & $BOTx & "," & $BOTy & " w:" & $BOTw & " h:" & $BOTh)
        ;Setlog(Number( $BSx) & " " & Number($BSy ) )
        ;SetLog(@DesktopWidth)


        If Number( $BSx) > -30000 and Number($BSy ) > -30000 Then
            Switch $position
                Case "BS-BOT" ; position left bs, right adjacent BOT
                    $BSHandle = WinMove2($HWnD, "", 0 + Number($offsetX) , 0 + number($offsetY))

error: patch failed: COCBot/functions/Other/WindowsArrange.au3:32
error: while searching for:
                    If _Sleep($iDelayWindowsArrange1) Then Return
                    $BSHandle = WinMove2($HWnD, "", Number($BOTw) + Number($offsetX)*2, 0 + number($offsetY))
                    If _Sleep($iDelayWindowsArrange1) Then Return
                Case "SNAP-TR" ; position BOT top right of BS, do not move BS
                    If $BSx + $BSw + number($offsetX) < @DesktopWidth Then $BOTHandle = WinMove2($sBotTitle, "", $BSx + $BSw + Number($offsetX), $BSy )
                    If _Sleep($iDelayWindowsArrange1) Then Return
                Case "SNAP-BR" ; position BOT botom right of BS, do not move BS
                    If $BSx + $BSw + number($offsetY) < @DesktopWidth Then $BOTHandle = WinMove2($sBotTitle, "", $BSx + $BSw + Number($offsetX), $BSy + ( $BSh- $BOTh )  )
                    If _Sleep(500) Then Return
                Case "SNAP-TL" ; position BOT top left of BS, do not move BS
                    If $BSx  >=100 Then $BOTHandle = WinMove2($sBotTitle, "", $BSx - $BOTw - Number($offsetX), $BSy )
                    If _Sleep($iDelayWindowsArrange1) Then Return
                Case "SNAP-BL" ; position BOT bottom left of BS, do not move BS
                    If $BSx >= 100 Then $BOTHandle = WinMove2($sBotTitle, "", $BSx - $BOTw - Number($offsetX), $BSy + ( $BSh- $BOTh ) )
                    If _Sleep($iDelayWindowsArrange1) Then Return
            EndSwitch
        EndIf
    EndIf


EndFunc   ;==>WindowsArrange

Func DisposeWindows()

error: patch failed: COCBot/functions/Other/WindowsArrange.au3:46
error: while searching for:
                Case 1
                    WindowsArrange("BOT-BS",  $iWAOffsetX, $iWAOffsetY)
                Case 2
                    WindowsArrange("SNAP-TR", $iWAOffsetX, $iWAOffsetY)
                Case 3
                    WindowsArrange("SNAP-TL", $iWAOffsetX, $iWAOffsetY)
                Case 4
                    WindowsArrange("SNAP-BR", $iWAOffsetX, $iWAOffsetY)
                Case 5
                    WindowsArrange("SNAP-BL", $iWAOffsetX, $iWAOffsetY)
            EndSwitch
        Else
            If $bMonitorHeight800orBelow Then

error: patch failed: COCBot/functions/Other/WindowsArrange.au3:74
Checking patch MyBot.run.au3...
error: while searching for:
$sBotVersion = "v5.3.2" ;~ Don't add more here, but below. Version can't be longer than vX.y.z because it it also use on Checkversion()
$sBotTitle = "My Bot " & $sBotVersion & " " ;~ Don't use any non file name supported characters like \ / : * ? " < > |

Opt("WinTitleMatchMode", 3) ; Window Title exact match mode
#include "COCBot\functions\Main Screen\Android.au3"

If $aCmdLine[0] < 2 Then
    DetectRunningAndroid()
    If Not $FoundRunningAndroid Then DetectInstalledAndroid()
EndIf
; Update Bot title
$sBotTitle = $sBotTitle & "(" & ($AndroidInstance <> "" ? $AndroidInstance : $Android) & ")" ;Do not change this. If you do, multiple instances will not work.

If $bBotLaunchOption_Restart = True Then
   If CloseRunningBot($sBotTitle) = True Then
      ; wait for Mutexes to get disposed
      ;Sleep(1000) ; slow systems
   EndIf
EndIF

Local $cmdLineHelp = "By using the commandline (or a shortcut) you can start multiple Bots:" & @CRLF & _
                     "     MyBot.run.exe [ProfileName] [EmulatorName] [InstanceName]" & @CRLF & @CRLF & _
                     "With the first command line parameter, specify the Profilename (you can create profiles on the Misc tab, if a " & _
                     "profilename contains a {space}, then enclose the profilename in double quotes). " & _
                     "With the second, specify the name of the Emulator and with the third, an Android Instance (only for Droid4x & MEmu). " & @CRLF & _
                     "Supported Emulators are BlueStacks, BlueStacks2, Droid4X and MEmu." & @CRLF & @CRLF & _
                     "Examples:" & @CRLF & _
                     "     MyBot.run.exe MyVillage BlueStacks2" & @CRLF & _
                     '     MyBot.run.exe "My Second Village" MEmu MEmu_1'

$hMutex_BotTitle = _Singleton($sBotTitle, 1)
If $hMutex_BotTitle = 0 Then
    MsgBox($MB_OK + $MB_ICONINFORMATION, $sBotTitle, "My Bot for " & $Android & ($AndroidInstance <> "" ? " (instance " & $AndroidInstance & ")" : "") & " is already running." & @CRLF & @CRLF & $cmdLineHelp)
    Exit
EndIf

$hMutex_Profile = _Singleton(StringReplace($sProfilePath & "\" & $sCurrProfile, "\", "-"), 1)
If $hMutex_Profile = 0 Then
   _WinAPI_CloseHandle($hMutex_BotTitle)
    MsgBox($MB_OK + $MB_ICONINFORMATION, $sBotTitle, "My Bot with Profile " & $sCurrProfile & " is already running in " & $sProfilePath & "\" & $sCurrProfile & "." & @CRLF & @CRLF & $cmdLineHelp)
    Exit
EndIf

$hMutex_MyBot = _Singleton("MyBot.run", 1)
$OnlyInstance = $hMutex_MyBot <> 0 ; And False
SetDebugLog("My Bot is " & ($OnlyInstance ? "" : "not ") & "the only running instance")

error: patch failed: MyBot.run.au3:41
error: while searching for:
MBRFunc(True) ; start MBRFunctions dll
debugMBRFunctions($debugSearchArea, $debugRedArea, $debugOcr) ; set debug levels

If $FoundRunningAndroid Then
    SetLog("Found running " & $Android & " " & $AndroidVersion, $COLOR_GREEN)
EndIf
If $FoundInstalledAndroid Then
    SetLog("Found installed " & $Android & " " & $AndroidVersion, $COLOR_GREEN)
EndIf

error: patch failed: MyBot.run.au3:119
Applying patch COCBot/GUI/MBR GUI Control Bottom.au3 with 5 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Applying patch COCBot/GUI/MBR GUI Design Tab Expert.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/MBR Functions.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/MBR GUI Control.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/MBR GUI Design.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/MBR Global Variables.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/functions/Config/applyConfig.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/functions/Config/readConfig.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/functions/Config/saveConfig.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/functions/Other/WindowsArrange.au3 with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Applying patch MyBot.run.au3 with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.


Completed with errors, see above.

 

Who one have MultiFarming clean patch ?(sorry bad english)

Link to post
Share on other sites
Just now, Jerasimo said:

i merged SmartZap options and want to merged MyBot other *.diff files , but old modified(for exm : SmartZap added in orginal MyBot) mod i cant merged other *.diff files , before when i click "Apply Patch" see this error..

  Hide contents

git -c diff.mnemonicprefix=false -c core.quotepath=false apply -v --reject -p 1 "C:\Users\Администратор\Desktop\Android Profile Settings 5.3.2 Patch 1.1.diff"
C:\Users\Администратор\Desktop\Android Profile Settings 5.3.2 Patch 1.1.diff:295: space before tab in indent.
     UpdateAndroidConfig($AndroidInstance)

C:\Users\Администратор\Desktop\Android Profile Settings 5.3.2 Patch 1.1.diff:379: trailing whitespace.
; Syntax ........: 
C:\Users\Администратор\Desktop\Android Profile Settings 5.3.2 Patch 1.1.diff:383: trailing whitespace.
; Modified ......: 
C:\Users\Администратор\Desktop\Android Profile Settings 5.3.2 Patch 1.1.diff:590: trailing whitespace.
                    WindowsArrange("SNAP-BOT-BL",  $iWAOffsetX, $iWAOffsetY)                    
Checking patch COCBot/GUI/MBR GUI Control Bottom.au3...
error: while searching for:

        GUICtrlSetState($chkBackground, $GUI_DISABLE)


        For $i = $FirstControlToHide To $LastControlToHide ; Save state of all controls on tabs

            If $i = $tabGeneral Or $i = $tabSearch Or $i = $tabAttack Or $i = $tabAttackAdv Or $i = $tabDonate Or $i = $tabTroops Or $i = $tabMisc Or $i = $tabNotify Or $i = $tabUpgrades Or $i = $tabEndBattle Or $i = $tabExpert or $i= $tabAttackCSV Then ContinueLoop ; exclude tabs

            If $pEnabled And $i = $btnDeletePBmessages Then ContinueLoop ; exclude the DeleteAllMesages button when PushBullet is enabled
            If $i = $btnMakeScreenshot Then ContinueLoop ; exclude

            If $i = $divider Then ContinueLoop ; exclude divider
            $iPrevState[$i] = GUICtrlGetState($i)

        Next
        For $i = $FirstControlToHide To $LastControlToHide ; Disable all controls in 1 go on all tabs

            If $i = $tabGeneral Or $i = $tabSearch Or $i = $tabAttack Or $i = $tabAttackAdv Or $i = $tabDonate Or $i = $tabTroops Or $i = $tabMisc Or $i = $tabNotify Or $i = $tabUpgrades Or $i = $tabEndBattle Or $i = $tabExpert or $i=$tabAttackCSV Then ContinueLoop ; exclude tabs
            If $pEnabled And $i = $btnDeletePBmessages Then ContinueLoop ; exclude the DeleteAllMesages button when PushBullet is enabled
            If $i = $btnMakeScreenshot Then ContinueLoop ; exclude
            If $i = $divider Then ContinueLoop ; exclude divider


error: patch failed: COCBot/GUI/MBR GUI Control Bottom.au3:203
error: while searching for:
        SetRedrawBotWindow(False)

        For $i = $FirstControlToHide To $LastControlToHide ; Restore previous state of controls
            If $i = $tabGeneral Or $i = $tabSearch Or $i = $tabAttack Or $i = $tabAttackAdv Or $i = $tabDonate Or $i = $tabTroops Or $i = $tabMisc Or $i = $tabNotify Or $i = $tabEndBattle Or $i = $tabExpert Then ContinueLoop ; exclude tabs
            If $pEnabled And $i = $btnDeletePBmessages Then ContinueLoop ; exclude the DeleteAllMesages button when PushBullet is enabled
            If $i = $btnMakeScreenshot Then ContinueLoop ; exclude
            If $i = $divider Then ContinueLoop ; exclude divider

error: patch failed: COCBot/GUI/MBR GUI Control Bottom.au3:282
error: while searching for:
    EndIf
EndFunc   ;==>btnAttackNowTS

Func btnHide()
    ResumeAndroid()
    WinGetAndroidHandle()

error: patch failed: COCBot/GUI/MBR GUI Control Bottom.au3:340
error: while searching for:

    If $Hide = False Then
        GUICtrlSetData($btnHide, GetTranslated(13,25, "Show"))
        Local $a = WinGetPos($HWnD)
        $botPos[0] = $a[0]
        $botPos[1] = $a[1]

error: patch failed: COCBot/GUI/MBR GUI Control Bottom.au3:348
error: while searching for:
        $Hide = True
    Else
        GUICtrlSetData($btnHide, GetTranslated(13,11, "Hide"))

        If $botPos[0] = -32000 Then
            WinMove2($HWnD, "", 0, 0)

error: patch failed: COCBot/GUI/MBR GUI Control Bottom.au3:355
Checking patch COCBot/GUI/MBR GUI Control Tab MOD.au3...
error: COCBot/GUI/MBR GUI Control Tab MOD.au3: already exists in working directory
Checking patch COCBot/GUI/MBR GUI Design Tab Expert.au3...
error: while searching for:
        GUICtrlSetLimit(-1, 2)
        GUICtrlSetFont(-1, 8)
    $y += 23
    $cmbDisposeWindowsCond = GUICtrlCreateCombo("", $x + 15, $y, 160, 20, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
        GUICtrlSetData(-1, GetTranslated(10,22, "0,0: BlueStacks-Bot") & "|" & GetTranslated(10,23, "0,0: Bot-BlueStacks") & "|" & GetTranslated(10,24, "SNAP: Bot TopRight to BS") &"|" & GetTranslated(10,25, "SNAP: Bot TopLeft to BS") & "|" & GetTranslated(10,26, "SNAP: Bot BottomRight to BS") & "|" & GetTranslated(10,27, "SNAP: Bot BottomLeft to BS") , GetTranslated(10,24, "SNAP: Bot TopRight to BS"))
        $txtTip &= @CRLF & GetTranslated(10,28, "0,0: Reposition BS screen to position 0,0 on windows desktop and align Bot window right or left to it.") & @CRLF & GetTranslated(10,29, "SNAP: Only reorder windows, Align Bot window to BlueStacks window at Top Right, Top Left, Bottom Right or Bottom Left.")
        GUICtrlSetTip(-1, $txtTip)
        GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateGroup("", -99, -99, 1, 1)

error: patch failed: COCBot/GUI/MBR GUI Design Tab Expert.au3:92
Checking patch COCBot/GUI/MBR GUI Design Tab MOD.au3...
error: COCBot/GUI/MBR GUI Design Tab MOD.au3: already exists in working directory
Checking patch COCBot/MBR Functions.au3...
error: while searching for:
#include "functions\Village\UpgradeHeroes.au3"
#include "functions\Village\ClanLevel.au3"
#include "functions\Village\StarBonus.au3"

error: patch failed: COCBot/MBR Functions.au3:255
Checking patch COCBot/MBR GUI Control.au3...
error: while searching for:
#include "GUI\MBR GUI Control Tab EndBattle.au3"
#include "GUI\MBR GUI Control Tab Donate.au3"
#include "GUI\MBR GUI Control Tab Misc.au3"
#include "GUI\MBR GUI Control Tab Upgrade.au3"
#include "GUI\MBR GUI Control Tab Notify.au3"
#include "GUI\MBR GUI Control Tab Expert.au3"

error: patch failed: COCBot/MBR GUI Control.au3:54
Checking patch COCBot/MBR GUI Design.au3...
error: while searching for:
#include "GUI\MBR GUI Design Tab EndBattle.au3"
#include "GUI\MBR GUI Design Tab Donate.au3"
#include "GUI\MBR GUI Design Tab Misc.au3"
#include "GUI\MBR GUI Design Tab Upgrade.au3"
#include "GUI\MBR GUI Design Tab Notify.au3"
#include "GUI\MBR GUI Design Tab Expert.au3"

error: patch failed: COCBot/MBR GUI Design.au3:44
Checking patch COCBot/MBR Global Variables.au3...
error: while searching for:
Global $ExtendedCocSearchArea = "15|25|825|625" ; Extended
; Similarity ( like tolerance ) 0,00 to 1,00
Global $ToleranceImgLoc = 0.95

error: patch failed: COCBot/MBR Global Variables.au3:1165
Checking patch COCBot/functions/Android/modifyAndroid.au3...
error: COCBot/functions/Android/modifyAndroid.au3: already exists in working directory
Checking patch COCBot/functions/Android/taskbarIcon.au3...
error: COCBot/functions/Android/taskbarIcon.au3: already exists in working directory
Checking patch COCBot/functions/Config/applyConfig.au3...
error: while searching for:
    chkUseAttackABCSV()


    ; Reenabling window redraw
    If $bRedrawAtExit Then SetRedrawBotWindow(True)


error: patch failed: COCBot/functions/Config/applyConfig.au3:1717
Checking patch COCBot/functions/Config/readConfig.au3...
error: while searching for:
;~         $MilkFarmAlgorithmTh = IniRead($config,"MilkingAttack","TownHallAlgorithm","Bam")
;~         $MilkFarmSnipeEvenIfNoExtractorsFound = IniRead($config,"MilkingAttack","TownHallHitAnyway","1")

    Else

error: patch failed: COCBot/functions/Config/readConfig.au3:667
Checking patch COCBot/functions/Config/saveConfig.au3...
error: while searching for:
;~     IniWrite($config, "MilkingAttack", "TownHallAlgorithm", $MilkFarmAlgorithmTh)
;~     IniWrite($config, "MilkingAttack", "TownHallHitAnyway", $MilkFarmSnipeEvenIfNoExtractorsFound)

    If $hFile <> -1 Then FileClose($hFile)

EndFunc   ;==>saveConfig

error: patch failed: COCBot/functions/Config/saveConfig.au3:1604
Checking patch COCBot/functions/Other/WindowsArrange.au3...
error: while searching for:
; Parameters ....: None
; Return values .: None
; Author ........: Sardo (2015-06) (2015-09)
; Modified ......:
;
; Remarks .......: This file is part of MyBot, previously known as ClashGameBot. Copyright 2015-2016
;                  MyBot is distributed under the terms of the GNU GPL

error: patch failed: COCBot/functions/Other/WindowsArrange.au3:5
error: while searching for:
        Local $BOTw = $BOTPos[2]
        Local $BOTh = $BOTPos[3]
        ;Setlog($sBotTitle & " position found:" & $BOTx & "," & $BOTy & " w:" & $BOTw & " h:" & $BOTh)
        ;Setlog(Number( $BSx) & " " & Number($BSy ) )
        ;SetLog(@DesktopWidth)


        If Number( $BSx) > -30000 and Number($BSy ) > -30000 Then
            Switch $position
                Case "BS-BOT" ; position left bs, right adjacent BOT
                    $BSHandle = WinMove2($HWnD, "", 0 + Number($offsetX) , 0 + number($offsetY))

error: patch failed: COCBot/functions/Other/WindowsArrange.au3:32
error: while searching for:
                    If _Sleep($iDelayWindowsArrange1) Then Return
                    $BSHandle = WinMove2($HWnD, "", Number($BOTw) + Number($offsetX)*2, 0 + number($offsetY))
                    If _Sleep($iDelayWindowsArrange1) Then Return
                Case "SNAP-TR" ; position BOT top right of BS, do not move BS
                    If $BSx + $BSw + number($offsetX) < @DesktopWidth Then $BOTHandle = WinMove2($sBotTitle, "", $BSx + $BSw + Number($offsetX), $BSy )
                    If _Sleep($iDelayWindowsArrange1) Then Return
                Case "SNAP-BR" ; position BOT botom right of BS, do not move BS
                    If $BSx + $BSw + number($offsetY) < @DesktopWidth Then $BOTHandle = WinMove2($sBotTitle, "", $BSx + $BSw + Number($offsetX), $BSy + ( $BSh- $BOTh )  )
                    If _Sleep(500) Then Return
                Case "SNAP-TL" ; position BOT top left of BS, do not move BS
                    If $BSx  >=100 Then $BOTHandle = WinMove2($sBotTitle, "", $BSx - $BOTw - Number($offsetX), $BSy )
                    If _Sleep($iDelayWindowsArrange1) Then Return
                Case "SNAP-BL" ; position BOT bottom left of BS, do not move BS
                    If $BSx >= 100 Then $BOTHandle = WinMove2($sBotTitle, "", $BSx - $BOTw - Number($offsetX), $BSy + ( $BSh- $BOTh ) )
                    If _Sleep($iDelayWindowsArrange1) Then Return
            EndSwitch
        EndIf
    EndIf


EndFunc   ;==>WindowsArrange

Func DisposeWindows()

error: patch failed: COCBot/functions/Other/WindowsArrange.au3:46
error: while searching for:
                Case 1
                    WindowsArrange("BOT-BS",  $iWAOffsetX, $iWAOffsetY)
                Case 2
                    WindowsArrange("SNAP-TR", $iWAOffsetX, $iWAOffsetY)
                Case 3
                    WindowsArrange("SNAP-TL", $iWAOffsetX, $iWAOffsetY)
                Case 4
                    WindowsArrange("SNAP-BR", $iWAOffsetX, $iWAOffsetY)
                Case 5
                    WindowsArrange("SNAP-BL", $iWAOffsetX, $iWAOffsetY)
            EndSwitch
        Else
            If $bMonitorHeight800orBelow Then

error: patch failed: COCBot/functions/Other/WindowsArrange.au3:74
Checking patch MyBot.run.au3...
error: while searching for:
$sBotVersion = "v5.3.2" ;~ Don't add more here, but below. Version can't be longer than vX.y.z because it it also use on Checkversion()
$sBotTitle = "My Bot " & $sBotVersion & " " ;~ Don't use any non file name supported characters like \ / : * ? " < > |

Opt("WinTitleMatchMode", 3) ; Window Title exact match mode
#include "COCBot\functions\Main Screen\Android.au3"

If $aCmdLine[0] < 2 Then
    DetectRunningAndroid()
    If Not $FoundRunningAndroid Then DetectInstalledAndroid()
EndIf
; Update Bot title
$sBotTitle = $sBotTitle & "(" & ($AndroidInstance <> "" ? $AndroidInstance : $Android) & ")" ;Do not change this. If you do, multiple instances will not work.

If $bBotLaunchOption_Restart = True Then
   If CloseRunningBot($sBotTitle) = True Then
      ; wait for Mutexes to get disposed
      ;Sleep(1000) ; slow systems
   EndIf
EndIF

Local $cmdLineHelp = "By using the commandline (or a shortcut) you can start multiple Bots:" & @CRLF & _
                     "     MyBot.run.exe [ProfileName] [EmulatorName] [InstanceName]" & @CRLF & @CRLF & _
                     "With the first command line parameter, specify the Profilename (you can create profiles on the Misc tab, if a " & _
                     "profilename contains a {space}, then enclose the profilename in double quotes). " & _
                     "With the second, specify the name of the Emulator and with the third, an Android Instance (only for Droid4x & MEmu). " & @CRLF & _
                     "Supported Emulators are BlueStacks, BlueStacks2, Droid4X and MEmu." & @CRLF & @CRLF & _
                     "Examples:" & @CRLF & _
                     "     MyBot.run.exe MyVillage BlueStacks2" & @CRLF & _
                     '     MyBot.run.exe "My Second Village" MEmu MEmu_1'

$hMutex_BotTitle = _Singleton($sBotTitle, 1)
If $hMutex_BotTitle = 0 Then
    MsgBox($MB_OK + $MB_ICONINFORMATION, $sBotTitle, "My Bot for " & $Android & ($AndroidInstance <> "" ? " (instance " & $AndroidInstance & ")" : "") & " is already running." & @CRLF & @CRLF & $cmdLineHelp)
    Exit
EndIf

$hMutex_Profile = _Singleton(StringReplace($sProfilePath & "\" & $sCurrProfile, "\", "-"), 1)
If $hMutex_Profile = 0 Then
   _WinAPI_CloseHandle($hMutex_BotTitle)
    MsgBox($MB_OK + $MB_ICONINFORMATION, $sBotTitle, "My Bot with Profile " & $sCurrProfile & " is already running in " & $sProfilePath & "\" & $sCurrProfile & "." & @CRLF & @CRLF & $cmdLineHelp)
    Exit
EndIf

$hMutex_MyBot = _Singleton("MyBot.run", 1)
$OnlyInstance = $hMutex_MyBot <> 0 ; And False
SetDebugLog("My Bot is " & ($OnlyInstance ? "" : "not ") & "the only running instance")

error: patch failed: MyBot.run.au3:41
error: while searching for:
MBRFunc(True) ; start MBRFunctions dll
debugMBRFunctions($debugSearchArea, $debugRedArea, $debugOcr) ; set debug levels

If $FoundRunningAndroid Then
    SetLog("Found running " & $Android & " " & $AndroidVersion, $COLOR_GREEN)
EndIf
If $FoundInstalledAndroid Then
    SetLog("Found installed " & $Android & " " & $AndroidVersion, $COLOR_GREEN)
EndIf

error: patch failed: MyBot.run.au3:119
Applying patch COCBot/GUI/MBR GUI Control Bottom.au3 with 5 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Applying patch COCBot/GUI/MBR GUI Design Tab Expert.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/MBR Functions.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/MBR GUI Control.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/MBR GUI Design.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/MBR Global Variables.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/functions/Config/applyConfig.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/functions/Config/readConfig.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/functions/Config/saveConfig.au3 with 1 reject...
Rejected hunk #1.
Applying patch COCBot/functions/Other/WindowsArrange.au3 with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Applying patch MyBot.run.au3 with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.


Completed with errors, see above.

 

Thats becoz the diff file you are trying to patch is applicable to the base MBR version only. Not to already modded version.

 

If you want to apply other feature alongwith ones, use the appropriate def file or else you will continue getting the error message.

 

As for applying  Android Profile setting mod please change it manually. You cant do it on the modded version with the method elucidated by LunaEclipse.

 

I had to learn it myself to do that. It high time you start learning to do the same.

 

If you need further assistance or clarification, let me know.

Link to post
Share on other sites
  • 3 weeks later...
On 3/27/2016 at 5:26 AM, blero said:

@LunaEclipse thanks for tutorial but i have error 

I have error while comitting
 

git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -F C:\Users\blero\AppData\Local\Temp\evx40tch.uvz

*** Please tell me who you are.

Run

  git config --global user.email "[email protected] "
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <[email protected] (none)>) not allowed


Completed with errors, see above.

Same error. I used smartzap on official 5.3.2. ;(

Link to post
Share on other sites
  • 2 weeks later...
Just now, giadima said:

there is a tutorial explaining how to develop a .diff?

Create a commit with the base bot. Then make a commit with the changes you want the diff to have. Go to Actions, and click Create Patch, then select the commit you have just made. You will be able to select where to save the diff.

  • Upvote 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...