Jump to content

EndFunc error


Recommended Posts

Heres part of the code

$Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10)
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        Else
        Sleep(16000)
        MouseClick("left", 99, 377, 1)                                          ;Patch 12
        MouseClick("left", 122, 419, 1)
        Loop()
    EndIf
Loop()
EndFunc

I get a EndFunc error which i obviously don't want so can someone tell me whats wrong?

Edited by TerryisBroke
Link to comment
Share on other sites

....no. EndFunc is used to to end the block of code that is started with a Func code.

If you don't have a Func declaration, there is no function, and no need to end it. Look up functions in the help file

Regards,Josh

Link to comment
Share on other sites

....no. EndFunc is used to to end the block of code that is started with a Func code.

If you don't have a Func declaration, there is no function, and no need to end it. Look up functions in the help file

First part of the code

MouseClick("left", 186, 434, 1)
MouseClick("left", 186, 434, 1)
Sleep(10000)
MouseClick("left", 215, 458, 1)
MouseClick("left", 215, 458, 1)
Sleep(10000)
Loop()
    
    
    func Loop()
    $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10)
Link to comment
Share on other sites

Started this stuff yesterday don't know all these terms sorry.

Run("C:\Program Files\Dofus\Dofus.exe")
Sleep(3000)
WinMove("Dofus", "", 0, 0,1024,768 )
Sleep(3000)
MouseClick("left", 201, 293, 1)
Send("Nicebot")
MouseClick("left", 256, 371, 1)
Send("Nicebot1")
Send("{ENTER}")
Sleep(10000)
MouseClick("left", 186, 434, 1)
MouseClick("left", 186, 434, 1)
Sleep(10000)
MouseClick("left", 215, 458, 1)
MouseClick("left", 215, 458, 1)
Sleep(10000)
Loop();Goes to the function "Loop"
    
    
    func Loop()
    $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
    Else 
        MouseClick("left", 786, 174, 1)                                                       ;Patch 1
        MouseClick("left", 813, 202, 1) 
        Sleep(16000)
        MouseClick("left", 756, 145, 1)                                                       ;Patch 2
        MouseClick("left", 781, 175, 1)
        Sleep(100)
        $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
        If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        Else
            Sleep(16000)
            MouseClick("left", 610, 175, 1)                                                   ;Patch 3
            MouseClick("left", 637, 215, 1)
                $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        Else
            Sleep(16000)
            Mouseclick("Left", 653, 170, 1)                                                 ;Patch 4
            MouseClick("left", 679, 210, 1)
            $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
                Else
            Sleep(16000)
            MouseClick("left", 251, 244, 1)                                          ;Patch 5
            MouseClick("left", 276, 280, 1)
            $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
            Else
            Sleep(16000)
            MouseClick("left", 213, 261, 1)                                     ;Patch 6
            MouseClick("left", 243, 298, 1)
            $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        Else
        Sleep(16000)
MouseClick("left", 213, 392, 1)                                             ;Patch 7
MouseClick("left", 239, 430, 1)
$Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        Else
        Sleep(16000)
        MouseClick("left", 176, 360, 1)                                          ;Patch 8
        MouseClick("left", 201, 396, 1)
        $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        Else
        Sleep(16000)
        Mouseclick("left", 175, 418, 1)                                      ;Patch 9
        MouseClick("left", 195, 457, 1)
        $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        Else
        Sleep(16000)
        MouseClick("left", 140, 391, 1)                                     ;Patch 10
        MouseClick("left", 169, 433, 1)
        $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        Else
        Sleep(16000)
        MouseClick("left", 139, 338, 1)                                     ;Patch 11
        MouseClick("left", 165, 378, 1)
        $Attacker=Pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x34403E,1,2)
    If IsArray ($Attacker=1) Then
        $x=$Attacker[0]
        $y=$Attacker[1]
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Clicks the pixel that the pixelsearch found.
Sleep(3000)
MouseCLick("left", 613, 518, 1);Starting Square
Sleep(3000)
MouseClick("left", 793, 568, 1);Ready
Sleep(15000);Opponents Turn
MouseClick("left", 509, 466, 1);First Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 608, 410, 1);Second Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 717, 359, 1); Third Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 686, 301, 1);Fourth Move
Sleep(3000);Delay
MouseClick("left", 666, 742, 1);End Turn
Sleep(15000);Opponents Turn
MouseClick("left", 714, 257, 1);Fifth Move
Sleep(3000);Delay
MouseClick("left", 714, 257, 1);Attack
Sleep(1000);Delay
mouseclick("left",$Attacker[0],$Attacker[1],1,10)
        Sleep(3000);Delay
        MouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        ouseClick("left", 666, 742, 1);End Turn
        Sleep(15000);Opponents Turn
        MouseClick("left", 714, 257, 1);Attack
        Sleep(1000)
        mouseclick("left",$Attacker[0],$Attacker[1],1,10);Opponents Position
        Else
        Sleep(16000)
        MouseClick("left", 99, 377, 1)                                          ;Patch 12
        MouseClick("left", 122, 419, 1)
         Loop()
    EndIf
Loop()
EndFunc
Edited by TerryisBroke
Link to comment
Share on other sites

3 problems:

1. Your code has 11 If's, 11 Else's, and only one EndIf.

2. Your indentation is confusing.

3.

IsArray ($Attacker=1)

What the heck was that supposed to do? You are calling IsArray on a boolean value. It's always gonna return false.

[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]
Link to comment
Share on other sites

3 problems:

1. Your code has 11 If's, 11 Else's, and only one EndIf.

2. Your indentation is confusing.

3.

k

1. sounds easy to fix since i would need 11 EndIf

2. i love it too muttley

3. how would i fix the IsArray?

EDIT: I fixed the function problem so it runs now but i don't understand this array thing

Edited by TerryisBroke
Link to comment
Share on other sites

k

1. sounds easy to fix since i would need 11 EndIf

2. i love it too muttley

3. how would i fix the IsArray?

EDIT: I fixed the function problem so it runs now but i don't understand this array thing

1. Yes. You must put 10 more EndIf's after the first EndIf.

3. It must be IsArray($Attacker) = 1.

[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]
Link to comment
Share on other sites

I was told to in another thread.

I want the script to react when it finds the color pixel

Woah woah woah... You can't put the "IsArray($Attacker=1)" as me telling you to do it! i didn't evaluate your code for functionality... i fixed an error, and the code i gave you was this:

If IsArray($Attacker) then
;.... continue
Link to comment
Share on other sites

I remember that thread. Indeed.

Also, whichever one of you said something about not being able to call a function from itself, has clearly never heard of recursive functions. This recursive call is flawed though, because it will never end and just cause a stack overflow eventually. If you want a loop, just make a loop.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...