Code:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#AutoIt3Wrapper_UseX64=n
#include "KDMemory.au3"
#include <Misc.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 427, 199, 570, 291)
$status = GUICtrlCreateLabel("----", 8, 155, 143, 17)
$onoff = GUICtrlCreateLabel("----", 288, 152, 132, 17)
$oldcoordsx = GUICtrlCreateLabel("----", 8, 91, 128, 17)
$oldcoordsy = GUICtrlCreateLabel("----", 272, 91, 135, 17)
$xgui = GUICtrlCreateLabel("----", 8, 64, 129, 17)
$ygui = GUICtrlCreateLabel("----", 272, 64, 129, 17)
$attenemy = GUICtrlCreateLabel("----", 142, 16, 143, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("{F10}","_Start")
HotKeySet("{F11}","_Stop")
Global Const $processName = "game.bin",$moduleName = "game.bin"
Global $processId = ProcessExists($processName)
$statusa = 0
While $processId = False
Global $processId = ProcessExists($processName)
If $statusa = 0 Then
GUICtrlSetData($status,"Waiting for AK")
$statusa = 1
EndIf
;ToolTip($processId)
WEnd
Global $handles = _KDMemory_OpenProcess($processId)
$statusb = 0
While $handles = False
Global $handles = _KDMemory_OpenProcess($processId)
If $statusb = 0 Then
GUICtrlSetData($status,"Attaching...")
$statusb = 1
EndIf
WEnd
Global $baseOffset = 0x00B44158
Global $base = _KDMemory_GetModuleBaseAddress($handles, $moduleName) + $baseOffset
GUICtrlSetData($status,"Attached")
$1 = _KDMemory_ReadProcessMemory($handles, 0x00F441B0, "DWORD")
if not IsArray($1) Then
MsgBox(64,":(" ,"seems outdated or you started ak first")
EndIf
$bot = 0
$vadress = 0x00F441B0
$kill = 0
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
While $bot = 1
If WinActive("Aura Kingdom Online") Then
$visier = _KDMemory_ReadProcessMemory($handles, $vadress, "DWORD")
If GUICtrlRead($attenemy) <> $visier[1] Then
GUICtrlSetData($attenemy,$visier[1])
EndIf
If $visier[1] = 0 Then
Do
If WinActive("Aura Kingdom Online") Then
Send("{TAB}")
Send("{e down}")
$visier = _KDMemory_ReadProcessMemory($handles, $vadress, "DWORD")
; ToolTip($visier[1])
EndIf
Sleep(100)
Until $visier[1] > 1
Send("{e up}")
EndIf
Send("1")
Sleep(100)
Send("2")
Sleep(100)
Send("3")
Sleep(100)
Send("4")
Sleep(100)
Send("5")
EndIf
WEnd
WEnd
Func _Start()
Global $bot = 1
Global $offsets[5] = [0xfc,0x204,0x450,0xc,0x154]
;Global $baseOffset = 0x00B44158; - 0C1AEAD4
$readwtwy = _KDMemory_ReadProcessMemory($handles, $base, "Float",$offsets)
Global $xadress = $readwtwy[0];0x0B65C650;$readwtwy[0] ;ToolTip("Warped")
Global $yadress = $xadress + 0x4;0x0BB6F9D8
Global $zadress = $yadress + 0x4
Global $bx = _KDMemory_ReadProcessMemory($handles, $xadress, "Float")
Global $by = _KDMemory_ReadProcessMemory($handles, $yadress, "Float")
Global $oldx = _KDMemory_ReadProcessMemory($handles, $xadress, "Float")
Global $oldy = _KDMemory_ReadProcessMemory($handles, $yadress, "Float")
Global $oldz = _KDMemory_ReadProcessMemory($handles, $zadress, "Float")
AdlibRegister("_PoS")
;AdlibRegister("Stuck")
GUICtrlSetData($onoff,"Running")
EndFunc
Func _Stop()
Global $bot = 0
AdlibunRegister("_PoS")
;AdlibunRegister("Stuck")
GUICtrlSetData($onoff,"Paused")
EndFunc
Func _PoS()
$x =_KDMemory_ReadProcessMemory($handles, $xadress, "Float")
$y = _KDMemory_ReadProcessMemory($handles, $yadress, "Float")
$a = $oldx[1]
$b = $oldx[1]
$c = $oldy[1]
$d = $oldy[1]
;ToolTip($x[1] & " " & $oldx[1] & " " & $y[1] & " " & $oldy[1])
If GUICtrlRead($xgui) <> $oldx[1] Then
GUICtrlSetData($xgui,$x[1])
EndIf
If GUICtrlRead($ygui) <> $y[1] Then
GUICtrlSetData($ygui,$y[1])
EndIf
If GUICtrlRead($oldcoordsx) <> $oldx[1] Then
GUICtrlSetData($oldcoordsx,$oldx[1])
EndIf
If GUICtrlRead($oldcoordsy) <> $oldy[1] Then
GUICtrlSetData($oldcoordsy,$oldy[1])
EndIf
$xvald = $a - 100
$xvalp = $b + 100
$yvald = $c - 100
$yvalp = $d + 100
If $x[1] > $xvalp Then
;ToolTip("Warped")
_KDMemory_WriteProcessMemory($handles, $xadress, "Float", $oldx[1])
_KDMemory_WriteProcessMemory($handles, $yadress, "Float", $oldy[1])
_KDMemory_WriteProcessMemory($handles, $zadress, "Float", $oldz[1])
ElseIf $x[1] < $xvald Then
;ToolTip("Warped")
_KDMemory_WriteProcessMemory($handles, $xadress, "Float", $oldx[1])
_KDMemory_WriteProcessMemory($handles, $yadress, "Float", $oldy[1])
_KDMemory_WriteProcessMemory($handles, $zadress, "Float", $oldz[1])
ElseIf $y[1] > $yvalp Then
;ToolTip("Warped")
_KDMemory_WriteProcessMemory($handles, $xadress, "Float", $oldx[1])
_KDMemory_WriteProcessMemory($handles, $yadress, "Float", $oldy[1])
_KDMemory_WriteProcessMemory($handles, $zadress, "Float", $oldz[1])
ElseIf $y[1] < $yvald Then
;ToolTip("Warped")
_KDMemory_WriteProcessMemory($handles, $xadress, "Float", $oldx[1])
_KDMemory_WriteProcessMemory($handles, $yadress, "Float", $oldy[1])
_KDMemory_WriteProcessMemory($handles, $zadress, "Float", $oldz[1])
EndIf
EndFunc
Func Stuck()
$ax = _KDMemory_ReadProcessMemory($handles, $xadress, "Float")
$ay = _KDMemory_ReadProcessMemory($handles, $yadress, "Float")
If $ax[1] = $bx[1] And $ay[1] = $by[1] Then
Global $timerini = TimerInit()
If TimerDiff($timerini) > 30000 Then
If $ax[1] = $bx[1] And $ay[1] = $by[1] Then
_KDMemory_WriteProcessMemory($handles, $xadress, "Float", $oldx[1])
_KDMemory_WriteProcessMemory($handles, $yadress, "Float", $oldy[1])
$bx = _KDMemory_ReadProcessMemory($handles, $xadress, "Float")
$by = _KDMemory_ReadProcessMemory($handles, $yadress, "Float")
Global $timerini = TimerInit()
MsgBox(0,"","Reset()")
EndIf
EndIf
EndIf
EndFunc