Da man ab 45 Minuten AFK sein einen disconnect bekommt ist hier schonmal ein Anti-AFK bot.
Archeage kann ruhig im Hintergrund sein.
Wenn ihr im Vollbildmodus spielt müsst ihr den Tooltip mit F10 ausschalten.
Für auto Re-Login solltet ihr ArcheAge im Fenstermodus haben generell sollte es weniger Fehler geben wenn ArcheAge im Fenstermodus ist.
Da auto Re-Login mit Mausklicks arbeitet ist es sehr experimentell sollte aber auf allen Auflösungen funktionieren, bisher getestet habe ich:
Funktioniert - Funktioniert nicht
1024x768
1152x864
1280x768
1280x800
1280x960
1280x1024
1360x768
1366x768
1440x900
1600x900
1600x1024
1680x1050
1920x1080
1024x768
1152x864
1280x768
1280x800
1280x960
1280x1024
1360x768
1366x768
1440x900
1600x900
1600x1024
1680x1050
1920x1080
Cause there is a AFK-disconnect every 45 minutes I've done this anti-afk bot.
Archeage can be running in background.
If your playing in fullscreenmode you have to disable the tooltip with F10.
For the auto Re-Login function you should play in windowed mode there will be less bugs.
Cause of auto Re-Login requires mouseclicks it's experimental but it should work with all resolutions, here are the resolution I've tested yet:
Archeage can be running in background.
If your playing in fullscreenmode you have to disable the tooltip with F10.
For the auto Re-Login function you should play in windowed mode there will be less bugs.
Cause of auto Re-Login requires mouseclicks it's experimental but it should work with all resolutions, here are the resolution I've tested yet:
working - not working
1024x768
1152x864
1280x768
1280x800
1280x960
1280x1024
1360x768
1366x768
1440x900
1600x900
1600x1024
1680x1050
1920x1080
1024x768
1152x864
1280x768
1280x800
1280x960
1280x1024
1360x768
1366x768
1440x900
1600x900
1600x1024
1680x1050
1920x1080
Sourcecode:
PHP Code:
#RequireAdmin
#include <PostMessage.au3> ;http://www.elitepvpers.com/forum/autoit/684645-postmessage-udf.html
#include <MouseClickPlusMod.au3>
#include <Array.au3>
Global $tooltip = True, $Current_Version = 1.22, $jumping = True, $jumping_state = "ENABLED", $Alive, $GlyphTitle = "Glyph", $cPos, $Relog_enabled = False, $Relog_state = "DISABLED", $pause = False
Dim $Win_Key[6] = [ 0x20, 0x49, 0x50, 0x4D, 0x43, 0x4B] ;0x20 = Space // 0x49 = i // 0x50 = p // 0x4D = m // 0x43 = c // 0x4B = k
_check_RenameFile()
_check_version()
$title = WinGetTitle("[CLASS:ArcheAge]", "")
$hwnd = WinGetHandle($title)
HotKeySet("{F7}", "_toggle_relog")
HotKeySet("{F8}", "_toggle_pause")
HotKeySet("{F9}", "_toggle_jumping")
HotKeySet("{F10}", "_toggle_tooltip")
HotKeySet("{F11}", "_exit")
AdlibRegister("_Send_key",60000)
AdlibRegister("_Check_Alive",30000)
$Runtime = TimerInit()
$timer = TimerInit()
While 1
$timer_diff = TimerDiff($timer)
If $timer_diff > 1000 And $tooltip = True Then
_tooltip()
$timer = TimerInit()
ElseIf $tooltip = False Then
ToolTip("",0,0)
EndIf
Sleep(50)
WEnd
Func _Send_key()
Sleep(Random(2000,8000,1))
If $jumping = True Then
_PostMessage_SendDown($hwnd, $Win_Key[0])
Sleep(Random(110,140,1))
_PostMessage_SendUp($hwnd, $Win_Key[0])
Sleep(Random(2000,14000,1))
EndIf
_Open_Random_Window()
Sleep(Random(2000,14000,1))
_Open_Random_Window()
Sleep(Random(3000,6000,1))
If $Relog_enabled = True Then
$Disconnect_coord = _Calc_Pos(4)
$title = WinGetTitle("[CLASS:ArcheAge]", "")
_MouseClickPlus($title, "left", Ceiling($Disconnect_coord[0]), Ceiling($Disconnect_coord[1]), 2)
Sleep(Random(3000,9000))
EndIf
EndFunc
Func _Open_Random_Window()
$rnd = Random(1,5,1)
_PostMessage_SendDown($hwnd, $Win_Key[$rnd])
Sleep(Random(100,160,1))
_PostMessage_SendUp($hwnd, $Win_Key[$rnd])
EndFunc
Func _toggle_tooltip()
$tooltip = Not $tooltip
EndFunc
Func _toggle_jumping()
$jumping = Not $jumping
If $jumping = True Then
$jumping_state = "ENABLED"
ElseIf $jumping = False Then
$jumping_state = "DISABLED"
EndIf
EndFunc
Func _toggle_relog()
$Relog_enabled = Not $Relog_enabled
If $Relog_enabled = True Then
$Relog_state = "ENABLED"
ElseIf $Relog_enabled = False Then
$Relog_state = "DISABLED"
EndIf
EndFunc
Func _toggle_pause()
$pause = Not $pause
If $pause = True Then
AdlibUnRegister("_Check_Alive")
AdlibUnRegister("_Send_key")
Else
AdlibRegister("_Send_key",60000)
AdlibRegister("_Check_Alive",30000)
ToolTip("",0,0)
EndIf
$ptimer = TimerInit()
While $pause = True
$ptimer_diff = TimerDiff($ptimer)
If $ptimer_diff > 1000 Then
ToolTip("Paused..",0,0,"Archeage Anti-AFK " & $Current_Version)
$ptimer = TimerInit()
EndIf
Sleep(50)
WEnd
EndFunc
Func _tooltip()
ToolTip("F7: Toggle Auto Re-Login (" & $Relog_state & ")" & @CRLF & "F8: Toggle Pause" & @CRLF & "F9: Toggle Jumping (" & $jumping_state & ")" & @CRLF & "F10: Toggle Tooltip" & @CRLF & "F11: Exit Anti-AFK" & @CRLF & "© Paraly",0,0,"Archeage Anti-AFK " & $Current_Version)
EndFunc
Func _exit()
Exit
EndFunc
Func _Check_Alive()
$wList = WinList()
Local $i = 1, $f
Do
If $wList[$i][1] = $hwnd Then
$Alive = True
Else
$Alive = False
EndIf
$i += 1
Until $i = $wList[0][0] Or $Alive = True
If $Alive = False Then
$filename = "ArcheAge-crash_" & @MDAY & "_" & @MON & "_" & @YEAR & " -- " & @HOUR & "-" & @MIN & ".txt"
$f = FileOpen(@TempDir & "\" & $filename,2+8)
$Runtime_diff = TimerDiff($Runtime)
$cRuntime = $Runtime_diff / 1000
$cRuntime = Ceiling($cRuntime)
$cRuntime /= 60
$cRuntime = Ceiling($cRuntime)
FileWrite($f,"Crashed at: " & @MDAY & "." & @MON & "." & @YEAR & " - " & @HOUR & ":" & @MIN & @CRLF & "Bot runned for: " & $cRuntime & " minutes")
FileClose($f)
If $Relog_enabled = True Then
_Relog()
Else
Run(@WindowsDir & "\explorer.exe " & "/n,/select," & @TempDir & "\" & $filename)
Exit
EndIf
EndIf
EndFunc
Func _check_version()
$Source = _GetHTML("http://www.elitepvpers.com/forum/archeage/3424813-archeage-antiafk.html")
$Latest_Version = StringRegExp($Source, '<div class="align-right">Ver: (.*?)</div>',3)
If IsArray($Latest_Version) Then
If $Latest_Version[0] > $Current_Version Then
MsgBox(64,"Update aviable!","Version " & $Latest_Version[0] & " is now aviable.")
ShellExecute("http://www.elitepvpers.com/forum/archeage/3424813-archeage-antiafk.html")
EndIf
EndIf
EndFunc
Func _GetHTML($sURL)
$httpObj = ObjCreate("winhttp.winhttprequest.5.1")
$httpObj.open("GET",$sURL)
$httpObj.send()
$HTMLSource = $httpObj.Responsetext
Return $HTMLSource
EndFunc
Func _check_RenameFile()
If FileExists(@ScriptDir & "\ArcheAge - AntiAFK " & $Current_Version & "s.exe") Then
FileDelete(@ScriptDir & "\ArcheAge - AntiAFK " & $Current_Version & "s.exe")
EndIf
EndFunc
Func _Relog()
AdlibUnRegister("_Check_Alive")
AdlibUnRegister("_Send_key")
$Basedir_Readed = RegRead("HKEY_CURRENT_USER\Software\AhnLab\HShield\dl*-e:..","GamePath")
$Basedir_Len = StringLen($Basedir_Readed)
$Basedir = StringLeft($Basedir_Readed, $Basedir_Len - 39)
;Run($Basedir & " -t +auth_ip 193.105.173.135 -auth_port 1237 -handle 000006bc:000005f4 -lang en_us -lang de")
Run($Basedir & "\GlyphClient.exe -game 120")
While WinActive($GlyphTitle) = 0
Sleep(50)
WEnd
Sleep(10000)
$Glyph_hwnd = WinGetHandle($GlyphTitle)
$PlayButton = _Calc_Pos(1)
Opt("MouseCoordMode", 2)
MouseClick("left",Ceiling($PlayButton[0]), Ceiling($PlayButton[1]))
;_MouseClickPlus($GlyphTitle, "left", Ceiling($PlayButton[0]), Ceiling($PlayButton[1]), 1)
$timeout = TimerInit()
While WinActive("[CLASS:ArcheAge]", "") = 0
$timeout_diff = TimerDiff($timeout)
If $timeout_diff > 60000 Then
MsgBox(16,"ERROR","Errorcode: 46")
Exit
EndIf
Sleep(50)
WEnd
Sleep(2500)
$title = WinGetTitle("[CLASS:ArcheAge]", "")
$hwnd = WinGetHandle($title)
_PostMessage_SendDown($hwnd, 0x1B)
Sleep(Random(120,180,1))
_PostMessage_SendUp($hwnd, 0x1B)
Sleep(8500)
$FirstServer_coord = _Calc_Pos(2)
$title = WinGetTitle("[CLASS:ArcheAge]", "")
$hwnd = WinGetHandle($title)
_MouseClickPlus($title, "left", Ceiling($FirstServer_coord[0]), Ceiling($FirstServer_coord[1]), 2)
Sleep(Random(12000,24000,1))
$Play_coord = _Calc_Pos(3)
$title = WinGetTitle("[CLASS:ArcheAge]", "")
$hwnd = WinGetHandle($title)
_MouseClickPlus($title, "left", Ceiling($Play_coord[0]), Ceiling($Play_coord[1]), 2)
Sleep(Random(35000,45000,1))
AdlibRegister("_Send_key",60000)
AdlibRegister("_Check_Alive",5000)
EndFunc
Func _Calc_Pos($mode)
If $mode = 1 Then; Play Button - Glyph
$p = WinGetPos($GlyphTitle)
If IsArray($p) Then
Dim $cPos[2]
$cPos[0] = $p[2] / 2.133399014778325
$cPos[1] = $p[3] / 1.166892655367232
Else
;MsgBox(16,"ERROR","Errorcode: 49",2)
_Check_Alive()
EndIf
Return $cPos
ElseIf $mode = 2 Then; Server auswahl
$title = WinGetTitle("[CLASS:ArcheAge]", "")
$p = WinGetPos($title)
If IsArray($p) Then
Dim $cPos[2]
$cPos[0] = $p[2] / 2.099346405228758
$cPos[1] = $p[3] / 3.36231884057971
Else
;MsgBox(16,"ERROR","Errorcode: 47",2)
_Check_Alive()
EndIf
Return $cPos
ElseIf $mode = 3 Then; Charauswahl
$title = WinGetTitle("[CLASS:ArcheAge]", "")
$p = WinGetPos($title)
If IsArray($p) Then
Dim $cPos[2]
$cPos[0] = $p[2] / 1.068529607451763
$cPos[1] = $p[3] / 1.058152793614595
Else
;MsgBox(16,"ERROR","Errorcode: 48",2)
_Check_Alive()
EndIf
Return $cPos
ElseIf $mode = 4 Then; Disconnect button
$title = WinGetTitle("[CLASS:ArcheAge]", "")
$p = WinGetPos($title)
If IsArray($p) Then
Dim $cPos[2]
$cPos[0] = $p[2] / 2.015056461731493
$cPos[1] = $p[3] / 1.863453815261044
Else
;MsgBox(16,"ERROR","Errorcode: 49",2)
_Check_Alive()
EndIf
Return $cPos
EndIf
EndFunc
Changelog:
**Version: 1.22**
-Added auto Re-Login function
-Added pause hotkey
-Some performance fixes
**Version: 1.16**
-Added new Keysend methode
-Jumping can now be turned off
-Create log files of time when ArcheAge did crash
-Renames itself
**Version: 1.10**
-Added Random intervals
-It will open Random Windows now
-It notifies if an update is out
-Added auto Re-Login function
-Added pause hotkey
-Some performance fixes
**Version: 1.16**
-Added new Keysend methode
-Jumping can now be turned off
-Create log files of time when ArcheAge did crash
-Renames itself
**Version: 1.10**
-Added Random intervals
-It will open Random Windows now
-It notifies if an update is out
Ver: 1.22