Code:
; Author Elzie and Bones
#include <Misc.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#include <GuiStatusBar.au3>
#include <StructureConstants.au3>
#RequireAdmin
#Region START
$Form2 = GUICreate("Gift Box", 175, 105, 254, 432, -1, $WS_EX_TOPMOST)
$Prog = GUICtrlCreateProgress(8, 72, 158, 20, $PBS_MARQUEE)
$Button1 = GUICtrlCreateButton("Start", 8, 40, 155, 25)
$Checkbox1 = GUICtrlCreateCheckbox("Away form Keyboard", 8, 8, 153, 17)
GUISetState(@SW_SHOW)
#EndRegion START
Dim $pos[2]
HotKeySet("^q", "Terminate")
HotKeySet("{PAUSE}", "TogglePause")
Global $In3 = TimerInit()
Global $Paused, $on = 1
Global $title = WinGetTitle("[CLASS:ArcheAge]", "")
While 1
GUICtrlSendMsg($Prog, $PBM_SETMARQUEE, 1, 20)
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
SplashTextOn("Auto Gift Box Setup", "Please Click Gift Box.", 400, 100, -2, -1, 0, "Ariel", 15); first mouse po. Helmet
While 1
Sleep(100)
If _IsPressed("01") Then; @@ Bones notes: Ispressed checks to see if key 01 is pressed
$pos = MouseGetPos()
ExitLoop
EndIf
WEnd
SplashOff()
$res1 = $pos[0]
$res2 = $pos[1]
Sleep(200)
SplashTextOn("Auto Gift Box Setup", "Auto Gift Box Setup Is Complete. Starting in 5 Seconds... ", 400, 100, -2, -1, 0, "Ariel", 15)
Sleep(5000)
SplashOff()
While $on = 1
$minutes3 = 1800000
$t3 = TimerDiff($In3)
If $t3 > $minutes3 Then
Local $hWnd = WinWait("[CLASS:ArcheAge]", "", 2)
WinActivate($hWnd)
Sleep(Random(110, 140, 1))
MouseMove($res1 , $res2 , 3)
Sleep(321)
MouseDown("primary")
Sleep(Random(110, 160, 1))
MouseUp("primary")
$In3 = TimerInit()
EndIf
If _IsChecked($Checkbox1) Then ; Bones Afk Macro
Local $iRand = Chr(Random(76, 80, 1))
$iAFKwait = Random(600000, 610000, 1)
ControlSend($title, "", "", "{" & $iRand & " down}")
Sleep(Random(110, 140, 1))
ControlSend($title, "", "", "{" & $iRand & " up}")
Sleep($iAFKwait)
ControlSend($title, "", "", "{" & $iRand & " down}") ; Close the window
Sleep(Random(110, 140, 1))
ControlSend($title, "", "", "{" & $iRand & " up}")
Sleep(100)
EndIf
WEnd
EndSwitch
WEnd
Func _IsChecked($idControlID)
Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED
EndFunc ;==>_IsChecked
Func Terminate();===================== Quit ======================
MsgBox(0, "Quit Bot", "Have A Nice Day")
Exit 0
EndFunc ;==>Terminate
Func TogglePause();===================== Pause ======================
$title = WinGetTitle("[CLASS:ArcheAge]", "")
$Paused = Not $Paused
While $Paused
$on = 0
ToolTip("Paused")
WEnd
$on = 1
ToolTip("")
EndFunc ;==>TogglePause
Enjoy