# Forum > MMO > ArcheAge > ArcheAge Bots and Programs >  ArcheAge Pixel Bot

## AutoScript

Compile with autoit 3. If you do not know how Let me google that for you

Link to ESB 5.03

https://www.dropbox.com/home/Elzie's%20Simple%20Bot?preview=ESB+5.03.exe



```
 
; AutoIt Version: 3.0
; Language: English
; Platform: Win9x/NT
; Author: ESB

#Region Include
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <UpDownConstants.au3>
#include <Misc.au3>
#include <WindowsConstants.au3>
#include <DateTimeConstants.au3>
#include <date.au3>
#include <GDIPlus.au3>
#include <MsgBoxConstants.au3>
#RequireAdminaw
#EndRegion Include

#Region flags
$cot = 1
$Interrupt = 0
$EventCheck = 0
$P = 1
$fInterrupt = 0
$Tc = 0
#EndRegion flags

#Region    GUI
GUISetFont(8.5 * _GDIPlus_GraphicsGetDPIRatio()[0])
Opt("GUIOnEventMode", 1)
$hGUI = GUICreate("ArcheAge Pixel Bot 1.08a ", 338, 550, 401, 351, -1, BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
GUICtrlSetFont($hGUI, 6, 800, 0, "Arial")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetFont(11, 500, 1, "Tahoma")
GUISetBkColor(0xA6CAF0)
$Group1 = GUICtrlCreateGroup("", 8, 8, 318, 423, BitOR($GUI_SS_DEFAULT_GROUP, $BS_CENTER))
GUICtrlSetFont($Group1, 10, 800, 0, "Arial")
GUICtrlSetColor($Group1, 0x0C3500)

;======================================================================Labels

$Label1 = GUICtrlCreateLabel("Skill 1", 14, 103, 48, 22)
GUICtrlSetFont($Label1, 6, 300, 0, "Arial")
$Label2 = GUICtrlCreateLabel("Skill 2", 14, 135, 48, 22)
GUICtrlSetFont($Label2, 6, 300, 0, "Arial")
$Label3 = GUICtrlCreateLabel("Skill 3", 14, 166, 48, 23)
GUICtrlSetFont($Label3, 6, 300, 0, "Arial")
$Label4 = GUICtrlCreateLabel("Skill 4", 14, 198, 48, 22)
GUICtrlSetFont($Label4, 6, 300, 0, "Arial")
$Label5 = GUICtrlCreateLabel("Skill 5", 173, 103, 47, 22)
GUICtrlSetFont($Label5, 6, 300, 0, "Arial")
$Label6 = GUICtrlCreateLabel("Skill 6", 173, 135, 47, 22)
GUICtrlSetFont($Label6, 6, 300, 0, "Arial")
$Label7 = GUICtrlCreateLabel("Skill 7", 173, 166, 47, 23)
GUICtrlSetFont($Label7, 6, 300, 0, "Arial")
$Label8 = GUICtrlCreateLabel("Skill 8", 173, 198, 47, 22)
GUICtrlSetFont($Label8, 6, 300, 0, "Arial")
$Label9 = GUICtrlCreateLabel("Color " & @CRLF & "Variance ", 260, 34, 63, 22)
GUICtrlSetFont($Label9,6, 800, 0, "Arial")
GUICtrlSetColor($Label9, 0x008000)
$Label10 = GUICtrlCreateLabel("Health Check", 46, 226, 64, 15)
GUICtrlSetFont($Label10, 6, 800, 0, "Arial")
GUICtrlSetColor($Label10, 0x008000)
$Label12 = GUICtrlCreateLabel("Move", 166, 274, 38, 20)
GUICtrlSetFont($Label12, 9, 800, 0, "Arial")
$Label11 = GUICtrlCreateLabel("Rotation ", 166, 238, 61, 20)
GUICtrlSetFont($Label11, 9, 800, 0, "Arial")
$Label14 = GUICtrlCreateLabel("Mana Check", 47, 275, 58, 15)
GUICtrlSetFont($Label14, 7, 800, 0, "Arial")
GUICtrlSetColor($Label14, 0x0000FF)
$Label13 = GUICtrlCreateLabel("Pause", 158, 370, 38, 18)
GUICtrlSetFont(-1, 10, 800, 0, "Arial")
$Label15 = GUICtrlCreateLabel("Latency", 24, 328, 54, 20)
GUICtrlSetFont($Label15, 7, 800, 0, "Arial")

;======================================================================  Time input
$Checkbox8 = GUICtrlCreateCheckbox("Quit  ======>", 8, 440, 166, 30)
GUICtrlSetTip($Checkbox8, "This will exit bot at set time timer  .", "ArcheAge Pixel Bot", 1, 1)
GUICtrlSetFont($Checkbox8, 10, 800, 0, "Arial")
$Date1 = GUICtrlCreateDate(" ", 190, 440, 130, 30, $DTS_TIMEFORMAT)
$Checkbox9 = GUICtrlCreateCheckbox("Loguot ArcheAge", 8, 484, 185, 17)
GUICtrlSetTip($Checkbox9, "This will logout of ArcheAge at set time  .", "ArcheAge Pixel Bot", 1, 1)
GUICtrlSetFont($Checkbox9, 10, 800, 0, "Arial")
$Label16 = GUICtrlCreateLabel("00:00:00 **", 192, 480, 122, 26)
;=================================================================Inputs

$Input1 = GUICtrlCreateInput("1", 65, 97, 45, 24); skill 1 repeat
GUICtrlSetTip($Input1, "This will set how many times" & @CRLF & "  this skill will fire .    ", "ArcheAge Pixel Bot", 1, 1)
$hUpDown1 = GUICtrlCreateUpdown($Input1, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown1, 10, 0)
GUICtrlSetFont($Input1, 8, 800, 0, "Arial")
$Input2 = GUICtrlCreateInput("1", 65, 128, 45, 24); skill 2 repeat
$hUpDown2 = GUICtrlCreateUpdown($Input2, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown2, 10, 0)
GUICtrlSetFont($Input2, 8, 800, 0, "Arial")
$Input3 = GUICtrlCreateInput("1", 65, 160, 45, 24); skill 3 repeat
$hUpDown3 = GUICtrlCreateUpdown($Input3, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown3, 10, 0)
GUICtrlSetFont($Input3, 8, 800, 0, "Arial")
$Input4 = GUICtrlCreateInput("1", 65, 192, 45, 24); skill 4 repeat
$hUpDown4 = GUICtrlCreateUpdown($Input4, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown4, 10, 0)
GUICtrlSetFont($Input4, 8, 800, 0, "Arial")
$Input5 = GUICtrlCreateInput("1", 109, 97, 45, 24); skill 1 time
GUICtrlSetTip($Input5, "This will set delay time" & @CRLF & " for this skill  .    ", "ArcheAge Pixel Bot", 1, 1)
$hUpDown5 = GUICtrlCreateUpdown($Input5, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown5, 10, 0)
GUICtrlSetFont($Input5, 8, 800, 0, "Arial")
$Input6 = GUICtrlCreateInput("1", 109, 128, 45, 24); skill 2 time
$hUpDown6 = GUICtrlCreateUpdown($Input6, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown6, 10, 0)
GUICtrlSetFont($Input6, 8, 800, 0, "Arial")
$Input7 = GUICtrlCreateInput("1", 109, 160, 45, 24); skill 3 time
$hUpDown7 = GUICtrlCreateUpdown($Input7, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown7, 10, 0)
GUICtrlSetFont($Input7, 8, 800, 0, "Arial")
$Input8 = GUICtrlCreateInput("1", 109, 192, 45, 24); skill 4 time
$hUpDown8 = GUICtrlCreateUpdown($Input8, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown8, 10, 0)
GUICtrlSetFont($Input8, 8, 800, 0, "Arial")
$Input9 = GUICtrlCreateInput("1", 230, 97, 45, 24); skill 5 repeat
$hUpDown9 = GUICtrlCreateUpdown($Input9, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown9, 10, 0)
GUICtrlSetFont($Input9, 8, 800, 0, "Arial")
$Input10 = GUICtrlCreateInput("1", 274, 97, 45, 24); skill 5 time
$hUpDown10 = GUICtrlCreateUpdown($Input10, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown10, 10, 0)
GUICtrlSetFont($Input10, 8, 800, 0, "Arial")
$Input11 = GUICtrlCreateInput("1", 230, 128, 45, 24); skill 6 repeat
$hUpDown11 = GUICtrlCreateUpdown($Input11, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown11, 10, 0)
GUICtrlSetFont($Input11, 8, 800, 0, "Arial")
$Input12 = GUICtrlCreateInput("1", 274, 128, 45, 24); skill 6 time
$hUpDown12 = GUICtrlCreateUpdown($Input12, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown12, 10, 0)
GUICtrlSetFont($Input12, 8, 800, 0, "Arial")
$Input13 = GUICtrlCreateInput("1", 230, 160, 45, 24); skill 7 repeat
$hUpDown13 = GUICtrlCreateUpdown($Input13, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown13, 10, 0)
GUICtrlSetFont($Input13, 8, 800, 0, "Arial")
$Input14 = GUICtrlCreateInput("1", 274, 160, 45, 24); skill 7 time
$hUpDown14 = GUICtrlCreateUpdown($Input14, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown14, 10, 0)
GUICtrlSetFont($Input14, 8, 800, 0, "Arial")
$Input15 = GUICtrlCreateInput("1", 230, 192, 45, 24); skill 8 repeat
$hUpDown15 = GUICtrlCreateUpdown($Input15, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown15, 10, 0)
GUICtrlSetFont($Input15, 8, 800, 0, "Arial")
$Input16 = GUICtrlCreateInput("1", 274, 192, 45, 24); skill 8 time
$hUpDown16 = GUICtrlCreateUpdown($Input16, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown16, 10, 0)
GUICtrlSetFont($Input16, 8, 800, 0, "Arial")
$Input17 = GUICtrlCreateInput("17", 84, 33, 46, 24); buff 1 time
$hUpDown17 = GUICtrlCreateUpdown($Input17, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown17, 60, 0)
GUICtrlSetFont($Input17, 8, 800, 0, "Arial")
$Input18 = GUICtrlCreateInput("18", 84, 65, 46, 24); buff 2 time
$hUpDown18 = GUICtrlCreateUpdown($Input18, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown18, 60, 0)
GUICtrlSetFont($Input18, 8, 800, 0, "Arial")
$Input19 = GUICtrlCreateInput("2", 260, 65, 46, 24); collor input
$hUpDown19 = GUICtrlCreateUpdown($Input19, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown19, 10, 0)
GUICtrlSetFont($Input19, 8, 800, 0, "Arial")
$Input20 = GUICtrlCreateInput("20", 204, 33, 46, 24); buff 3 time
$hUpDown20 = GUICtrlCreateUpdown($Input20, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown20, 60, 0)
GUICtrlSetFont($Input20, 8, 800, 0, "Arial")
$Input21 = GUICtrlCreateInput("21", 204, 65, 46, 24); buff 4 time
$hUpDown21 = GUICtrlCreateUpdown($Input21, BitOR($UDS_WRAP, $UDS_NOTHOUSANDS))
GUICtrlSetLimit($hUpDown21, 60, 0)
GUICtrlSetFont($Input21, 8, 800, 0, "Arial")
Global $Input22 = GUICtrlCreateInput("=", 132, 242, 25, 24); ======================== health input
Global $Input23 = GUICtrlCreateInput("9", 132, 288, 25, 24); ======================== mana input
Global $Input24 = GUICtrlCreateInput("-", 296, 332, 20, 20) ; ======================== 2nd health input
$Input25 = GUICtrlCreateInput("1", 40, 97, 24, 24); send skill 1
GUICtrlSetTip($Input25, "This will set what key to send" & @CRLF & " for this skill .    ", "ArcheAge Pixel Bot", 1, 1)
GUICtrlSetFont($Input25, 8, 800, 0, "Arial")
$Input26 = GUICtrlCreateInput("2", 40, 128, 24, 24); send skill 2
GUICtrlSetFont($Input26, 8, 800, 0, "Arial")
$Input27 = GUICtrlCreateInput("3", 40, 160, 24, 24); send skill 3
GUICtrlSetFont($Input27, 8, 800, 0, "Arial")
$Input28 = GUICtrlCreateInput("4", 40, 192, 24, 24); send skill 4
GUICtrlSetFont($Input28, 8, 800, 0, "Arial")
$Input29 = GUICtrlCreateInput("5", 203, 98, 24, 24); send skill 5
GUICtrlSetFont($Input29, 8, 800, 0, "Arial")
$Input30 = GUICtrlCreateInput("6", 204, 128, 24, 24); send skill 6
GUICtrlSetFont($Input30, 8, 800, 0, "Arial")
$Input31 = GUICtrlCreateInput("7", 206, 160, 24, 24); send skill 7
GUICtrlSetFont($Input31, 8, 800, 0, "Arial")
$Input32 = GUICtrlCreateInput("8", 204, 192, 24, 24); send skill 8
GUICtrlSetFont($Input32, 8, 800, 0, "Arial")

;========================================================================== Sliders

$Slider1 = GUICtrlCreateSlider(231, 238, 87, 26); Rotaition
GUICtrlSetBkColor($Slider1, 0xA6CAF0)
$Slider2 = GUICtrlCreateSlider(230, 277, 87, 26); Move
GUICtrlSetBkColor($Slider2, 0xA6CAF0)
$Slider3 = GUICtrlCreateSlider(13, 244, 116, 22); Health
GUICtrlSetLimit($Slider3, 300, 10)
$hSlider_Handle3 = GUICtrlGetHandle(-1)
GUICtrlSetBkColor($Slider3, 0x008000)
$Slider4 = GUICtrlCreateSlider(13, 290, 116, 22); Mana
GUICtrlSetLimit($Slider4, 300, 10)
$hSlider_Handle4 = GUICtrlGetHandle(-1)
GUICtrlSetBkColor($Slider4, 0x0000FF)
$Slider5 = GUICtrlCreateSlider(152, 392, 48, 35) ; Pause
GUICtrlSetBkColor($Slider5, 0xA6CAF0)
GUICtrlSetLimit($Slider5, 2, 1)
$Slider6 = GUICtrlCreateSlider(88, 328, 62, 18)
GUICtrlSetLimit($Slider6, 1000, 100); 1 second for lag
GUICtrlSetBkColor($Slider6, 0xA6CAF0)

;======================================================================  CheckBox

$Checkbox1 = GUICtrlCreateCheckbox("Gift Box", 168, 355, 124, 12)
GUICtrlSetFont($Checkbox1, 7, 800, 0, "Arial")
$Checkbox2 = GUICtrlCreateCheckbox("Buff 1", 21, 40, 52, 12)
GUICtrlSetFont($Checkbox2, 7, 800, 0, "Arial")
$Checkbox3 = GUICtrlCreateCheckbox("Buff 2", 21, 71, 52, 12)
GUICtrlSetFont($Checkbox3, 7, 800, 0, "Arial")
$Checkbox4 = GUICtrlCreateCheckbox("2nd Health Check", 168, 332, 124, 12)
GUICtrlSetFont($Checkbox4, 7, 800, 0, "Arial")
$Checkbox5 = GUICtrlCreateCheckbox("Buff 3", 135, 40, 52, 12)
GUICtrlSetFont($Checkbox5, 7, 800, 0, "Arial")
$Checkbox6 = GUICtrlCreateCheckbox("Buff 4", 135, 71, 52, 12)
GUICtrlSetFont($Checkbox6, 7, 800, 0, "Arial")
$Checkbox7 = GUICtrlCreateCheckbox("Rotate One Direction", 168, 312, 153, 12)
GUICtrlSetFont($Checkbox7, 7, 800, 0, "Arial")


;=========================================================================== Buttons

$Button1 = GUICtrlCreateButton("Start", 16, 392, 123, 28, $BS_PUSHLIKE)
GUICtrlSetTip($Button1, "Be considerate of" & @CRLF & "   Other players.    ", "ArcheAge Pixel Bot", 1, 1)
GUICtrlSetOnEvent($Button1, "_Func_1")
GUICtrlSetFont($Button1, 9, 800, 0, "Arial")
$Button2 = GUICtrlCreateButton("Stop", 16, 392, 123, 28, $BS_PUSHLIKE)
GUICtrlSetOnEvent($Button2, "_Func_2")
GUICtrlSetFont($Button2, 9, 800, 0, "Arial")
GUICtrlSetState($Button2, $GUI_HIDE)
$Button3 = GUICtrlCreateButton("Support ESB", 16, 356, 123, 28)
GUICtrlSetOnEvent($Button3, "Web")
GUICtrlSetFont($Button3, 9, 800, 0, "Arial")
$Button5 = GUICtrlCreateButton("Save", 208, 392, 50, 28, $BS_PUSHLIKE)
GUICtrlSetOnEvent($Button5, "Save")
GUICtrlSetFont($Button5, 9, 800, 0, "Arial")
$Button6 = GUICtrlCreateButton("Load", 268, 392, 50, 28, $BS_PUSHLIKE)
GUICtrlSetOnEvent($Button6, "Load")
GUICtrlSetFont($Button6, 9, 800, 0, "Arial")

;============================================================================== Progress Bar

$Prog = GUICtrlCreateProgress(6, 518, 320, 20, $PBS_MARQUEE)

GUISetState(@SW_SHOW)
Opt("GUIOnEventMode", 1)
GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND")
#EndRegion    GUI

#Region Ver

;Global $set = GUICtrlRead($Timeq)
Global $Paused, $cot = 1, $iSec = @SEC
Global $title = WinGetTitle("[CLASS:ArcheAge]", "")
Global $In1 = TimerInit()
Global $In2 = TimerInit()
Global $In3 = TimerInit()
Global $In4 = TimerInit()
Global $In5 = TimerInit()
Global $In6 = TimerInit()
Global $ver = GUICtrlRead($Input19) ;===================== Color variance
Dim $pos[2], $pos1[2], $pos2[2], $pos3[2], $pos4[2]
#EndRegion Ver
GUIRegisterMsg($WM_HSCROLL, "WM_H_Slider")

Func WM_H_Slider($hWnd, $iMsg, $wParam, $lParam) ;
	#forceref $hWnd, $iMsg, $wParam
	If $lParam = $hSlider_Handle4 Then
		Global $mana = GUICtrlRead($Slider4)
	EndIf
	If $lParam = $hSlider_Handle3 Then
		Global $Health = GUICtrlRead($Slider3)
	EndIf
	Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_H_Slider

While 1
	Sleep(50)
	If $iSec <> @SEC Then
		GUICtrlSetData($Label16, _Time()); set lable time
		$iSec = @SEC
	EndIf
	If _IsChecked($Checkbox8) And _Time() >= GUICtrlRead($Date1) Then
		MsgBox(4096, " Time ", "Please Set Time " & @CRLF & _Time())
	EndIf
			If _IsChecked($Checkbox9) And _Time() >= GUICtrlRead($Date1) Then
			WinClose("[CLASS:ArcheAge]", "")
		EndIf

WEnd

Func _IsChecked($idControlID);===================== Look for Check box ======================
	Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED
EndFunc   ;==>_IsChecked

Func TogglePause1();===================== Pause ======================
	While 1
		ToolTip("Paused")
		$P = GUICtrlRead($Slider5)
		If $P = 1 Then
			ToolTip("")
			Return
		EndIf
		Sleep(50)
	WEnd
EndFunc   ;==>TogglePause1

Func Save()
	$ClientSize = WinGetClientSize($title)
	$posXdiff = $ClientSize[0] / 2
	$posYdiff = $ClientSize[1] / 2.5
	SplashTextOn("Setup ", "Saving...", 130, 40, $posXdiff, $posYdiff, 32, "Estrangelo Edessa", 15, 700)
	_Interrupt_Sleep(1000)
	SplashOff()
	_Save()
EndFunc   ;==>Save

Func Load()
	$ClientSize = WinGetClientSize($title)
	$posXdiff = $ClientSize[0] / 2
	$posYdiff = $ClientSize[1] / 2.5
	SplashTextOn("Setup", "Loading...", 130, 40, $posXdiff, $posYdiff, 32, "Estrangelo Edessa", 15, 700)
	_Interrupt_Sleep(1000)
	SplashOff()
	_Load()
EndFunc   ;==>Load

Func Web()
	ShellExecute("http://esbprograms.altervista.org/newestbots.html")
	Return
EndFunc   ;==>Web

#Region Setup
Func _Func_1()
	Local $ClientSize = WinGetClientSize($title)
	Local $posXdiff = $ClientSize[0] / 2
	Local $posYdiff = $ClientSize[1] / 2.5
	Global $hWnd = WinWait("[CLASS:ArcheAge]", "", 0)
	WinActivate($hWnd)

	SplashTextOn("Auto Attack Bot Setup", "Please Click On End Of Mana Bar.", 200, 110, $posXdiff, $posYdiff, 0, "Ariel", 15)
	While 1
		If _IsPressed("01") Then
			$pos1 = MouseGetPos()
			ExitLoop
		EndIf
	WEnd
	SplashOff()
	MouseMove(0, 0, 10)
	Global $spot9 = $pos1[0]
	Global $spot10 = $pos1[1]
	Global $iColor = PixelGetColor($spot9, $spot10)
	_Interrupt_Sleep(1000)

	SplashTextOn("Auto Attack Bot Setup", "Please Click On End Of Health Bar.", 200, 110, $posXdiff, $posYdiff, 0, "Ariel", 15)
	While 1
		If _IsPressed("01") Then
			$pos2 = MouseGetPos()
			ExitLoop
		EndIf
	WEnd
	SplashOff()
	Global $spot7 = $pos2[0]
	Global $spot8 = $pos2[1]
	Global $iColor1 = PixelGetColor($spot7, $spot8)
	MouseMove(0, 0, 10)
	_Interrupt_Sleep(1000)

	SplashTextOn("Auto Attack Bot Setup", "Please Click On 2nd Health Check.", 200, 110, $posXdiff, $posYdiff, 0, "Ariel", 15)
	While 1
		If _IsPressed("01") Then
			$pos3 = MouseGetPos()
			ExitLoop
		EndIf
	WEnd
	SplashOff()
	Global $spota = $pos3[0]
	Global $spotb = $pos3[1]
	Global $iColor3 = PixelGetColor($spota, $spotb)
	MouseMove(0, 0, 10)

	_Interrupt_Sleep(1000)

	Local $hWnd1 = WinWait("[CLASS:AutoIt v3 GUI]", "", 0)
	WinActivate($hWnd1)
	SplashTextOn("Auto Attack Bot Setup", "Please Click On First Fire Slot.", 200, 110, $posXdiff, $posYdiff, 0, "Ariel", 15)

	While 1
		If _IsPressed("01") Then
			$pos = MouseGetPos()
			ExitLoop
		EndIf
	WEnd
	SplashOff()
	Global $spot1 = $pos[0]
	Global $spot2 = $pos[1]
	Global $hWnd = WinWait("[CLASS:ArcheAge]", "", 2)
	$hWnd = WinGetHandle
	WinActivate($hWnd)
	MouseMove(0, $spot10, 10)
	_Interrupt_Sleep(1000)
	Global $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd); Get initial checksum for toolbar

	_Interrupt_Sleep(1000)

	 	SplashTextOn("Auto Attack Bot Setup", "Please Click On Gift Box.",  200, 75, $posXdiff, $posYdiff, 0, "Ariel", 15)
	 While 1
	 	Sleep(100)
	 	If _IsPressed("01") Then
	 		$pos4 = MouseGetPos()
	 		ExitLoop
	 	EndIf
	 WEnd
	 SplashOff()
	 Global $spot3 = $pos4[0]
	 Global $spot4 = $pos4[1]
	_Func_3()
EndFunc   ;==>_Func_1
#EndRegion Setup

#Region Main Fire Loop
Func _Func_3()
	$P = GUICtrlRead($Slider5); set to pause
	If $P = 2 Then
		TogglePause1()
	EndIf
	GUICtrlSetState($Button1, $GUI_HIDE); Hide and show start ans stop
	GUICtrlSetState($Button2, $GUI_SHOW)
	; Make sure the flag is cleared
	$fInterrupt = 0
	$Paused = 0
	While 1
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		GUICtrlSendMsg($Prog, $PBM_SETMARQUEE, 1, 20)
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			_turn()
		 EndIf

		If _IsChecked($Checkbox2) Then ; check buff 1
			$min1 = GUICtrlRead($Input17)
			$minutes1 = $min1 * 60000
			$tl = TimerDiff($In1)
			If $tl > $minutes1 Then
				ControlSend($title, "", "", "{Alt down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{SHIFTDOWN}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{1 down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{1 up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{SHIFTUP}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{Alt up}")
				$In1 = TimerInit()
				Sleep(500)
			EndIf
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		If _IsChecked($Checkbox3) Then ; check buff 2
			$min2 = GUICtrlRead($Input18)
			$minutes2 = $min2 * 60000
			$tl = TimerDiff($In2)
			If $tl > $minutes2 Then
				ControlSend($title, "", "", "{Alt down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{SHIFTDOWN}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{2 down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{2 up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{SHIFTUP}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{Alt up}")
				$In2 = TimerInit()
				Sleep(500)
			EndIf
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		If _IsChecked($Checkbox5) Then ; check buff 3
			$min1 = GUICtrlRead($Input20)
			$minutes1 = $min1 * 60000
			$tl = TimerDiff($In4)
			If $tl > $minutes1 Then
				ControlSend($title, "", "", "{Alt down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{SHIFTDOWN}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{3 down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{3 up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{SHIFTUP}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{Alt up}")
				$In4 = TimerInit()
				Sleep(500)
			EndIf
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		If _IsChecked($Checkbox6) Then ; check buff 4
			$min1 = GUICtrlRead($Input21)
			$minutes1 = $min1 * 60000
			$tl = TimerDiff($In5)
			If $tl > $minutes1 Then
				ControlSend($title, "", "", "{Alt down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{SHIFTDOWN}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{4 down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{4 up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{SHIFTUP}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{Alt up}")
				$In5 = TimerInit()
				Sleep(500)
			EndIf
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		;===================fire 1==============
		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			Local $e = GUICtrlRead($Input1)
			Local $c = GUICtrlRead($Input25) ;=====> fire input key
			Local $i = 0
			For $i = 1 To $e ;=====> fire 1 loop
				ControlSend($title, "", "", "{" & $c & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $c & " up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{End down}") ; Make sure camera is following your view
				Sleep(Random(110, 150, 1))
				ControlSend($title, "", "", "{End up}")
				Sleep(Random(110, 160, 1))
				$a = GUICtrlRead($Input5) * 1000
				_Interrupt_Sleep($a)
				$c = GUICtrlRead($Slider6)
				_Interrupt_Sleep($c) ; ===================lag
				If $fInterrupt <> 0 Then
					Return
				EndIf
				Local $P = GUICtrlRead($Slider5); set to pause
				If $P = 2 Then
					TogglePause1()
				EndIf

			Next;
		EndIf
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			_turn()
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		;=================== fire 2 ============== Check stop, check pause, Loot, 2nd health check and check dmg mob

		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			Local $e = GUICtrlRead($Input2)
			Local $c = GUICtrlRead($Input26);=====> fire input key
			Local $i = 0
			For $i = 1 To $e ;=====> fire 2 loop
				ControlSend($title, "", "", "{" & $c & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $c & " up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{End down}") ; Make sure camera is following your view
				Sleep(Random(110, 150, 1))
				ControlSend($title, "", "", "{End up}")
				Sleep(Random(110, 160, 1))
				$a = GUICtrlRead($Input6) * 1000
				_Interrupt_Sleep($a)
				$c = GUICtrlRead($Slider6)
				_Interrupt_Sleep($c) ; ===================lag
				If $fInterrupt <> 0 Then
					Return
				EndIf
				Local $P = GUICtrlRead($Slider5); set to pause
				If $P = 2 Then
					TogglePause1()
				EndIf
			Next
		EndIf
		If _IsChecked($Checkbox4) Then
			PixelSearch($spota, $spotb, $spota, $spotb, $iColor3, $ver) ; check dmg player health 2nd
			If @error Then
				Local $b = GUICtrlRead($Input24); Read 2nd health input
				ControlSend($title, "", "", "{" & $b & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $b & " up}")
			EndIf
		EndIf
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			_turn()
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		;=================== fire 3 ============== Check stop, check pause, Loot,  and 2nd health check

		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			Local $e = GUICtrlRead($Input3)
			Local $c = GUICtrlRead($Input27);=====> fire input key
			Local $i = 0
			For $i = 1 To $e ;=====> fire 3 loop
				ControlSend($title, "", "", "{" & $c & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $c & " up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{End down}") ; Make sure camera is following your view
				Sleep(Random(110, 150, 1))
				ControlSend($title, "", "", "{End up}")
				Sleep(Random(110, 160, 1))
				$a = GUICtrlRead($Input7) * 1000
				_Interrupt_Sleep($a)
				$c = GUICtrlRead($Slider6)
				_Interrupt_Sleep($c) ; ===================lag
				If $fInterrupt <> 0 Then
					Return
				EndIf
				Local $P = GUICtrlRead($Slider5); set to pause
				If $P = 2 Then
					TogglePause1()
				EndIf
			Next
		EndIf
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			_turn()
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		;===================== End fire 4 ======================= Check stop, Loot, check pause

		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			Local $e = GUICtrlRead($Input4)
			Local $c = GUICtrlRead($Input28);=====> fire input key
			Local $i = 0
			For $i = 1 To $e ;=====> fire 4 loop
				ControlSend($title, "", "", "{" & $c & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $c & " up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{End down}") ; Make sure camera is following your view
				Sleep(Random(110, 150, 1))
				ControlSend($title, "", "", "{End up}")
				Sleep(Random(110, 160, 1))
				$a = GUICtrlRead($Input8) * 1000
				_Interrupt_Sleep($a)
				$c = GUICtrlRead($Slider6)
				_Interrupt_Sleep($c) ; ===================lag
				If $fInterrupt <> 0 Then
					Return
				EndIf
				Local $P = GUICtrlRead($Slider5); set to pause
				If $P = 2 Then
					TogglePause1()
				EndIf
			Next
		EndIf
		If _IsChecked($Checkbox4) Then
			PixelSearch($spota, $spotb, $spota, $spotb, $iColor3, $ver) ; check dmg player health 2nd
			If @error Then
				Local $b = GUICtrlRead($Input24); Read 2nd health input
				ControlSend($title, "", "", "{" & $b & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $b & " up}")
			EndIf
		EndIf
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			_turn()
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		;=====================   fire 5 ======================= Check stop, Loot, check pause and 2nd health check

		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			Local $e = GUICtrlRead($Input9)
			Local $c = GUICtrlRead($Input29);=====> fire input key
			Local $i = 0
			For $i = 1 To $e ;=====> fire 5 loop
				ControlSend($title, "", "", "{" & $c & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $c & " up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{End down}") ; Make sure camera is following your view
				Sleep(Random(110, 150, 1))
				ControlSend($title, "", "", "{End up}")
				Sleep(Random(110, 160, 1))
				$a = GUICtrlRead($Input10) * 1000
				_Interrupt_Sleep($a)
				$c = GUICtrlRead($Slider6)
				_Interrupt_Sleep($c) ; ===================lag
				If $fInterrupt <> 0 Then
					Return
				EndIf
				Local $P = GUICtrlRead($Slider5); set to pause
				If $P = 2 Then
					TogglePause1()
				EndIf
			Next
		EndIf
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			_turn()
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		;===================== End fire 6 ======================= Check stop, Loot, check pause

		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			Local $e = GUICtrlRead($Input11)
			Local $c = GUICtrlRead($Input30);=====> fire input key
			Local $i = 0
			For $i = 1 To $e ;=====> fire 6 loop
				ControlSend($title, "", "", "{" & $c & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $c & " up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{End down}") ; Make sure camera is following your view
				Sleep(Random(110, 150, 1))
				ControlSend($title, "", "", "{End up}")
				Sleep(Random(110, 160, 1))
				$a = GUICtrlRead($Input12) * 1000
				_Interrupt_Sleep($a)
				$c = GUICtrlRead($Slider6)
				_Interrupt_Sleep($c) ; ===================lag
				If $fInterrupt <> 0 Then
					Return
				EndIf
				Local $P = GUICtrlRead($Slider5); set to pause
				If $P = 2 Then
					TogglePause1()
				EndIf
			Next
		EndIf
		If _IsChecked($Checkbox4) Then
			PixelSearch($spota, $spotb, $spota, $spotb, $iColor3, $ver) ; check dmg player health 2nd
			If @error Then
				Local $b = GUICtrlRead($Input24); Read 2nd health input
				ControlSend($title, "", "", "{" & $b & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $b & " up}")
			EndIf
		EndIf
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			_turn()
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		;===================== End fire 7 ======================= Check stop, Loot, check pause

		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			Local $e = GUICtrlRead($Input13)
			Local $c = GUICtrlRead($Input31);=====> fire input key
			Local $i = 0
			For $i = 1 To $e ;=====> fire 7 loop
				ControlSend($title, "", "", "{" & $c & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $c & " up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{End down}") ; Make sure camera is following your view
				Sleep(Random(110, 150, 1))
				ControlSend($title, "", "", "{End up}")
				Sleep(Random(110, 160, 1))
				$a = GUICtrlRead($Input14) * 1000
				_Interrupt_Sleep($a)
				$c = GUICtrlRead($Slider6)
				_Interrupt_Sleep($c) ; ===================lag
				If $fInterrupt <> 0 Then
					Return
				EndIf
				Local $P = GUICtrlRead($Slider5); set to pause
				If $P = 2 Then
					TogglePause1()
				EndIf
			Next
		EndIf
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			_turn()
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		;===================== End fire 8 =======================

		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			Local $e = GUICtrlRead($Input15)
			Local $c = GUICtrlRead($Input32);=====> fire input key
			Local $i = 0
			For $i = 1 To $e ;=====> fire 8 loop
				ControlSend($title, "", "", "{" & $c & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $c & " up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f down}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{f up}")
				Sleep(Random(110, 160, 1))
				ControlSend($title, "", "", "{End down}") ; Make sure camera is following your view
				Sleep(Random(110, 150, 1))
				ControlSend($title, "", "", "{End up}")
				Sleep(Random(110, 160, 1))
				$a = GUICtrlRead($Input16) * 1000
				_Interrupt_Sleep($a)
				$c = GUICtrlRead($Slider6)
				_Interrupt_Sleep($c) ; ===================lag
				If $fInterrupt <> 0 Then
					Return
				EndIf
				$P = GUICtrlRead($Slider5); set to pause
				If $P = 2 Then
					TogglePause1()
				EndIf
			Next
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		If _IsChecked($Checkbox4) Then
			PixelSearch($spota, $spotb, $spota, $spotb, $iColor3, $ver) ; check dmg player health 2nd
			If @error Then
				Local $b = GUICtrlRead($Input24); Read 2nd health input
				ControlSend($title, "", "", "{" & $b & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $b & " up}")
			EndIf
		EndIf
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then; This is to see if we have a target
			_turn()
		EndIf
	WEnd

EndFunc   ;==>_Func_3

Func _Func_2();====================================== Set button 1 to show and hide button 2
	GUICtrlSendMsg($Prog, $PBM_SETMARQUEE, 0, 20)
	GUICtrlSetState($Button2, $GUI_HIDE)
	GUICtrlSetState($Button1, $GUI_SHOW)
	ConsoleWrite("   Stop   " & @CRLF)
EndFunc   ;==>_Func_2

Func _Slep() ;===================== Heal mode for attack bot ======================
	GUICtrlSendMsg($Prog, $PBM_SETMARQUEE, 0, 20)
	$on = 1
	If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then
		Return
	EndIf
	ControlSend($title, "", "", "{f down}")
	Sleep(Random(110, 160, 1))
	ControlSend($title, "", "", "{f up}")
	Sleep(500)


	While $on = 1

				Local $b = GUICtrlRead($Input22); Read 2nd health input
				ControlSend($title, "", "", "{" & $b & " down}")
				Sleep(Random(110, 140, 1))
				ControlSend($title, "", "", "{" & $b & " up}")
Sleep(2000)
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		$P = GUICtrlRead($Slider5); set to pause
		If $P = 2 Then
			TogglePause1()
		EndIf
		PixelSearch($spot7, $spot8, $spot7, $spot8, $iColor1, $ver); check for full Health player
		If Not @error Then
			Return
		EndIf
		If @error Then
			$on = 1
		EndIf
		Sleep(20)
		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then
			Return
		EndIf
		Sleep(20)
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then
			_Interrupt_Sleep(5000)
		EndIf
	WEnd
EndFunc   ;==>_Slep
#EndRegion Main Fire Loop

Func _mana() ;===================== mana mode for attack bot ======================
	GUICtrlSendMsg($Prog, $PBM_SETMARQUEE, 0, 20)
	$on = 1

	If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then
		Return
	EndIf
	ControlSend($title, "", "", "{f down}")
	Sleep(Random(110, 160, 1))
	ControlSend($title, "", "", "{f up}")
	Sleep(500)
	While $on = 1
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		$P = GUICtrlRead($Slider5); set to pause
		If $P = 2 Then
			TogglePause1()
		EndIf
		PixelSearch($spot9, $spot10, $spot9, $spot10, $iColor, $ver); check for full Mana player
		If Not @error Then
			Return
		EndIf
		If @error Then
			$on = 1
		EndIf
		Sleep(20)
		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then
			Return
		EndIf
		Sleep(20)
		If $iCheckSum = PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then
			Sleep(Random(110, 160, 1))
			$b = GUICtrlRead($Input23); ====================================Read 2nd mana input
			ControlSend($title, "", "", "{" & $b & " down}")
			Sleep(Random(110, 140, 1))
			ControlSend($title, "", "", "{" & $b & " up}")
			_Interrupt_Sleep(4000)
		EndIf
	WEnd
EndFunc   ;==>_mana
;		SplashTextOn("Time ", _NowTime() & @CRLF & $set , 200, 60, $posXdiff, $posYdiff, 32, "Estrangelo Edessa", 15, 700)
;	_Interrupt_Sleep(2000)
;	SplashOff()
Func _turn(); ===============================Turn for attack bot
	$ClientSize = WinGetClientSize($title)
	$posXdiff = $ClientSize[0] / 2
	$posYdiff = $ClientSize[1] / 2.5
	Local $sl = GUICtrlRead($Slider1) * 50 ; Turn sleep
	Local $wl = GUICtrlRead($Slider2) * 50 ; Move sleep
	  		 	  If _IsChecked($Checkbox1) Then
 		 	$minutes3 = 900000
  		 	$t3 = TimerDiff($In3)
 		 	If $t3 > $minutes3 Then
 		 		Local $hWnd = WinWait("[CLASS:ArcheAge]", "", 2)
 		 		WinActivate($hWnd)
 		 		Sleep(Random(110, 140, 1))
				MouseMove($spot3, $spot4)
 		 		Sleep(1000)
 		 		MouseDown("Right")
 		 		Sleep(Random(110, 140, 1))
 		 		MouseUp("Right")
 		 		$In3 = TimerInit()
 		 	EndIf
 		 EndIf
	If _IsChecked($Checkbox8) And _Time() >= GUICtrlRead($Date1) Then; check for checkbox to exit
		If _IsChecked($Checkbox9) Then
			WinClose("[CLASS:ArcheAge]", "")
		EndIf
		Exit
	EndIf

	If $iSec <> @SEC Then
		GUICtrlSetData($Label16, _Time()); set lable time
		$iSec = @SEC
	EndIf; set lable time
	$P = GUICtrlRead($Slider5); set to pause
	If $P = 2 Then
		TogglePause1()
	EndIf
	ControlSend($title, "", "", "{f down}")
	Sleep(Random(110, 160, 1))
	ControlSend($title, "", "", "{f up}")
	If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then
		Return
	EndIf
	Sleep(20)
	Local $mana = GUICtrlRead($Slider4)
	PixelSearch($mana, $spot10, $mana, $spot10, 0x372A11, 20); check mana player
	If Not @error Then
		Call("_mana")
		Sleep(20)
	EndIf
	Sleep(20)
	Local $Health = GUICtrlRead($Slider3)
	PixelSearch($Health, $spot8, $Health, $spot8, 0x372A11, $ver); check health player
	If Not @error Then
		Call("_Slep")
		Sleep(20)
	EndIf
	Sleep(20)
	If $cot = 1 Then
		If $sl > 1 Then
			ControlSend($title, "", "", "{D down}")
			_Interrupt_Sleep($sl);Sleep(Random(110, 140, 1)) turn
			ControlSend($title, "", "", "{D up}")
		EndIf
		Sleep(20)
		If $wl > 1 Then
			ControlSend($title, "", "", "{W down}")
			_Interrupt_Sleep($wl);move
			ControlSend($title, "", "", "{W up}")
		EndIf
		$cot = 2
		If _IsChecked($Checkbox7) Then
			$cot = 1
		EndIf
		ControlSend($title, "", "", "{1 down}")
		Sleep(Random(110, 140, 1))
		ControlSend($title, "", "", "{1 up}")
		Sleep(1000)
		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then
			Return
		EndIf

	ElseIf $cot = 2 Then


		If $sl > 1 Then
			ControlSend($title, "", "", "{A down}")
			_Interrupt_Sleep($sl);turn
			ControlSend($title, "", "", "{A up}")
		EndIf
		Sleep(20)
		If $wl > 1 Then
			ControlSend($title, "", "", "{W down}")
			_Interrupt_Sleep($wl);move
			ControlSend($title, "", "", "{W up}")
		EndIf

		$cot = 1
		ControlSend($title, "", "", "{1 down}")
		Sleep(Random(110, 140, 1))
		ControlSend($title, "", "", "{1 up}")
		_Interrupt_Sleep(1000)
		If $iCheckSum <> PixelChecksum($spot1 - 2, $spot2 - 2, $spot1 + 2, $spot2 + 2, 1, $hWnd) Then
			Return
		EndIf
	EndIf
	If $iSec <> @SEC Then
		GUICtrlSetData($Label16, _Time()); set lable time
		$iSec = @SEC
	EndIf

EndFunc   ;==>_turn

Func _Interrupt_Sleep($iDelay);==>_Interrupt_Sleep
	Local $iBegin = TimerInit(); Get a timestamp

	Do;   run a tight loop
		If $fInterrupt <> 0 Then
			Return
		EndIf
		If $iSec <> @SEC Then
			GUICtrlSetData($Label16, _Time()); set lable time
			$iSec = @SEC
		EndIf
		Sleep(Random(50, 100, 1)); minimum random Sleep
		If $fInterrupt Then; Look for interrrupt
			Return True
		EndIf
	Until TimerDiff($iBegin) > $iDelay
	Return False; Return False if timed out and no interrupt was set
EndFunc   ;==>_Interrupt_Sleep

Func _Exit()
	Exit
EndFunc   ;==>_Exit

Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
	If BitAND($wParam, 0x0000FFFF) = $Button2 Then $fInterrupt = 1
	Return $GUI_RUNDEFMSG
	If BitAND($wParam, 0x0000FFFF) = $Button3 Then $fInterrupt = 1
EndFunc   ;==>_WM_COMMAND

Func _Save()
	$sSlider1 = GUICtrlRead($Slider1)
	IniWrite("ESBsave.ini", "Config", "$Slider1", $sSlider1)
	$sSlider2 = GUICtrlRead($Slider2)
	IniWrite("ESBsave.ini", "Config", "$Slider2", $sSlider2)
	$sSlider3 = GUICtrlRead($Slider3)
	IniWrite("ESBsave.ini", "Config", "$Slider3", $sSlider3)
	$sSlider4 = GUICtrlRead($Slider4)
	IniWrite("ESBsave.ini", "Config", "$Slider4", $sSlider4)
	$sSlider6 = GUICtrlRead($Slider6)
	IniWrite("ESBsave.ini", "Config", "$Slider6", $sSlider6)
	$sInput1 = GUICtrlRead($Input1)
	IniWrite("ESBsave.ini", "Config", "Input1", $sInput1)
	$sInput2 = GUICtrlRead($Input2)
	IniWrite("ESBsave.ini", "Config", "Input2", $sInput2)
	$sInput3 = GUICtrlRead($Input3)
	IniWrite("ESBsave.ini", "Config", "Input3", $sInput3)
	$sInput4 = GUICtrlRead($Input4)
	IniWrite("ESBsave.ini", "Config", "Input4", $sInput4)
	$sInput5 = GUICtrlRead($Input5)
	IniWrite("ESBsave.ini", "Config", "Input5", $sInput5)
	$sInput6 = GUICtrlRead($Input6)
	IniWrite("ESBsave.ini", "Config", "Input6", $sInput6)
	$sInput7 = GUICtrlRead($Input7)
	IniWrite("ESBsave.ini", "Config", "Input7", $sInput7)
	$sInput8 = GUICtrlRead($Input8)
	IniWrite("ESBsave.ini", "Config", "Input8", $sInput8)
	$sInput9 = GUICtrlRead($Input9)
	IniWrite("ESBsave.ini", "Config", "Input9", $sInput9)
	$sInput10 = GUICtrlRead($Input10)
	IniWrite("ESBsave.ini", "Config", "Input10", $sInput10)
	$sInput11 = GUICtrlRead($Input11)
	IniWrite("ESBsave.ini", "Config", "Input11", $sInput11)
	$sInput12 = GUICtrlRead($Input12)
	IniWrite("ESBsave.ini", "Config", "Input12", $sInput12)
	$sInput13 = GUICtrlRead($Input13)
	IniWrite("ESBsave.ini", "Config", "Input13", $sInput13)
	$sInput14 = GUICtrlRead($Input14)
	IniWrite("ESBsave.ini", "Config", "Input14", $sInput14)
	$sInput15 = GUICtrlRead($Input15)
	IniWrite("ESBsave.ini", "Config", "Input15", $sInput15)
	$sInput16 = GUICtrlRead($Input16)
	IniWrite("ESBsave.ini", "Config", "Input16", $sInput16)
	$sInput17 = GUICtrlRead($Input17)
	IniWrite("ESBsave.ini", "Config", "Input17", $sInput17)
	$sInput18 = GUICtrlRead($Input18)
	IniWrite("ESBsave.ini", "Config", "Input18", $sInput18)
	$sInput19 = GUICtrlRead($Input19)
	IniWrite("ESBsave.ini", "Config", "Input19", $sInput19)
	$sInput20 = GUICtrlRead($Input20)
	IniWrite("ESBsave.ini", "Config", "Input20", $sInput20)
	$sInput21 = GUICtrlRead($Input21)
	IniWrite("ESBsave.ini", "Config", "Input21", $sInput21)
	$sInput22 = GUICtrlRead($Input22)
	IniWrite("ESBsave.ini", "Config", "Input22", $sInput22)
	$sInput23 = GUICtrlRead($Input23)
	IniWrite("ESBsave.ini", "Config", "Input23", $sInput23)
	$sInput24 = GUICtrlRead($Input24)
	IniWrite("ESBsave.ini", "Config", "Input24", $sInput24)
	$sInput25 = GUICtrlRead($Input25)
	IniWrite("ESBsave.ini", "Config", "Input25", $sInput25)
	$sInput26 = GUICtrlRead($Input26)
	IniWrite("ESBsave.ini", "Config", "Input26", $sInput26)
	$sInput27 = GUICtrlRead($Input27)
	IniWrite("ESBsave.ini", "Config", "Input27", $sInput27)
	$sInput28 = GUICtrlRead($Input28)
	IniWrite("ESBsave.ini", "Config", "Input28", $sInput28)
	$sInput29 = GUICtrlRead($Input29)
	IniWrite("ESBsave.ini", "Config", "Input29", $sInput29)
	$sInput30 = GUICtrlRead($Input30)
	IniWrite("ESBsave.ini", "Config", "Input30", $sInput30)
	$sInput31 = GUICtrlRead($Input31)
	IniWrite("ESBsave.ini", "Config", "Input31", $sInput31)
	$sInput32 = GUICtrlRead($Input32)
	IniWrite("ESBsave.ini", "Config", "Input32", $sInput32)
	IniWrite("ESBsave.ini", "Config", "Checkbox2", IsChecked($Checkbox2))
	IniWrite("ESBsave.ini", "Config", "Checkbox3", IsChecked($Checkbox3))
	IniWrite("ESBsave.ini", "Config", "Checkbox5", IsChecked($Checkbox5))
	IniWrite("ESBsave.ini", "Config", "Checkbox6", IsChecked($Checkbox6))
	IniWrite("ESBsave.ini", "Config", "Checkbox4", IsChecked($Checkbox4))
	Return
EndFunc   ;==>_Save

Func _Load()
	SetCheckedState($Checkbox7, IniRead("ESBsave.ini", "Config", "Checkbox7", False))
	SetCheckedState($Checkbox2, IniRead("ESBsave.ini", "Config", "Checkbox2", False))
	SetCheckedState($Checkbox3, IniRead("ESBsave.ini", "Config", "Checkbox3", False))
	SetCheckedState($Checkbox5, IniRead("ESBsave.ini", "Config", "Checkbox5", False))
	SetCheckedState($Checkbox6, IniRead("ESBsave.ini", "Config", "Checkbox6", False))
	SetCheckedState($Checkbox4, IniRead("ESBsave.ini", "Config", "Checkbox4", False))
	GUICtrlSetData($Input1, IniRead("ESBsave.ini", "Config", "Input1", ""))
	GUICtrlSetData($Input2, IniRead("ESBsave.ini", "Config", "Input2", ""))
	GUICtrlSetData($Input3, IniRead("ESBsave.ini", "Config", "Input3", ""))
	GUICtrlSetData($Input4, IniRead("ESBsave.ini", "Config", "Input4", ""))
	GUICtrlSetData($Input5, IniRead("ESBsave.ini", "Config", "Input5", ""))
	GUICtrlSetData($Input6, IniRead("ESBsave.ini", "Config", "Input6", ""))
	GUICtrlSetData($Input7, IniRead("ESBsave.ini", "Config", "Input7", ""))
	GUICtrlSetData($Input8, IniRead("ESBsave.ini", "Config", "Input8", ""))
	GUICtrlSetData($Input9, IniRead("ESBsave.ini", "Config", "Input9", ""))
	GUICtrlSetData($Input10, IniRead("ESBsave.ini", "Config", "Input10", ""))
	GUICtrlSetData($Input11, IniRead("ESBsave.ini", "Config", "Input11", ""))
	GUICtrlSetData($Input12, IniRead("ESBsave.ini", "Config", "Input12", ""))
	GUICtrlSetData($Input13, IniRead("ESBsave.ini", "Config", "Input13", ""))
	GUICtrlSetData($Input14, IniRead("ESBsave.ini", "Config", "Input14", ""))
	GUICtrlSetData($Input15, IniRead("ESBsave.ini", "Config", "Input15", ""))
	GUICtrlSetData($Input16, IniRead("ESBsave.ini", "Config", "Input16", ""))
	GUICtrlSetData($Input17, IniRead("ESBsave.ini", "Config", "Input17", ""))
	GUICtrlSetData($Input18, IniRead("ESBsave.ini", "Config", "Input18", ""))
	GUICtrlSetData($Input19, IniRead("ESBsave.ini", "Config", "Input19", ""))
	GUICtrlSetData($Input20, IniRead("ESBsave.ini", "Config", "Input20", ""))
	GUICtrlSetData($Input21, IniRead("ESBsave.ini", "Config", "Input21", ""))
	GUICtrlSetData($Input22, IniRead("ESBsave.ini", "Config", "Input22", ""))
	GUICtrlSetData($Input23, IniRead("ESBsave.ini", "Config", "Input23", ""))
	GUICtrlSetData($Input24, IniRead("ESBsave.ini", "Config", "Input24", ""))
	GUICtrlSetData($Input25, IniRead("ESBsave.ini", "Config", "Input25", ""))
	GUICtrlSetData($Input26, IniRead("ESBsave.ini", "Config", "Input26", ""))
	GUICtrlSetData($Input27, IniRead("ESBsave.ini", "Config", "Input27", ""))
	GUICtrlSetData($Input28, IniRead("ESBsave.ini", "Config", "Input28", ""))
	GUICtrlSetData($Input29, IniRead("ESBsave.ini", "Config", "Input29", ""))
	GUICtrlSetData($Input30, IniRead("ESBsave.ini", "Config", "Input30", ""))
	GUICtrlSetData($Input31, IniRead("ESBsave.ini", "Config", "Input31", ""))
	GUICtrlSetData($Input32, IniRead("ESBsave.ini", "Config", "Input32", ""))
	GUICtrlSetData($Slider1, IniRead("ESBsave.ini", "Config", "$Slider1", ""))
	GUICtrlSetData($Slider2, IniRead("ESBsave.ini", "Config", "$Slider2", ""))
	GUICtrlSetData($Slider3, IniRead("ESBsave.ini", "Config", "$Slider3", ""))
	GUICtrlSetData($Slider4, IniRead("ESBsave.ini", "Config", "$Slider4", ""))
	GUICtrlSetData($Slider6, IniRead("ESBsave.ini", "Config", "$Slider6", ""))

	Return
EndFunc   ;==>_Load

Func _Time($tFormat = 12)
	Local $fKey = "HKCU\Control Panel\International", $ap = RegRead($fKey, "s1159")
	Local $pStr = RegRead($fKey, "s2359"), $tSep = RegRead($fKey, "sTime"), $sStr = @SEC
	Local $hour = @HOUR
	If $tFormat = 12 Then
		If $hour = 0 Then $hour = 12
		If @HOUR >= 12 Then
			$hour = @HOUR
			If $hour > 12 Then $hour -= 12
			$ap = $pStr
		EndIf
	Else
		$ap = ""
		$hour = StringFormat("%02u", $hour)
	EndIf
	If $ap <> "" Then $ap = Chr(32) & $ap
	Return $hour & $tSep & @MIN & $tSep & $sStr & $ap
EndFunc   ;==>_Time

Func SetCheckedState($nCtrl, $iState) ; ========================================= part of load func
	If $iState > 0 Then
		GUICtrlSetState($nCtrl, $GUI_CHECKED)
	Else
		GUICtrlSetState($nCtrl, $GUI_UNCHECKED)
	EndIf
EndFunc   ;==>SetCheckedState

Func IsChecked($nCtrl) ; ================================================part of save func
	If BitAND(GUICtrlRead($nCtrl), $GUI_CHECKED) = $GUI_CHECKED Then Return 1
	Return 0
EndFunc   ;==>IsChecked

Func _GDIPlus_GraphicsGetDPIRatio($iDPIDef = 96)
	_GDIPlus_Startup()
	Local $hGfx = _GDIPlus_GraphicsCreateFromHWND(0)
	If @error Then Return SetError(1, @extended, 0)
	Local $aResult
	#forcedef $__g_hGDIPDll, $ghGDIPDll

	$aResult = DllCall($__g_hGDIPDll, "int", "GdipGetDpiX", "handle", $hGfx, "float*", 0)

	If @error Then Return SetError(2, @extended, 0)
	Local $iDPI = $aResult[2]
	Local $aresults[2] = [$iDPIDef / $iDPI, $iDPI / $iDPIDef]
	_GDIPlus_GraphicsDispose($hGfx)
	_GDIPlus_Shutdown()
	Return $aresults
EndFunc   ;==>_GDIPlus_GraphicsGetDPIRatio
```

note ( fix mana and changed health to (=) 
note ( added gift box clicker )
note (fix gift box ) 
note (fix heal so it will not target when using skill.) 1.08a


https://www.dropbox.com/sh/vmbe7bjxj...SLK4wAK7a?dl=0

----------


## CowboyBakos

Hey Elzie,

Thanks a lot for the bot. I've been using your bots for a while now, and have a couple of questions for you if you have the time.

1) I've been using the older versions of your bot up until recently... just decided to update to the latest one thanks to some of the newer features you've added. However, the latest bot has been giving me a problem with the long delay between attacks. With your previous bots, setting the skill delay to '0' worked nicely with rapid-fire skills like Fireball and Endless Arrows. But with the newer bot, setting the delay to '0' still seems to have a noticeable delay between casts. Any suggestions how I might fix this? I tried looking at the code, but can't figure out where the delay is coming from.

2) During the start-up, when it asks you to click on the 2nd health check... what exactly is this referring to? The health of the mobs? Or another point on the player's health bar?

3) For some reason, it seems as though the the bot isn't cycling through all of the skills for me. It uses the first few, and then pauses, and starts back at number 1 again... and then moves to the later few skills, and then moves back to 1 again. Regardless of the number of casts I set for Skill 1, skill 1 still seems to be used a tremendous number of times during each rotation. Not really sure what is causing this... any ideas?

Sorry for all of the questions, and thanks for your time!

- CBB

----------


## tangente

> 2) During the start-up, when it asks you to click on the 2nd health check... what exactly is this referring to? The health of the mobs? Or another point on the player's health bar?


Refers to your health bar: if your health is lower than the point where you did click, the code will fire the 2nd Health Check key.

----------


## popedthestack

Hey thank you for the bot it really is quite awesome.
i seem to be running into one problem tho.
The bot successfully kills and loots one mob then AA Crashes to desktop and i get taken to a trino page talking about HS crashing.
i get the feeling ive done something wrong i just dont know what can you help me at all?

----------


## krazypunk1018

Question how come the pixel bot doesnt have the ctrl r to reset, ctrl q to quit and pause for pause? Also when I try to load the farm bot its off of my screen, can't click on it or anything

----------


## AutoScript

> Question how come the pixel bot doesnt have the ctrl r to reset, ctrl q to quit and pause for pause? Also when I try to load the farm bot its off of my screen, can't click on it or anything


edit this line
$Farm = GUICreate("Farm Macro", 183, 184, 2647, 404, -1, BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))

change it to where you would like the scrip to open on screen. 100 or 200 or ???

----------


## krazypunk1018

> edit this line
> $Farm = GUICreate("Farm Macro", 183, 184, 2647, 404, -1, BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
> 
> change it to where you would like the scrip to open on screen. 100 or 200 or ???


Ok awesome it worker perfectly. I'm really new to autoit so sorry for the questions. Also can I add this to the pixel bot so I can get the ctrl q to quit, ctrl r to reset and such?

Func Terminate()
MsgBox(0, "Quit Bot", "Have A Nice Day")
Exit 0
EndFunc ;==>Terminate

Func Quitloop()
MsgBox(0, "ReStart", "Must Restart to Continue")
SplashOff()
Call("St")
EndFunc ;==>Quitloop

Func TogglePause();===================== Pause ======================
$title = WinGetTitle("[CLASS:ArcheAge]", "")
$Paused = Not $Paused
While $Paused
ToolTip("Paused")
WEnd
ToolTip("")
EndFunc ;==>TogglePause

----------


## krazypunk1018

Oh also I forgot, the pixel bot doesn't want to use the right attacks at the right times. Example, I set skill 1 to be activated once, then skill 2 to be activated once, then skill 3 to be activated 9 times before going back to skill 1 cause it has a cooldown which skill 3 does not but instead the bot just uses the three skills randomly. I've used elzie's simple bot in the past with not problems so I know how to set up the skills, I decided to use this one cause its up to date and it has the gift box clicker. Any idea why it would be doing that?

----------


## AutoScript

> Oh also I forgot, the pixel bot doesn't want to use the right attacks at the right times. Example, I set skill 1 to be activated once, then skill 2 to be activated once, then skill 3 to be activated 9 times before going back to skill 1 cause it has a cooldown which skill 3 does not but instead the bot just uses the three skills randomly. I've used elzie's simple bot in the past with not problems so I know how to set up the skills, I decided to use this one cause its up to date and it has the gift box clicker. Any idea why it would be doing that?


Well this bot needs a lot of work still. If you would like I can post ESB but I am no longer updating it.
Best
Elzie

----------


## W4r3z

I' ve beein busy irl, and lost this update, ill give it a try later, and was wondering with pixel detection, it will be easier to make mining one, right /:? last version i used was the 5.02 from the the tab one


thanks for ur efforts and share  :Smile:

----------

