Jump to content

pixel search


age
 Share

Recommended Posts

HotKeySet("{F10}", "_Exit")

$Offset = 10 ; Clicks 10 pixels lower than the found pixel

While 1

$Search = PixelSearch(6,113,803,481,0x5A4129)

$Search1 = PixelSearch(6,113,803,481,0x392C21)

$Search2 = PixelSearch(6,113,803,481,0x291421)

$Search3 = PixelSearch(6,113,803,481,0x184D42,32,1)

if not @error then

MouseClick("Left", $Search[0],$Search[1]+$Offset, 1,0)

MouseClick("left")

MouseClick("left")

sleep(20000)

else

if not @error then

MouseClick("Left", $Search1[0],$Search1[1]+$Offset, 1,0)

MouseClick("left")

MouseClick("left")

sleep(20000)

else

if not @error then

MouseClick("Left", $Search2[0],$Search1[1]+$Offset, 1,0)

MouseClick("left")

MouseClick("left")

sleep(20000)

else

if not @error then

MouseClick("Left", $Search3[0],$Search3[1]+$Offset, 1,0)

MouseClick("left")

MouseClick("left")

sleep(20000)

EndIf

EndIf

EndIf

EndIf

WEnd

Func _Exit()

Exit

EndFunc

======================

can someone help me to coreection my script

this scritp for bot game domo online

if i just used one colour, this script can work,

i explain i search green colour monster, my character can hit monster but always hit not near monster

my character always hits far away monster, so my char always walks away to hit the far away monster

can u give tips for my script, so i can hit near monster

ps : why i need more than one colour pixel, cause in this game that colour of monster can change

thx thx

Link to comment
Share on other sites

  • Moderators

HotKeySet("{F10}", "_Exit")

Global $Offset = 10 ; Clicks 10 pixels lower than the found pixel
Global $aColors[5] = ['', 0x5A4129, 0x392C21, 0x291421, 0x184D42];Pixel Color to find
Global $aShade[5] = ['', 0, 0, 0, 32];Shade variations allowed
Global $aSearch
While 1
    For $iCC = 1 To 4
        $aSearch = PixelSearch(6, 113, 803, 481, $aColors[$iCC], $aShade[$iCC])
        If Not @error Then
            MouseClick("Primary", $aSearch[0], $aSearch[1] + $Offset, 3, 0);If we are clicking 3 times, just put it here
            ExitLoop;Color found/clicked, now start over
        EndIf
    Next
    Sleep(10);CPU break
WEnd

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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