Jump to content

Help with If... Then


Recommended Posts

The problem I am having is with this block of text:

If ($z[0], $z[1]) = ($x,$y) Then

$x = Random(846, 953)

$y = Random(603, 652)

Endif

It keeps giving me an error that I don't have a right bracket after ($z[0], $z[1]

Does anyoneknow how to solve this?

; Dark Orbit bonus Box Bot BY Johnathan K.
HotKeySet("x", "MyExit")
WinMove( "www.DarkOrbit.com - Windows Internet Explorer", "", 0, -20, 1152, 884)
Sleep(5000)
$i = 0
$x = Random(846, 953)
$y = Random(603, 652)

Do
    MouseClick("left", $x, $y, 1, 1)
    $z = PixelSearch(840, 593, 963, 662, 0x37AA00, 40)
    If @error Then
        MsgBox(0, "Error", "Pixel not found")
        Send( "x")
    EndIf   
    If ($z[0], $z[1]) = ($x,$y) Then 
        $x = Random(846, 953)
        $y = Random(603, 652)
    Endif
    $coord2 = PixelSearch(0, 110, 1860, 800, 0xFFC07A, 8)
        If Not @error Then
        MouseClick("left",$coord2[0], $coord2[1], 1, 1)
        Sleep(5000)
        $coord2 = PixelSearch(0, 110, 1860, 800, 0xFFC07A, 8)
            If not @error then
            MouseClick("left",$coord2[0], $coord2[1], 1, 1)
            Sleep(3000)
            EndIf
        EndIf
Until $i >= 10

Func MyExit()
    Exit 
EndFunc
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...