⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unitautoadd.pas

📁 诛仙delphi外挂源码诛仙delphi外挂源码诛仙delphi外挂源码诛仙delphi外挂源码诛仙delphi外挂源码
💻 PAS
字号:
unit UnitAutoAdd;

interface

uses
  Classes,windows,SysUtils,Unit1,consttype;

type
  AutoAdd = class(TThread)
  private
    { Private declarations }
    procedure CheckXue(DXue:cardinal);
    procedure Checklan(DLan:cardinal);
  protected
    procedure Execute; override;
  end;
var
wnd:hwnd;
implementation
uses UnitCall;
var
myFuncCall:FuncCall;


{ Important: Methods and properties of objects in visual components can only be
  used in a method called using Synchronize, for example,

      Synchronize(UpdateCaption);

  and UpdateCaption could look like,

    procedure AutoAdd.UpdateCaption;
    begin
      Form1.Caption := 'Updated in a thread';
    end; }

{ AutoAdd }
 //延时程序
  procedure Delay(msecs: integer);
  var
      FirstTickCount: Longint;
  begin   
      FirstTickCount := GetTickCount;
      repeat   
          //Application.ProcessMessages();
          sleep(1);
      until ((GetTickCount - FirstTickCount) >= Longint(msecs));
  end;

procedure AutoAdd.Execute;
var
proHandle:hwnd;
BaseMan:dword;//人物基址
DXue:cardinal;
DLan:cardinal;
num:cardinal;
begin
  { Place thread code here }
  while not Terminated do
  begin
  proHandle:=OpenProcess(PROCESS_ALL_ACCESS,false,pid);
  ReadProcessMemory(proHandle,pointer(base),@BaseMan, 4, Num);//一级基址
  ReadProcessMemory(proHandle,pointer(BaseMan + $28), @BaseMan, 4, Num);//人物基址
  ReadProcessMemory(proHandle,pointer(BaseMan +$254), @DXue, 4, Num);//当前血
  ReadProcessMemory(proHandle,pointer(BaseMan +$258), @DLan, 4, Num);//当前蓝
  CheckXue(DXue);
  CheckLan(DLan);
  delay(1000);
  closeHandle(proHandle);
  end;
end;


procedure AutoAdd.CheckXue(DXue:cardinal);
begin
if Form1.CheckBoxXue.Checked then
begin
  if Form1.ComboBox_Xue.ItemIndex>=0 then
  begin
    if DXue<strtoint(Form1.Edit_limitXue.Text) then
    begin
        myFuncCall.UseItem(Form1.GetSelectXueID);
      end;
    end;
  end;
end;

procedure AutoAdd.CheckLan(DLan:cardinal);
begin
if Form1.CheckBoxLan.Checked then
begin
  if Form1.ComboBox_Lan.ItemIndex>=0 then
  begin
    if DLan<strtoint(Form1.Edit_limitLan.Text) then
    begin
        myFuncCall.UseItem(Form1.GetSelectLanID);
      end;
    end;
  end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -