Procedure tform1.timer1timer (Sender: tobject );
VaR
Whandle: hwnd;
Hpid: hwnd;
Phandle: hwnd;
Base, ybase, ybase1, gjms1, num, mapaddr, rnameaddr: DWORD;
HP, maxhp, MP, maxmp, PX, Py, yhp, ymaxhp, YMP, ymaxmp: Cardinal;
Map, rname, gjms: array [0 .. 32] of char;
Begin
Whandle: = findwindow ('tfrmmain', 'gend of mir2 ');
Getwindowthreadprocessid (whandle, @ hpid );
Phandle: = OpenProcess (process_all_access, false, hpid );
// Master ID information
Readprocessmemory (phandle, pointer ($ 59c7cc), @ base, 4, num );
Readprocessmemory (phandle, pint (base + $ 4c), @ HP, 4, num );
Readprocessmemory (phandle, pint (base + $ 4C + $4), @ maxhp, 4, num );
Readprocessmemory (phandle, pint (base + $ 4C + $8), @ MP, 4, num );
Readprocessmemory (phandle, pint (base + $ 4C + $ C), @ maxmp, 4, num );
Readprocessmemory (phandle, pint (base + $ 4C + $ 8C), @ PX, 4, num );
Readprocessmemory (phandle, pint (base + $ 4C + $90), @ py, 4, num );
// Current Coordinate
Readprocessmemory (phandle, pointer ($ 59c7cc + $10), @ mapaddr, 4, num );
Readprocessmemory (phandle, pointer (mapaddr), @ map [0], 20, num );
Readprocessmemory (phandle, pointer ($ 59c7cc-$58508), @ rnameaddr, 4, num );
Readprocessmemory (phandle, pointer (rnameaddr), @ rname [0], 20, num );
Readprocessmemory (phandle, pointer ($ 59c7cc + $2300), @ gjms1, 4, num );
Readprocessmemory (phandle, pointer (gjms1), @ gjms [0], 14, num );
// Hero Information
Readprocessmemory (phandle, pointer ($ 59c7cc-$58ff4), @ ybase1, 4, num );
Readprocessmemory (phandle, pointer (ybase1 + $ 2c), @ ybase, 4, num );
Readprocessmemory (phandle, pint (ybase + $ 4c), @ yhp, 4, num );
Readprocessmemory (phandle, pint (ybase + $ 4C + $4), @ ymaxhp, 4, num );
Readprocessmemory (phandle, pint (ybase + $ 4C + $8), @ YMP, 4, num );
Readprocessmemory (phandle, pint (ybase + $ 4C + $ C), @ ymaxmp, 4, num );
Form1.statictext1. caption: = '[' + String (rname) + ''+ String (MAP) +'' + inttostr (PX) + ':' + inttostr (Py) + ']' + String (gjms );
Form1.label1. caption: = 'Primary HP: '+ inttostr (HP) +'/'+ inttostr (maxhp) + 'mp:' + inttostr (MP) + '/' + inttostr (maxmp) + 'HP: '+ inttostr (yhp) +'/'+ inttostr (ymaxhp) + 'mp:' + inttostr (YMP) + '/' + inttostr (ymaxmp );
I personally think these addresses are very important. Of course, the items in the bag are also found, but I haven't thought about what to do yet, so I will put them on hold first!