請教各位先進下面是哪邊出錯了
選中怪時讀出正常血量 選中玩家時卻都是0
READPROCESSMEMORY(GAMES,Pointer(MOTION_BASE_ADD+$8),@FIGURE_ENVIRON_ADD,4,PP);
READPROCESSMEMORY(GAMES,Pointer(FIGURE_ENVIRON_ADD+$24),@FIGURE_PLAY_ADD,4,PP); READPROCESSMEMORY(GAMES,Pointer(FIGURE_PLAY_ADD+$14),@PLAYER_ENVIRON_amount,4,PP); READPROCESSMEMORY(GAMES,Pointer(FIGURE_PLAY_ADD+$24),@FIGURE_ENVIRON_MAX,4,PP);
READPROCESSMEMORY(GAMES,Pointer(FIGURE_PLAY_ADD+$18),@PLAYER_ENVIRON_LIST,4,PP);
ReadProcessMemory(games,Pointer(MOTION_BASE_ADD+$20), @MID, 4, pp);
ReadProcessMemory(games,Pointer(MID+$B0C), @MID, 4, pp);
EAX := PLAYER_ENVIRON_LIST + ((MID Mod FIGURE_ENVIRON_MAX)) * 4 ;
ReadProcessMemory(games, Pointer(eax),@ftt, 4, pp);
READPROCESSMEMORY(GAMES,Pointer(FTT+$4),@EAX,4,PP);
READPROCESSMEMORY(GAMES,Pointer(EAX+$16C),@PLAYER_FIGURE_MAXHP,4,PP);
READPROCESSMEMORY(GAMES,Pointer(EAX+$12C),@PLAYER_FIGURE_HP,4,PP);
LABEL9.Caption := '怪物血量' + INTTOSTR(PLAYER_FIGURE_HP)+'/' +INTTOSTR(PLAYER_FIGURE_MAXHP);
//
if PLAYER_FIGURE_HP=0 then
BEGIN
READPROCESSMEMORY(GAMES,Pointer(MOTION_BASE_ADD+$8),@FIGURE_ENVIRON_ADD,4,PP);
READPROCESSMEMORY(GAMES,Pointer(FIGURE_ENVIRON_ADD+$20),@FIGURE_PLAY_ADD,4,PP);
READPROCESSMEMORY(GAMES,Pointer(FIGURE_PLAY_ADD+$14),@PLAYER_ENVIRON_amount,4,PP);
LABEL11.Caption := '玩家數量' + INTTOSTR(PLAYER_ENVIRON_amount);
READPROCESSMEMORY(GAMES,Pointer(FIGURE_PLAY_ADD+$24),@FIGURE_ENVIRON_MAX,4,PP);
READPROCESSMEMORY(GAMES,Pointer(FIGURE_PLAY_ADD+$18),@PLAYER_ENVIRON_LIST,4,PP);
ReadProcessMemory(games, Pointer(MOTION_BASE_ADD+$20), @MID, 4, pp);
ReadProcessMemory(games, Pointer(MID+$B0C), @MID, 4, pp);
eax := PLAYER_ENVIRON_LIST + ((MID Mod FIGURE_ENVIRON_MAX)) * 4 ;
ReadProcessMemory(games, Pointer(eax),@ftt,4, pp);
READPROCESSMEMORY(GAMES,Pointer(FTT+$20),@EAX,4,PP);
READPROCESSMEMORY(GAMES,Pointer(EAX+$4B4),@PLAYER_FIGURE_MAXHP,4,PP);
READPROCESSMEMORY(GAMES,Pointer(EAX+$474),@PLAYER_FIGURE_HP,4,PP);
LABEL15.Caption := '玩家血量' + INTTOSTR(PLAYER_FIGURE_HP)+'/'+INTTOSTR(PLAYER_FIGURE_MAXHP);
END; |