CODE Case Of 职业 修真期

CODE Case Of 职业 修真期
procedure DsplyRoleCareer(); 
//JOB=[[[924E0C]+1C]+20]+5D4//职业ID 0=武侠,1=法师,3=妖精,4=妖兽,6=羽茫,7=羽灵
Const
    BaseAddress =$ 924E0C;
        Offset1 =$ 1C;
        Offset2 =$ 20;
      CareerOffset =$ 5D4;
var
  MyHwnd:HWND;
  ProcessIdentifier:DWORD;
  MyPid:Dword;
  MyProcess:Thandle;
  MyPointer:Integer;
  Readbyte:DWORD; //Size_T
  CareerId:Integer;
  Career: string;
begin
  MyHwnd :=FindWindow( NIL, 'Element Client');
  GetWindowThreadProcessId(MyHwnd,@myPid);
  MyProcess :=OpenProcess(PROCESS_ALL_ACCESS,false,myPid);
  ReadProcessMemory(MyProcess,Pointer(BaseAddress),@MyPointer, 4,Readbyte);
  ReadProcessMemory(MyProcess,Pointer(MyPointer +Offset1),@MyPointer, 4,Readbyte);
  ReadProcessMemory(MyProcess,Pointer(MyPointer +Offset2),@MyPointer, 4,Readbyte);
  ReadProcessMemory(MyProcess,Pointer(MyPointer +CareerOffset),@CareerId, 4,Readbyte);
  CloseHandle(MyProcess);
   //显示数值
   case CareerId of
       0:career := '武侠';
       1:career := '法师';
       3:career := '妖精';
       4:career := '妖兽';
       6:career := '羽茫';
       7:career := '羽灵';
   end;
 form1.edit1.Text :=career;
end;

procedure DsplyRoleXzq();
//Xzq=[[[924E0C]+1C]+20]+44C//修真期
Const
    BaseAddress =$ 924E0C;
        Offset1 =$ 1C;
        Offset2 =$ 20;
      XzqOffset =$ 44C;
var
  MyHwnd:HWND;
  ProcessIdentifier:DWORD;
  MyPid:Dword;
  MyProcess:Thandle;
  MyPointer:Integer;
  Readbyte:DWORD; //Size_T
  XzqID:Integer;
  Xzq: string;
begin
  MyHwnd :=FindWindow( NIL, 'Element Client');
  GetWindowThreadProcessId(MyHwnd,@myPid);
  MyProcess :=OpenProcess(PROCESS_ALL_ACCESS,false,myPid);
  ReadProcessMemory(MyProcess,Pointer(BaseAddress),@MyPointer, 4,Readbyte);
  ReadProcessMemory(MyProcess,Pointer(MyPointer +Offset1),@MyPointer, 4,Readbyte);
  ReadProcessMemory(MyProcess,Pointer(MyPointer +Offset2),@MyPointer, 4,Readbyte);
  ReadProcessMemory(MyProcess,Pointer(MyPointer +XzqOffset),@XzqID, 4,Readbyte);
  CloseHandle(MyProcess);
   //显示数值
   case XzqID of
       0:Xzq := '筑基';
       1:Xzq := '灵虚';
       3:Xzq := '合和';
       4:Xzq := '空冥';
       5:Xzq := '履霜';
       6:Xzq := '渡劫';
       7:Xzq := '寂灭';
       8:Xzq := '大乘';
       20:Xzq := '上仙';
       21:Xzq := '真仙';
       22:Xzq := '天仙';
       30:Xzq := '狂魔';
       31:Xzq := '魔圣';
       32:Xzq := '魔尊';
   end;
 form1.edit2.Text :=Xzq;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
  DsplyRoleCareer;
  DsplyRoleXzq;
end;
 




附件列表

     

    你可能感兴趣的:(code)