Jump to content

Help Bot


Recommended Posts

Hi I'm trying making a bot for a game that I have created, but i have some problems.

Here's my code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Bot v1.0", 210, 74, 302, 218)
GUISetBkColor(0x000000)
$Button1 = GUICtrlCreateButton("Avvio", 56, 8, 97, 25, $WS_GROUP)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x3399FF)
$Button2 = GUICtrlCreateButton("Esci", 56, 40, 97, 25, $WS_GROUP)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x3399FF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


WHILE 1
$NMSG=GUIGETMSG()
SWITCH $NMSG
CASE $GUI_EVENT_CLOSE
EXIT
CASE $Button1
Farm()
CASE $Button2
Exit
EndSwitch
WEnd

hotkeyset("{Z}", "Terminate")

Func Farm()
WinWaitActive ("S4 Client");
While 1
    MouseClick("left", 514, 696)
    Sleep(10000)
        Send ("{LCTRL}")
WEnd 
EndFunc

Func Terminate()
Exit
EndFunc

What I want is:

-Every 10 seconds it left clicks on x514 y696

-If I press Z it stops

-CTRL is always pressed

If you can help me making these, I have also other questions. Thanks

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