Adding source so you can run it/compile it yourself if you want - understandable if people don't want to run EXE's. Adapted from a tutorial by darkjohn20 over on the Cheat Engine forums.
Updated source 3/24
Requires NomadMemory.au3, found here:
http://www.autoitscript.com/forum/index ... h_id=31611
Code: Select all
#RequireAdmin
#include <NomadMemory.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $hMemory
Global $checker = 0
Global $AutoAttack = Dec("1C3F094")
Global $BaseAddress = _MemoryGetBaseAddress($hMemory, 1)
#Region ### START Koda GUI section ###
$hGUI = GUICreate("tNok85's SWG Autoattack Patcher for TaultUnleashed", 259, 40, 192, 104)
$hAttach = GUICtrlCreateButton("Attach", 8, 8, 75, 25, $WS_GROUP)
$hDetach = GUICtrlCreateButton("Detach", 88, 8, 83, 25, $WS_GROUP)
GUICtrlSetState($hDetach, $GUI_DISABLE)
$hQuit = GUICtrlCreateButton("Quit", 176, 8, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Switch GUIGetMsg()
Case $hAttach
$hMemory = _MemoryOpen(ProcessExists("SwgClient_r.exe"))
GUICtrlSetState($hDetach,$GUI_ENABLE)
GUICtrlSetState($hAttach,$GUI_DISABLE)
_Patch()
Case $hDetach
_StopLoop()
_MemoryClose($hMemory)
GUICtrlSetState($hAttach,$GUI_ENABLE)
GUICtrlSetState($hDetach,$GUI_DISABLE)
Case $hQuit
Exit
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
If $checker=1 Then
$Write = _MemoryWrite($AutoAttack, $hMemory, "1")
Sleep(250)
EndIf
WEnd
Func _Patch()
If $BaseAddress = 0 Then
Select
Case @error = 1
MsgBox(0, "Error", "Error getting base address: " & @CRLF & "Invalid handle to open process")
Case @error = 2
MsgBox(0, "Error", "Error getting base address: " & @CRLF & "Failed to find correct allocation address")
Case @error = 3
MsgBox(0, "Error", "Error getting base address: " & @CRLF & "Failed to read from the specified process")
EndSelect
EndIf
$checker=1
EndFunc
Func _StopLoop()
$checker=0
$Write = _MemoryWrite($AutoAttack, $hMemory, "0")
EndFunc