Jump to content
Sign in to follow this  
TerryisBroke

EndFunc error

Recommended Posts

TerryisBroke

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

Share this post


Link to post
Share on other sites
JFee

Where is the Func declaration in the first place?


Regards,Josh

Share this post


Link to post
Share on other sites
Richard Robertson

That code is indented weird. At first, I couldn't even figure out where the If block ended. For sure though, we need to know what happened to the Func declaration.

Share this post


Link to post
Share on other sites
TerryisBroke

Where is the Func declaration in the first place?

umm last line

1083) : ==> "If" statement has no matching "EndIf" statement.:

I don't know if that's what your asking

Share this post


Link to post
Share on other sites
JFee

....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

Share this post


Link to post
Share on other sites
TerryisBroke

....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)

Share this post


Link to post
Share on other sites
JFee

....Post all of the code in one block please


Regards,Josh

Share this post


Link to post
Share on other sites
TerryisBroke

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

Share this post


Link to post
Share on other sites
Richard Robertson

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.

Share this post


Link to post
Share on other sites
TerryisBroke

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.

Again...im new lol

Share this post


Link to post
Share on other sites
JFee

Well #1 that code is a mess, just with all the nested If's

#2 you can't call the same function from itself


Regards,Josh

Share this post


Link to post
Share on other sites
system24

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]

Share this post


Link to post
Share on other sites
TerryisBroke

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

Share this post


Link to post
Share on other sites
JFee

Why are you using an array function in the first place?


Regards,Josh

Share this post


Link to post
Share on other sites
TerryisBroke

Why are you using an array function in the first place?

I was told to in another thread.

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

Edited by TerryisBroke

Share this post


Link to post
Share on other sites
system24

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]

Share this post


Link to post
Share on other sites
Paulie

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

Share this post


Link to post
Share on other sites
Richard Robertson

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.

Share this post


Link to post
Share on other sites
JFee

Alright, fine. I misused my words. I said "You can't call a function from within itself", and what I meant was "You shouldn't call a function from within itself"


Regards,Josh

Share this post


Link to post
Share on other sites
Richard Robertson

No, it has very valid use when done correctly. I've seen some very good recursive functions. What you meant was "this user shouldn't be calling a function from within itself." muttley

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.