Jump to content

Darkages hunting bot


Recommended Posts

include <GUIConstants.au3>

;Set Variables
Global $Paused




;Set hotkeys
$check = 0
$d = "Darkages"
WinGetHandle($d)
WinMove ($d, "", 0, 0)
HotKeySet("{END}", "ToggleCheck")
WinActivate($d)
;Create GUI
GUICreate ("UD Chests",200,50)
GUICtrlCreateLabel ("UD Bot by Magiya",  60, 20, 160)
GUISetState()
ToggleCheck()

; Searches room for chest pixels, starting out with a small square, them making it bigger and bigger.
While 1
    
    $chestpixel = PixelSearch(255,160,360,250,0xB56910)
        If Not @error Then
        Send("^{DEL}")
        Attack()
        Else
        $chestpixel = PixelSearch(180,100,460,310,0xB56910)
        If Not @error Then
            Send("^{DEL}")
            Attack()
        Else
            $chestpixel = PixelSearch(85,63,563,351,0xB56910)
            If not @error Then 
                Send("^{DEL}")
                Attack()
                Else
                $chestpixel = PixelSearch(3,3,610,400,0xB56910)
                If Not @error Then
                    Send("^{DEL}")
                    Attack()
                    Else
                    
                EndIf
            EndIf
        EndIf
    EndIf
    
WEnd

; Clicks the chest, and assail/uses spells. Sleep funtion here is how long the bot will wait until it runs the search again.
Func Attack()
    

    
    MouseMove($chestpixel[0], $chestpixel[1], 0)
    MouseClick("right", $chestpixel[0], $chestpixel[1], 2)
    
    Sleep(2500)
;Uses Deo Lamh 3 times at the set time intervals. get rid of this if you want it to just assail.

    
    
    
    
    Send("^{INS}")

    
EndFunc



;PAUSE FUNCTION-------------------------------


Func ToggleCheck()
    If $check = 0 then
        $check = 1
        PauseOn()
    EndIf
    If $check = 1 then
        $check = 0
        PauseOn()
    EndIf
EndFunc

Func PauseOn()
    While $check = 1
        sleep(100)
    WEnd
EndFunc

;END PAUSE---------------------------------------

so basically what's "suppose" to happen is it searches for the pixel of the monster then it should double right click to attack the creature. i know the double right click isnt correct, what else can be fixed? any suggertions? please help :)

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