Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GoldElixirChange.au3 not called
#1
GoldElixirChange funktion is not called in COC Bot.au3

I think you misses to readd the call of the funktion!

Code:
Func AttackMain() ;Main control for attack functions
PrepareSearch()
If _Sleep(1000) Then Return
VillageSearch($TakeAllTownSnapShot)
If _Sleep(1000) Or $Restart = True Then Return
PrepareAttack()
If _Sleep(1000) Then Return
Attack()
If _Sleep(1000) Then Return
ReturnHome($TakeLootSnapShot)
If _Sleep(1000) Then Return
EndFunc ;==>AttackMain
should be:
Code:
Func AttackMain() ;Main control for attack functions
PrepareSearch()
If _Sleep(1000) Then Return
VillageSearch($TakeAllTownSnapShot)
If _Sleep(1000) Or $Restart = True Then Return
PrepareAttack()
If _Sleep(1000) Then Return
Attack()
If _Sleep(1000) Then Return
GoldElixirChange()
If _Sleep(1000) Then Return
ReturnHome($TakeLootSnapShot)
If _Sleep(1000) Then Return
EndFunc ;==>AttackMain
Reply
#2
Are you using this bot ONLY 1 TIME?
view this code from village\ReturnHome.au3
Code:
Func ReturnHome($TakeSS = 1, $GoldChangeCheck = True) ;Return main screen
        If $GoldChangeCheck = True Then
            If $checkKPower Or $checkQPower Then
                If _Sleep(50000 - $delayActivateKQ) Then Return
            Else
                If _Sleep(50000) Then Return
            EndIf
            While GoldElixirChange()
                If _Sleep(1000) Then Return
            WEnd
        EndIf

        $checkKPower = False
        $checkQPower = False
        SetLog("Returning Home", $COLOR_BLUE)
        If $RunState = False Then Return
        Click(62, 519) ;Click Surrender
        If _Sleep(500) Then Return
        Click(512, 394) ;Click Confirm
        If _Sleep(2000) Then Return

        If $TakeSS = 1 Then
            SetLog("Taking snapshot of your loot", $COLOR_ORANGE)
            Local $Date = @MDAY & "." & @MON & "." & @YEAR
            Local $Time = @HOUR & "." & @MIN
            _CaptureRegion()
            _GDIPlus_ImageSaveToFile($hBitmap, $dirLoots & $Date & " at " & $Time & ".jpg")
        EndIf

        If _Sleep(2000) Then Return
        Click(428, 544) ;Click Return Home Button

        Local $counter = 0
        While 1
            If _Sleep(2000) Then Return
            _CaptureRegion()
            If _ColorCheck(_GetPixelColor(284, 28), Hex(0x41B1CD, 6), 20) Then
                _GUICtrlEdit_SetText($txtLog, "")
                Return
            EndIf

            $counter += 1

            If $counter >= 50 Then
                SetLog("Cannot return home.", $COLOR_RED)
                checkMainScreen()
                Return
            EndIf
        WEnd
EndFunc   ;==>ReturnHome
Reply
#3
Ah ok sry
Reply
 


Forum Jump:


Users browsing this thread: 1 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website