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

📄 standaloneunit.pas

📁 冒险岛吸怪源码UCE的制作材料 用于冒险岛游戏的外挂
💻 PAS
📖 第 1 页 / 共 2 页
字号:


procedure TStandalone.MenuItem1Click(Sender: TObject);
begin
  showmessage('This shows the addresses that will be added to the trainer'+chr(13)+chr(10)+
              'If checked, it means the trainer will freeze the address to the current'+chr(13)+chr(10)+
               'state the address is right now.'+chr(13)+chr(10)+
               'If not it will get the value from the game and then freeze it when the user checks it');
end;


procedure TStandalone.Button2Click(Sender: TObject);
var index: Integer;
    i,j: Integer;
    group: integer;
begin
  index:=TRList.ItemIndex;
  if index=-1 then exit;

  group:=outlist[index].Group;

  if group=0 then
  begin
    inList[NumberOfAddressesin]:=outList[index];
    finlist[NumberOfAddressesin]:=Foutlist[index];

    for i:=index to NumberOfAddressesout-2 do
    begin
      outList[i]:=outList[i+1];
      foutlist[i]:=foutlist[i+1];
    end;


    inc(NumberOfAddressesIn);
    dec(NumberOfAddressesOut);

    celist.clear;
    for i:=0 to NumberOfAddressesIn-1 do
      CeList.Items.Add(InList[i].description);

    TRList.clear;
    for i:=0 to NumberOfAddressesOut-1 do
    begin
      TRList.Items.Add(OutList[i].description);
      if Outlist[i].Frozen then TRList.Checked[i]:=true;
    end;

    exit;
  end;

  i:=0;
  while i<numberofaddressesout do
  if outlist[i].Group=group then
  begin
    inList[NumberOfAddressesIn]:=outList[i];
    finlist[NumberOfAddressesIn]:=Foutlist[i];

    for j:=i to NumberOfAddressesOut-2 do
    begin
      outList[j]:=outList[j+1];
      foutlist[j]:=foutlist[j+1];
    end;


    inc(NumberOfAddressesIn);
    dec(NumberOfAddressesOut);
  end else inc(i);

  celist.clear;
  for j:=0 to NumberOfAddressesIn-1 do
    CeList.Items.Add(InList[j].description);

  TRList.clear;
  for j:=0 to NumberOfAddressesOut-1 do
  begin
    TRList.Items.Add(OutList[j].description);
    if Outlist[j].Frozen then TRList.Checked[j]:=true;
  end;
end;

procedure TStandalone.Button3Click(Sender: TObject);
var index: Integer;
    i,j: Integer;
    group: integer;
begin
  index:=CEList.ItemIndex;
  if index=-1 then exit;

  group:=inlist[index].Group;

  if group=0 then
  begin
    outList[NumberOfAddressesOut]:=InList[index];
    foutlist[NumberOfAddressesOut]:=FInlist[index];

    for i:=index to NumberOfAddressesIn-2 do
    begin
      InList[i]:=InList[i+1];
      finlist[i]:=finlist[i+1];
    end;


    inc(NumberOfAddressesOut);
    dec(NumberOfAddressesIn);

    celist.clear;
    for i:=0 to NumberOfAddressesIn-1 do
      CeList.Items.Add(InList[i].description);

    TRList.clear;
    for i:=0 to NumberOfAddressesOut-1 do
    begin
      TRList.Items.Add(OutList[i].description);
      if Outlist[i].Frozen then TRList.Checked[i]:=true;
    end;

    exit;
  end;

  i:=0;
  while i<numberofaddressesin do
  if inlist[i].Group=group then
  begin
    outList[NumberOfAddressesOut]:=InList[i];
    foutlist[NumberOfAddressesOut]:=FInlist[i];

    for j:=i to NumberOfAddressesIn-2 do
    begin
      InList[j]:=InList[j+1];
      finlist[j]:=finlist[j+1];
    end;


    inc(NumberOfAddressesOut);
    dec(NumberOfAddressesIn);
  end else inc(i);

  celist.clear;
  for j:=0 to NumberOfAddressesIn-1 do
    CeList.Items.Add(InList[j].description);

  TRList.clear;
  for j:=0 to NumberOfAddressesOut-1 do
  begin
    TRList.Items.Add(OutList[j].description);
    if Outlist[j].Frozen then TRList.Checked[j]:=true;
  end;

end;


procedure TStandalone.Button4Click(Sender: TObject);
var i:integer;
begin
  for i:=0 to numberofaddressesout do
  begin
    celist.ItemIndex:=0;
    button2.Click;
  end;
end;


procedure TStandalone.Button5Click(Sender: TObject);
var i: Integer;
begin
  for i:=0 to numberofaddressesin do
  begin
    celist.ItemIndex:=0;
    button3.Click;
  end;
end;

procedure TStandalone.Button6Click(Sender: TObject);
var i: Integer;
begin
  if trainerstyle1.checked then
  begin
    exampletrainerstyle1.Caption:=edit1.Text;
    exampletrainerstyle1.Label1.Caption:=memo1.Text;
    exampletrainerstyle1.Color:=panel1.color;
    exampletrainerstyle1.CheckListBox1.Color:=panel2.color;
    exampleTrainerstyle1.CheckListBox1.Font.Color:=panel3.color;
    exampletrainerstyle1.Label1.Font.Color:=panel3.color;
    if checkbox1.checked then
    begin
      exampletrainerstyle1.image1.Visible:=true;
      if not (fileexists(edit2.text)) or (uppercase(extractfileExt(edit2.Text))<>'.BMP') then raise exception.Create(edit2.text+' is not an valid image');
      exampletrainerstyle1.image1.Picture.LoadFromFile(edit2.text);
    end else exampletrainerstyle1.Visible:=false;

    exampletrainerstyle1.CheckListBox1.Clear;
    for i:=0 to TRList.Items.Count-1 do
      exampletrainerstyle1.CheckListBox1.Items.Add(TRList.items[i]);

    exampletrainerstyle1.showmodal;
  end else
  if trainerstyle2.checked then
  begin
    exampletrainerstyle2.Caption:=edit1.Text;
    exampletrainerstyle2.Label1.Caption:=memo1.Text;
    exampletrainerstyle2.Color:=panel1.color;
    exampletrainerstyle2.CheckListBox1.Color:=panel2.color;
    exampleTrainerstyle2.CheckListBox1.Font.Color:=panel3.color;
    exampletrainerstyle2.Label1.Font.Color:=panel3.color;
    if checkbox1.checked then
    begin
      exampletrainerstyle2.image1.Visible:=true;
      if not (fileexists(edit2.text)) or (uppercase(extractfileExt(edit2.Text))<>'.BMP') then raise exception.Create(edit2.text+' is not an valid image');
      exampletrainerstyle2.image1.Picture.LoadFromFile(edit2.text);
    end else exampletrainerstyle2.image1.Visible:=false;

    exampletrainerstyle2.CheckListBox1.Clear;
    for i:=0 to TRList.Items.Count-1 do
      exampletrainerstyle2.CheckListBox1.Items.Add(TRList.items[i]);

    exampletrainerstyle2.showmodal;
  end else
  if trainerstyle3.checked then
  begin
    exampletrainerstyle3.Caption:=edit1.Text;
    exampletrainerstyle3.Label1.Caption:=memo1.Text;
    exampletrainerstyle3.Color:=panel1.color;
    exampletrainerstyle3.CheckListBox1.Color:=panel2.color;
    exampleTrainerstyle3.CheckListBox1.Font.Color:=panel3.color;
    exampletrainerstyle3.Label1.Font.Color:=panel3.color;
    if checkbox1.checked then
    begin
      exampletrainerstyle3.image1.Visible:=true;
      if not (fileexists(edit2.text)) or (uppercase(extractfileExt(edit2.Text))<>'.BMP') then raise exception.Create(edit2.text+' is not an valid image');
      exampletrainerstyle3.image1.Picture.LoadFromFile(edit2.text);
    end else exampletrainerstyle3.Image1.Visible:=false;

    exampletrainerstyle3.CheckListBox1.Clear;
    for i:=0 to TRList.Items.Count-1 do
      exampletrainerstyle3.CheckListBox1.Items.Add(TRList.items[i]);

    exampletrainerstyle3.showmodal;
  end;


end;

procedure TStandalone.Button7Click(Sender: TObject);
var FIcon: TIcon;
    iconstream: TMemorystream;
begin
  OpenDialog1.Title:='Select a file with an ICON';
  Opendialog1.DefaultExt:='ICO';
  if opendialog1.Execute=true then
  begin
    FIcon := TIcon.Create;

    try
      FIcon.Handle := ExtractIcon(hInstance,Pchar(opendialog1.filename), 0);
    except
      FIcon.Free;
      Raise Exception.Create('The file you selected doesn''t have an icon that can be extracted');
      exit;
    end;

    Iconstream:=Tmemorystream.create;
    FIcon.SaveToStream(iconstream);

    if Iconstream.Size<>766 then raise Exception.Create('This is not an valid icon!');

    Iconstream.Seek(0,soFromBeginning);
    Image1.Picture.Icon.LoadFromStream(Iconstream);
    FIcon.Free;
    Iconstream.free;
  end;
end;

procedure TStandAlone.SpeedButton5Click(Sender: TObject);
var backcolor: TColor;
    err: Integer;
begin
  val('$'+edit4.Text,backcolor,err);
  colordialog1.Color:=backcolor;
  if Colordialog1.Execute then
    edit4.Text:=IntToHex(colordialog1.color,6);
end;

procedure TStandAlone.SpeedButton2Click(Sender: TObject);
var backcolor: TColor;
    err: Integer;
begin
  val('$'+edit3.Text,backcolor,err);
  colordialog1.Color:=backcolor;
  if Colordialog1.Execute then
    edit3.Text:=IntToHex(colordialog1.color,6);
end;

procedure TStandAlone.FormCreate(Sender: TObject);
begin
  Edit4.Text:=IntToHex(clBtnFace,6);
  Edit3.Text:=IntToHex(clWindow,6);
  edit5.text:=IntToHex(clWindowText,6);
end;

procedure TStandAlone.SpeedButton3Click(Sender: TObject);
var textcolor: TColor;
    err: Integer;
begin
  val('$'+edit5.Text,textcolor,err);
  colordialog1.Color:=textcolor;
  if Colordialog1.Execute then
    edit5.Text:=IntToHex(colordialog1.color,6);
end;

procedure TStandAlone.Edit4Change(Sender: TObject);
var err: Integer;
    backcolor: TColor;
begin
  val('$'+edit4.Text,backcolor,err);
  panel1.Color:=backcolor;
end;

procedure TStandAlone.Edit4KeyPress(Sender: TObject; var Key: Char);
begin
  case key of
    chr(65)..chr(70) : ;
    chr(97)..chr(102) : ;
    chr(8)        : ;
    chr(16)       : ;
    chr(48)..chr(57) : ;
    else key:=chr(0);
  end;
end;

procedure TStandAlone.Edit3Change(Sender: TObject);
var backcolor: TColor;
    err: Integer;
begin
  val('$'+edit3.Text,backcolor,err);
  panel2.Color:=backcolor;
end;

procedure TStandAlone.Edit5Change(Sender: TObject);
var textcolor: TColor;
    err: Integer;
begin
  val('$'+edit5.Text,textcolor,err);
  panel3.Color:=textcolor;
end;

procedure TStandAlone.TrainerStyle1Click(Sender: TObject);
begin
  imagesize.Caption:='50x50';
end;

procedure TStandAlone.TrainerStyle2Click(Sender: TObject);
begin
  imagesize.Caption:='90x50';
end;

procedure TStandAlone.TrainerStyle3Click(Sender: TObject);
begin
  checkbox1.checked:=true;
  if edit2.Text='' then edit2.Text:='style3def.bmp';
  imagesize.Caption:='280x280';
end;

procedure TStandalone.CheckBox1Click(Sender: TObject);
begin
  edit2.visible:=checkbox1.checked;
  speedbutton1.Visible:=checkbox1.checked;
  imagesize.Visible:=checkbox1.Checked;
end;

procedure TStandalone.SpeedButton1Click(Sender: TObject);
begin
  if openpicturedialog1.Execute then
  begin
    edit2.Text:=openpicturedialog1.FileName;
  end;
end;

end.

⌨️ 快捷键说明

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