Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_x64=Autoit\Orcs Must Die 2 Trainer.exe
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>
#include <Pointer.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Orcs Must Die 2 Trainer", 210, 74, 192, 114)
GUISetBkColor(0x00FF00)
$Label1 = GUICtrlCreateLabel("Numpad 1 = 10000 Gold", 40, 8, 120, 17)
$Button1 = GUICtrlCreateButton("Exit", 40, 32, 123, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$iv_Pid = ProcessExists("OrcsMustDie2.exe")
$ah_handle = _MemoryOpen($iv_Pid)
$ModuleBaseAddress = _MemoryModuleGetBaseAddress($iv_Pid, "OrcsMustDie2.exe")
$StartAddress = $ModuleBaseAddress + 0x07AD9AC
$Pointer1 = _MemoryRead($StartAddress,$ah_handle) + 124
$Pointer2 = _MemoryRead($Pointer1,$ah_handle) + 0x1ec
$Pointer3 = _MemoryRead($Pointer2,$ah_handle) + 0x254
$Pointer4 = _MemoryRead($Pointer3,$ah_handle) + 0xc
$iv_Address = _MemoryRead($Pointer4,$ah_handle) + 0x7c
HotKeySet("{numpad1}","_Gold")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit
EndSwitch
WEnd
Func _Gold()
$G = _MemoryRead($iv_Address,$ah_handle)
_MemoryWrite($iv_Address,$ah_handle,$G + 10000)
EndFunc