Sign in to follow this  
Followers 0
BuddyBoy

ControlClick help?

1 post in this topic

Alright I'm still trying to improve my bot I'm STILL making for my friend... The problem is, once the bot is on, he can't do anything on his computer because all the mouse clicks are on the screen...

I looked up controlclick... Is there anyway I could put it into my code to click on an INACTIVE screen?

Opt("GUIOnEventMode", 1)
Opt("MouseCoordMode", 0)
Opt("PixelCoordMode", 0)
#include <GUIConstants.au3>

HotKeySet("{F5}", "On")
HotKeySet("{ESC}", "Terminate")
HotKeySet("^p", "_ToggleRun")

Global $Running = 0, $MPos, $PixelColor
Dim $SearchMob=0
Dim $Meteor=0
GUICreate("TUL- The Ultimate Leveler",150,122,100,100)
GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate")

$Label=GUICtrlCreateLabel("F5 to turn on bot.",10,5,130,15)
$Radio1=GUICtrlCreateRadio("Warrior/Trojan",10,35,130,15)
$Radio2=GUICtrlCreateRadio("Archer",10,65,130,15)


GUICtrlCreateLabel("Hours to d/c:",10,95,70,15)
$timelimit = GuiCtrlCreateCombo("1", 85, 91, 35, 21)
GuiCtrlSetData($timelimit, "2|3|4|5|6|7|8|9")


GUICtrlSetState ($Radio1, $GUI_CHECKED)
GUISetState()



While 1
    If $Running Then
     Pot()
    EndIf
    If $SearchMob Then
     pickmet()
     checktime() 
     Send("{F3}")
     Attack()
    EndIf
WEnd


Func checktime()
    $dif = TimerDiff($begin)   
    $maxtime = GUICtrlRead($timelimit) 
    $time = $maxtime*1000*3600; maxtime is in miliseconds * 1000 = seconds * 3600 = hours   
        If $dif > $time Then  
            WinClose("[Conquer2.0]", "")  
            Exit
        EndIf
EndFunc

Func pickmet()
    $metcoord=PixelSearch(200,100,825,600, 16758527,8)
    If NOT @error Then
    MouseClick("left",$metcoord[0], $metcoord[1],1,0)
    Sleep(5000)
    EndIf
EndFunc


Func Pot()
    If $PixelColor <> PixelGetColor($MPos[0], $MPos[1]) Then
        Send("{F2}")
        Sleep(1000)
    EndIf
EndFunc

Func _ToggleRun()
    $Running = NOT $Running
    If $Running Then
        $MPos = MouseGetPos()
        $PixelColor = PixelGetColor($MPos[0], $MPos[1])
    EndIf
EndFunc

Func On()
    $SearchMob=NOT $SearchMob
    If $SearchMob Then
        Global $begin = TimerInit();START THE TIME
        GUICtrlSetData($Label,"F5 to turn off bot.")
    Else
        GUICtrlSetData($Label,"F5 to turn on bot.")
    EndIf
EndFunc


Func Jump()
    $x=Random(0,1024,1)
    $y=Random(0,690,1)
    Send("{CTRLDOWN}")
    MouseClick("Left",$x,$y,1,0)
    Send("{CTRLUP}")
    Sleep(900)
EndFunc

Func Attack()
    $Coords=PixelSearch(200,100,825,600,12059395,5)
    If NOT @error Then
        If BitAND(GUICtrlRead($Radio1), $GUI_CHECKED) = $GUI_CHECKED then
        MouseClick("left",$Coords[0]+10,$Coords[1]+20,1,0)
        Sleep(1900)
        Else
        MouseClick("right",$Coords[0]+10,$Coords[1]+20,1,0)
        Sleep(1900)
        EndIf
    Else
        Jump()
    EndIf
EndFunc

Func Terminate()
    Exit
EndFunc;==> Terminate()

Thanks in advance :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0