分析出值基址+偏移;
[[[[[95E800+1c]+24]+918]+14]+1c ] //角色对象基址
+3C //当前坐标 x,h,y
+7C //当前坐标 X,h,y
+25c //当前血值
+260 //当前魔力值
+274 //血值上限
+278 //魔力值上限
+28c //防御
//GameCaption='Element Client'
//游戏窗口类名='QElementClientWindow'
var
Gameh:hwnd; //游戏窗口句柄
GamePid:Thandle; //进程ID
GamehProcess:Thandle; //进程句柄
Gameh:=FindWindow(nil,游戏标题);
GetWindowThreadProcessID(Gameh,GamePid);
GamehProcess:=OpenProcess;
ReadProcessMemory(hprocess,Pointer(SleepBase),@NewSpeed,5,readByte);
// code
unit GameFunction; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; function GetRoleBase:integer; //其它要调用的函数 要前置 Function GetCurBlood:integer; var Gameh:hwnd; //游戏窗口句柄 GamePid:Thandle; //进程ID GamehProcess:Thandle; //进程句柄 const GameCaption='Element Client'; GameWndClassName='QElementClient Window'; GameBase =$95E800; implementation function GetRoleBase:integer; var ptmp:integer; readByte:Dword; begin result:=0; Gameh:=FindWindow(nil,GameCaption); if Gameh=0 then exit; GetWindowThreadProcessID(Gameh,GamePid); GamehProcess:=OpenProcess(windows.PROCESS_ALL_ACCESS,false,GamePid); // [[[[[95E800+1c]+24]+918]+14]+1c ] //角色对象基址 ReadProcessMemory(GamehProcess,Pointer(GameBase+$1C),@ptmp,4,readByte); ReadProcessMemory(GamehProcess,Pointer(Ptmp+$24),@ptmp,4,readByte); ReadProcessMemory(GamehProcess,Pointer(Ptmp+$918),@ptmp,4,readByte); ReadProcessMemory(GamehProcess,Pointer(Ptmp+$14),@ptmp,4,readByte); ReadProcessMemory(GamehProcess,Pointer(Ptmp+$1C),@ptmp,4,readByte); result:=ptmp; end; Function GetCurBlood:integer; var base,ptmp:integer; readByte:Dword; begin Result:=0; base:=GetRoleBase; Gameh:=FindWindow(nil,GameCaption); if Gameh=0 then exit; GetWindowThreadProcessID(Gameh,GamePid); GamehProcess:=OpenProcess(windows.PROCESS_ALL_ACCESS,false,GamePid); ReadProcessMemory(GamehProcess,Pointer(base+$25c),@ptmp,4,readByte); Result:=ptmp; end; end.