begin
//********************讀取怪物資訊****************
ReadProcessMemory(ProcessID, Pointer(W2i_Base), @ftt, 4, tt);
ReadProcessMemory(ProcessID, Pointer(ftt+$08), @ftt, 4, tt);
ReadProcessMemory(ProcessID, Pointer(ftt+$24), @ta, 4, tt);
ReadProcessMemory(ProcessID, Pointer(ta+$24), @tmp1, 4, tt);
ReadProcessMemory(ProcessID, Pointer(ta+$18), @tmp2, 4, tt);
ReadProcessMemory(ProcessID, Pointer(W2i_Base), @MID, 4, tt);
ReadProcessMemory(ProcessID, Pointer(MID+$20), @MID, 4, tt);
ReadProcessMemory(ProcessID, Pointer(MID+$A2c), @MID, 4, tt);
eax := tmp2 + ((MID Mod tmp1)) * 4 ;
ReadProcessMemory(ProcessID, Pointer(eax), @ftt, 4, tt);
ReadProcessMemory(ProcessID, Pointer(ftt+$4), @eax, 4, tt);
ReadProcessMemory(ProcessID, Pointer(eax+$134), @MONHP, 4, tt);
ReadProcessMemory(ProcessID, Pointer(eax+$14c), @MONMHP, 4, tt);
ReadProcessMemory(ProcessID, Pointer(eax+$124), @MONLV, 4, tt);
if MONMHP=0 then
begin
//********************讀取人物資訊****************
ReadProcessMemory(ProcessID, Pointer(W2i_Base), @ftt, 4, tt);
ReadProcessMemory(ProcessID, Pointer(ftt+$08), @ftt, 4, tt);
ReadProcessMemory(ProcessID, Pointer(ftt+$20), @ta, 4, tt);
ReadProcessMemory(ProcessID, Pointer(ta+$24), @tmp1, 4, tt);
ReadProcessMemory(ProcessID, Pointer(ta+$18), @tmp2, 4, tt);
ReadProcessMemory(ProcessID, Pointer(W2i_Base), @MID, 4, tt);
ReadProcessMemory(ProcessID, Pointer(MID+$20), @MID, 4, tt);
ReadProcessMemory(ProcessID, Pointer(MID+$A2c), @MID, 4, tt);
eax := tmp2 + ((MID Mod tmp1)) * 4 ;
ReadProcessMemory(ProcessID, Pointer(eax), @ftt, 4, tt);
ReadProcessMemory(ProcessID, Pointer(ftt+$20), @eax, 4, tt);
ReadProcessMemory(ProcessID, Pointer(eax+$464), @MONHP, 4, tt);
ReadProcessMemory(ProcessID, Pointer(eax+$494), @MONMHP, 4, tt);
ReadProcessMemory(ProcessID, Pointer(eax+$45c), @MONLV, 4, tt);
end;
if MONMHP<>0 then
label19.Caption := inttostr(MONLV) ;
label20.Caption := inttostr(MONHP)+'/'+inttostr(MONMHP);
end; |