Jump to content

Auto Clic Moving Object


Aklentys
 Share

Recommended Posts

I tried this

Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

Dim $Coord, $Click, $Target, $SearchResult

$Target = 0x7B7D4A

$Click = "Right"

While 1

$SearchResult = PixelSearch(360,49,1005,337,0x7B7D4A,1);

If @error Then

Else

MouseClick($Click, $SearchResult, $SearchResult)

Send("{F3}") ; This is the skill to be used on the enemy.

Sleep(10000)

EndIf

WEnd

Doesnt work at Mouseclick :/ The mouse goes at 0,0 and clic here -.-

Edited by Aklentys
Link to comment
Share on other sites

i've been trying to get a script working for almost the same reason.. im just stuck on telling my script that the target pixel moves when the mouse moves.. but if you're looking for something basic this is what you can use

HotKeySet("{F1}", "_Exit")
HotKeySet("{F5}", "Start")
HotKeySet("{F6}", "Stop")

Global $ON = False
Global $color = 0x960000

Opt("MouseCoordMode", 1)
Opt("PixelCoordMode", 1)
Opt("MouseClickDelay", 0)
Opt("MouseClickDownDelay", 0)

While 1
    Sleep(10)
    If $ON = True Then
        $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $color, 1, 2)
        If IsArray($coord) = 1 Then
            MouseClick( $coord[0], $coord[1], 1, 0)
            Sleep(10)
        EndIf
    EndIf
WEnd

Func _Exit()
    Exit
EndFunc
Func Start()
    $ON = True
EndFunc
Func Stop()
    $ON = False
EndFunc

of course you change $color to whatever you want it to be

Edited by demandnothing
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...