📄 dllform.pas
字号:
unit DllForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, ExtCtrls;
type
TDllForm1 = class(TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
Memo1: TMemo;
TabSheetGain: TTabSheet;
LabelDrop: TLabel;
LabelGain: TLabel;
MemoDrop: TMemo;
MemoGain: TMemo;
CheckBoxCollectGoods: TCheckBox;
TabSheetEat: TTabSheet;
LabelYuan: TLabel;
LabelNei: TLabel;
LabelWai: TLabel;
LabelWu: TLabel;
LabelHuo: TLabel;
LabelTime: TLabel;
ComboBoxYQ: TComboBox;
EditYuan: TEdit;
EditNei: TEdit;
EditWai: TEdit;
EditWu: TEdit;
EditHuo: TEdit;
EditTime: TEdit;
CheckBoxEat: TCheckBox;
ComboBoxNeiG: TComboBox;
ComboBoxWaiG: TComboBox;
ComboBoxWuG: TComboBox;
ComboBoxHL: TComboBox;
procedure CheckBoxEatClick(Sender: TObject);
procedure ComboBoxYQChange(Sender: TObject);
procedure ComboBoxYQEnter(Sender: TObject);
procedure ComboBoxNeiGChange(Sender: TObject);
procedure ComboBoxNeiGEnter(Sender: TObject);
procedure ComboBoxWaiGChange(Sender: TObject);
procedure ComboBoxWaiGEnter(Sender: TObject);
procedure ComboBoxWuGChange(Sender: TObject);
procedure ComboBoxWuGEnter(Sender: TObject);
procedure ComboBoxHLChange(Sender: TObject);
procedure ComboBoxHLEnter(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
procedure GameSetting();
var
DllForm1: TDllForm1;
nIDEvent : Cardinal;
implementation
{$R *.dfm}
uses DataManage, PackStruct;
procedure TDllForm1.CheckBoxEatClick(Sender: TObject);
begin
if DllForm1.CheckBoxEat.Checked = true then
nIDEvent := SetTimer(0, 0, StrtoInt(DllForm1.EditTime.Text), @EatMedication)
else
KillTimer(0, nIDEvent);
end;
procedure TDllForm1.ComboBoxYQChange(Sender: TObject);
var
site : integer;
temp : string;
begin
site := pos(':',ComboBoxYQ.Text);
temp := copy(ComboBoxYQ.Text, 0, site-1);
YuanQMedication := StrToInt(temp);
end;
procedure TDllForm1.ComboBoxYQEnter(Sender: TObject);
var
i : integer;
PGameGoods : PTGameGoods;
begin
ComboBoxYQ.Clear;
for i := 0 to 29 do //读取内存中的物品栏数据
begin
dword(PGameGoods) := i * $23 + PGoodsStart;
StrCopy(myGoods[i].name, PGameGoods.name);
myGoods[i].num := PGameGoods.num;
ComboBoxYQ.Items.Add(IntToStr(PGameGoods.place) + ':' + myGoods[i].name);
end;
end;
procedure TDllForm1.ComboBoxNeiGChange(Sender: TObject);
var
site : integer;
temp : string;
begin
site := pos(':',ComboBoxNeiG.Text);
temp := copy(ComboBoxNeiG.Text, 0, site-1);
NeiGMedication := StrToInt(temp);
end;
procedure TDllForm1.ComboBoxNeiGEnter(Sender: TObject);
var
i : integer;
PGameGoods : PTGameGoods;
begin
ComboBoxNeiG.Clear;
for i := 0 to 29 do //读取内存中的物品栏数据
begin
dword(PGameGoods) := i * $23 + PGoodsStart;
StrCopy(myGoods[i].name, PGameGoods.name);
myGoods[i].num := PGameGoods.num;
ComboBoxNeiG.Items.Add(IntToStr(PGameGoods.place) + ':' + myGoods[i].name);
end;
end;
procedure TDllForm1.ComboBoxWaiGChange(Sender: TObject);
var
site : integer;
temp : string;
begin
site := pos(':',ComboBoxWaiG.Text);
temp := copy(ComboBoxWaiG.Text, 0, site-1);
WaiGMedication := StrToInt(temp);
end;
procedure TDllForm1.ComboBoxWaiGEnter(Sender: TObject);
var
i : integer;
PGameGoods : PTGameGoods;
begin
ComboBoxWaiG.Clear;
for i := 0 to 29 do //读取内存中的物品栏数据
begin
dword(PGameGoods) := i * $23 + PGoodsStart;
StrCopy(myGoods[i].name, PGameGoods.name);
myGoods[i].num := PGameGoods.num;
ComboBoxWaiG.Items.Add(IntToStr(PGameGoods.place) + ':' + myGoods[i].name);
end;
end;
procedure TDllForm1.ComboBoxWuGChange(Sender: TObject);
var
site : integer;
temp : string;
begin
site := pos(':',ComboBoxWuG.Text);
temp := copy(ComboBoxWuG.Text, 0, site-1);
WuGMedication := StrToInt(temp);
end;
procedure TDllForm1.ComboBoxWuGEnter(Sender: TObject);
var
i : integer;
PGameGoods : PTGameGoods;
begin
ComboBoxWuG.Clear;
for i := 0 to 29 do //读取内存中的物品栏数据
begin
dword(PGameGoods) := i * $23 + PGoodsStart;
StrCopy(myGoods[i].name, PGameGoods.name);
myGoods[i].num := PGameGoods.num;
ComboBoxWuG.Items.Add(IntToStr(PGameGoods.place) + ':' + myGoods[i].name);
end;
end;
procedure TDllForm1.ComboBoxHLChange(Sender: TObject);
var
site : integer;
temp : string;
begin
site := pos(':',ComboBoxHL.Text);
temp := copy(ComboBoxHL.Text, 0, site-1);
HuoLMedication := StrToInt(temp);
end;
procedure TDllForm1.ComboBoxHLEnter(Sender: TObject);
var
i : integer;
PGameGoods : PTGameGoods;
begin
ComboBoxHL.Clear;
for i := 0 to 29 do //读取内存中的物品栏数据
begin
dword(PGameGoods) := i * $23 + PGoodsStart;
StrCopy(myGoods[i].name, PGameGoods.name);
myGoods[i].num := PGameGoods.num;
ComboBoxHL.Items.Add(IntToStr(PGameGoods.place) + ':' + myGoods[i].name);
end;
end;
procedure GameSetting();
begin
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -