請問大大們 我這樣讀出來都是亂碼 請問要怎麼解決
procedure TForm1.Timer6Timer(Sender: TObject);
var
ENVIRON_BASE_ADDR,PLAYER_BASE_ADDR,PLAYER_LIST_ADDR:dword;
ROLE_BASE_ADDR,ROLE_SN,PLAYER_ADDR,PLAYER_OBJ,PLAYER_MAXHP,PLAYER_CURHP,PLAYER_NAME_ADDR:cardinal;
PLAYER_X,PLAYER_y,PLAYER_z:single;
PLAYER_NAME: array [0..16] of WideChar;
UnicodeName:dword ;
begin
ReadProcessMemory(ProcessID,Pointer($A5BFB0+$1C),@first, 4, tt); //讀取一級基址
ReadProcessMemory(ProcessID,Pointer(first+$08),@ENVIRON_BASE_ADDR,4,tt); //取得環境基址
ReadProcessMemory(ProcessID,Pointer(ENVIRON_BASE_ADDR+$20),@PLAYER_BASE_ADDR,4,tt); //取得週圍玩家基址
ReadProcessMemory(ProcessID,Pointer(PLAYER_BASE_ADDR+$18),@PLAYER_LIST_ADDR,4,tt); //取得週圍玩家列表基址
ReadProcessMemory(ProcessID,Pointer(ROLE_BASE_ADDR+$B0C),@ROLE_SN,4,tt); //人物選中sn
ReadProcessMemory(ProcessID,Pointer(PLAYER_LIST_ADDR+((ROLE_SN Mod 769))*4),@PLAYER_ADDR,4,tt );//相應位置玩家基址
ReadProcessMemory(ProcessID,Pointer(PLAYER_ADDR+$4),@PLAYER_OBJ,4,tt); //相應位置玩家指針
ReadProcessMemory(ProcessID,Pointer(PLAYER_OBJ+$3C),@PLAYER_X,4,tt); //相應位置玩家X座標
ReadProcessMemory(ProcessID,Pointer(PLAYER_OBJ+$44),@PLAYER_Y,4,tt); //相應位置玩家y座標
ReadProcessMemory(ProcessID,Pointer(PLAYER_OBJ+$40),@PLAYER_Z,4,tt); //相應位置玩家Z座標
ReadProcessMemory(ProcessID,Pointer(PLAYER_OBJ+$4B4),@PLAYER_MAXHP,4,tt); //相應位置玩家最大血量
ReadProcessMemory(ProcessID,Pointer(PLAYER_OBJ+$474),@PLAYER_CURHP,4,tt); //相應位置玩家當前血量
ReadProcessMemory(ProcessID,Pointer(PLAYER_OBJ+$618),@PLAYER_CURHP,4,tt); //相應位置玩家名稱基址
ReadProcessMemory(ProcessID,pointer(PLAYER_NAME_ADDR),@PLAYER_NAME,SizeOf(PLAYER_NAME), tt);//讀取人物名稱
Label35.Caption := '玩家名稱:' + string(PLAYER_NAME);
Label36.Caption := '座標:'+Formatfloat('0',(PLAYER_X/10+400))+', '+Formatfloat('0',(PLAYER_Y/10+550))+
'#' + Formatfloat('0',(PLAYER_Z/10));
Label37.Caption := '玩家血量:'+IntToStr(PLAYER_CURHP)+' / '+IntToStr(PLAYER_MAXHP);
end; |