Jump to content

Recommended Posts

Posted (edited)

sorry for double entry

Just hit the delete button ( bottom right of YOUR post

************************************

Try to make it fancy

Opt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client
Opt("PixelCoordMode", 2) ;1=absolute, 0=relative, 2=client

HotKeySet("{F1}", "PK")
HotKeySet("{F2}", "End")

;Elephant Pixels
$Elephant = StringSplit("0x296163,0x089a08,0xbd9a18,0xc69a08,0xc65929,0xde6542,0xa52000,0x101421", ",")

;Mouseclick options.
$button = "right" 
$clicks = 1
Dim $go = 0

While 1
    
    $found = 1
    If $go = 1 Then
        For $x = 1 To $Elephant[0]
            $search = PixelSearch(143, 143, 766, 467, $Elephant[$x], 10, 10)
            If Not @error Then
                $found = 2
                Send("^a")
                MouseClick($button, $search[0], $search[1], $clicks)
                TrayTip("Congratulations", "You attacked Elephant (" & $x & ") with success", 0)
            EndIf
        Next
        If $found = 1 Then
            TrayTip("Error", "Cannot find correct color. Will try again in 5 seconds ", 0)
            $found = 10
        EndIf
    EndIf
    Sleep(500 * $found/2)
    TrayTip("","",1)
    Sleep(500 * $found/2)
WEnd

Func PK()
    $go = Not $go
EndFunc   ;==>PK

Func End()
    Exit
EndFunc   ;==>End

... not sure that the strinsplit with work with non-string numbers

it will go when you press F1

it will "pause" if you press F1 again

it will try to find the colors again after 5 seconds rather than exiting so quick

8)

Edited by Valuater

NEWHeader1.png

Posted

Just hit the delete button ( bottom right of YOUR post

************************************

Try to make it fancy

Opt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client
Opt("PixelCoordMode", 2) ;1=absolute, 0=relative, 2=client

HotKeySet("{F1}", "PK")
HotKeySet("{F2}", "End")

;Elephant Pixels
$Elephant = StringSplit("0x296163,0x089a08,0xbd9a18,0xc69a08,0xc65929,0xde6542,0xa52000,0x101421", ",")

;Mouseclick options.
$button = "right" 
$clicks = 1
Dim $go = 0

While 1
    
    $found = 1
    If $go = 1 Then
        For $x = 1 To $Elephant[0]
            $search = PixelSearch(143, 143, 766, 467, $Elephant[$x], 10, 10)
            If Not @error Then
                $found = 2
                Send("^a")
                MouseClick($button, $search[0], $search[1], $clicks)
                TrayTip("Congratulations", "You attacked Elephant (" & $x & ") with success", 0)
            EndIf
        Next
        If $found = 1 Then
            TrayTip("Error", "Cannot find correct color. Will try again in 5 seconds ", 0)
            $found = 10
        EndIf
    EndIf
    Sleep(500 * $found/2)
    TrayTip("","",1)
    Sleep(500 * $found/2)
WEnd

Func PK()
    $go = Not $go
EndFunc   ;==>PK

Func End()
    Exit
EndFunc   ;==>End

... not sure that the strinsplit with work with non-string numbers

8)

Valuator, that works amazing!!! The main functions are done. :)

Although currently only attacking 1 person of that colour when multiple of the character is there. ^_^

But, only had AutoIt no more than 2 weeks :)

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
  • Recently Browsing   0 members

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