I want to make a bot for mff. an auto plant and water bot, but how can i make it click every square 1 time?
[Only registered and activated users can see links. Click Here To Register...]
This is my code right now:
[Only registered and activated users can see links. Click Here To Register...]
This is my code right now:
Code:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\ruud\documents\koda\forms\mff bot.kxf
$Form1_1 = GUICreate("Form1", 150, 213, 200, 128)
$Exit = GUICtrlCreateButton("Exit", 80, 80, 65, 25)
$Plant = GUICtrlCreateButton("Plant!", 8, 80, 65, 25)
$Seeds = GUICtrlCreateCombo("Seeds", 8, 16, 124, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Carrot")
GUICtrlSetCursor (-1, 2)
GUICtrlCreateInput("", 40, 48, 33, 21)
$From = GUICtrlCreateLabel("From", 8, 48, 27, 17)
$To = GUICtrlCreateLabel("To", 80, 48, 17, 17)
GUICtrlCreateInput("", 98, 48, 33, 21)
$Username = GUICtrlCreateInput("Username", 8, 112, 121, 21)
$Password = GUICtrlCreateInput("Password", 8, 144, 121, 21)
$Login = GUICtrlCreateButton("Login!", 8, 176, 137, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Exit
Exit
Case $Plant
_bot()
Case $Login
_Login()
func _bot()
EndFunc
func _Login()
$_Username = GUICtrlRead($Username)
$_Password = GUICtrlRead($Password)
MouseMove(585, 160, 10)
Sleep(300)
MouseClick("left")
Sleep(300)
Send($_Username)
Sleep(300)
MouseMove(772, 160, 10)
Sleep(300)
MouseClick("left")
Sleep(300)
Send($_Password)
Sleep(300)
MouseMove(962, 160, 10)
MouseClick("left")
EndFunc
EndSwitch
WEnd