Results 1 to 6 of 6

Thread: Runescape Drop Log by All that is man

  1. #1
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Runescape Drop Log by All that is man

    Just a simple form with a neat function....
    ....Yes, I play runescape legit....

    Also does anyone know how I would go about clicking a button that would save it to a file? If that's possible.
    SCAR Code:
    {Runescape Drop Log by All that is man}

    program FormDesign;
    var
      frmDropLog: Tform;
      lstbxDrops: TListBox;
      edtAddDrop: TEdit;
      btnAddDrop: TButton;
      btnQuickDrops: Array[0..1]of TButton;
      trbCharmType: Array[0..3]of TRadioButton;
      QuickDropCaptions, CharmTypeCaptions: TStringArray;
      lblQuick: TLabel;
      i, dn: integer;
     
    procedure AddDrop(tob: TObject);
    begin
      dn := dn + 1;
      lstbxDrops.Items.Add(IntToStr(dn) + '. ' + edtAddDrop.text);
      edtAddDrop.text := '';
    end;
    procedure QuickDrops(tob: TObject);
    begin
      case tob of
       btnQuickDrops[0]: begin
                          if(trbCharmType[0].checked)then
                          begin
                            edtAddDrop.text := 'Gold Charm.';
                            AddDrop(tob);
                          end;
                          if(trbCharmType[1].checked)then
                          begin
                            edtAddDrop.text := 'Green Charm.';
                            AddDrop(tob);
                          end;
                          if(trbCharmType[2].checked)then
                          begin
                            edtAddDrop.text := 'Crimson Charm.';
                            AddDrop(tob);
                          end;
                          if(trbCharmType[3].checked)then
                          begin
                            edtAddDrop.text := 'Blue Charm.';
                            AddDrop(tob);
                          end;
                         end;
       btnQuickDrops[1]: begin
                           edtAddDrop.text := 'Coins.';
                           AddDrop(tob);
                         end;

      end;
    end;
    procedure InitForm;
    begin
      frmDropLog := CreateForm;
      lstbxDrops := TListBox.create(frmDropLog);
      edtAddDrop := TEdit.create(frmDropLog);
      btnAddDrop := TButton.create(frmDropLog);
      lblQuick := TLabel.create(frmDropLog);
      for i := 0 to 1 do
        btnQuickDrops[i] := TButton.create(frmDropLog);
      for i := 0 to 3 do
        trbCharmType[i] := TRadioButton.create(frmDropLog);
      with frmDropLog do
      begin
        Position := PoScreenCenter;
        Width := 300;
        Height := 400;
        Caption := 'Runescape Drop Log';
        Color := 1549141;
        Font.Color := clBlack;
      end;
      with lstbxDrops do
      begin
        Parent := frmDropLog;
        Left := 150;
        Top := 10;
        Height := 350;
      end;
      with edtAddDrop do
      begin
        Parent := frmDropLog;
        Left := 10;
        Top := 10;
        Width := 100;
      end;
      with btnAddDrop do
      begin
        Parent := frmDropLog;
        Left := 10;
        Top := 35;
        Height := 20;
        Width := 100;
        Caption := 'Add Drop';
        OnClick := @AddDrop;
      end;
      with lblQuick do
      begin
        Parent := frmDropLog;
        Left := 10;
        Top := 60;
        Caption := 'Quick Drops:';
        Font.Size := 12;
        Font.Name := 'New Times Roman';
      end;
      QuickDropCaptions := ['Charm', 'Coins'];
      for i := 0 to 1 do
      begin
        with btnQuickDrops[i] do
        begin
          Parent := frmDropLog;
          Left := 10;
          Height := 20;
          Width := 100;
          Top := 160 + (i * 25);
          Caption := QuickDropCaptions[i];
          OnClick := @QuickDrops;
        end;
      end;
      CharmTypeCaptions := ['Gold', 'Green', 'Crimson', 'Blue'];
      for i := 0 to 3 do
      begin
        with trbCharmType[i] do
        begin
          Parent := frmDropLog;
          Top := 80 + i * 20;
          Left := 10;
          Caption := CharmTypeCaptions[i];
        end;
      end;
    end;
    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;
    procedure ShowFormModal;
    begin
      frmDropLog.ShowModal;
    end;
    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;
    begin
      SafeInitForm;
      SafeShowFormModal;
    end.
    Last edited by All that is man; 10-18-2009 at 04:11 PM.

  2. #2
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by All that is man View Post
    Just a simple form with a neat function....
    ....Yes, I play runescape legit....

    Also does anyone know how I would go about clicking a button that would save it to a file? If that's possible.
    SCAR Code:
    {Runescape Drop Log by All that is man}

    program FormDesign;
    var
      frmDropLog: Tform;
      lstbxDrops: TListBox;
      edtAddDrop: TEdit;
      btnAddDrop: TButton;
      btnQuickDrops: Array[0..1]of TButton;
      trbCharmType: Array[0..3]of TRadioButton;
      QuickDropCaptions, CharmTypeCaptions: TStringArray;
      lblQuick: TLabel;
      i, dn: integer;
     
    procedure AddDrop(tob: TObject);
    begin
      dn := dn + 1;
      lstbxDrops.Items.Add(IntToStr(dn) + '. ' + edtAddDrop.text);
      edtAddDrop.text := '';
    end;
    procedure QuickDrops(tob: TObject);
    begin
      case tob of
       btnQuickDrops[0]: begin
                          if(trbCharmType[0].checked)then
                          begin
                            edtAddDrop.text := 'Gold Charm.';
                            AddDrop(tob);
                          end;
                          if(trbCharmType[1].checked)then
                          begin
                            edtAddDrop.text := 'Green Charm.';
                            AddDrop(tob);
                          end;
                          if(trbCharmType[2].checked)then
                          begin
                            edtAddDrop.text := 'Crimson Charm.';
                            AddDrop(tob);
                          end;
                          if(trbCharmType[3].checked)then
                          begin
                            edtAddDrop.text := 'Blue Charm.';
                            AddDrop(tob);
                          end;
                         end;
       btnQuickDrops[1]: begin
                           edtAddDrop.text := 'Coins.';
                           AddDrop(tob);
                         end;

      end;
    end;
    procedure InitForm;
    begin
      frmDropLog := CreateForm;
      lstbxDrops := TListBox.create(frmDropLog);
      edtAddDrop := TEdit.create(frmDropLog);
      btnAddDrop := TButton.create(frmDropLog);
      lblQuick := TLabel.create(frmDropLog);
      for i := 0 to 1 do
        btnQuickDrops[i] := TButton.create(frmDropLog);
      for i := 0 to 3 do
        trbCharmType[i] := TRadioButton.create(frmDropLog);
      with frmDropLog do
      begin
        Position := PoScreenCenter;
        Width := 300;
        Height := 400;
        Caption := 'Runescape Drop Log';
        Color := 1549141;
        Font.Color := clBlack;
      end;
      with lstbxDrops do
      begin
        Parent := frmDropLog;
        Left := 150;
        Top := 10;
        Height := 350;
      end;
      with edtAddDrop do
      begin
        Parent := frmDropLog;
        Left := 10;
        Top := 10;
        Width := 100;
      end;
      with btnAddDrop do
      begin
        Parent := frmDropLog;
        Left := 10;
        Top := 35;
        Height := 20;
        Width := 100;
        Caption := 'Add Drop';
        OnClick := @AddDrop;
      end;
      with lblQuick do
      begin
        Parent := frmDropLog;
        Left := 10;
        Top := 60;
        Caption := 'Quick Drops:';
        Font.Size := 12;
        Font.Name := 'New Times Roman';
      end;
      QuickDropCaptions := ['Charm', 'Coins'];
      for i := 0 to 1 do
      begin
        with btnQuickDrops[i] do
        begin
          Parent := frmDropLog;
          Left := 10;
          Height := 20;
          Width := 100;
          Top := 160 + (i * 25);
          Caption := QuickDropCaptions[i];
          OnClick := @QuickDrops;
        end;
      end;
      CharmTypeCaptions := ['Gold', 'Green', 'Crimson', 'Blue'];
      for i := 0 to 3 do
      begin
        with trbCharmType[i] do
        begin
          Parent := frmDropLog;
          Top := 80 + i * 20;
          Left := 10;
          Caption := CharmTypeCaptions[i];
        end;
      end;
    end;
    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;
    procedure ShowFormModal;
    begin
      frmDropLog.ShowModal;
    end;
    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;
    begin
      SafeInitForm;
      SafeShowFormModal;
    end.
    Whats the object of this ?

  3. #3
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    to log your drops you get from killing monsters legit

    and to save it, let me whip up my procedure to save from my notepad

    edit:

    SCAR Code:
    procedure SaveTehFile;
    begin
        SaveDialog1 := TSaveDialog.Create(nil);
      SaveDialog1.InitialDir := AppPath;
      SaveDialog1.Filter := 'Text Documents (*.txt)|*.txt|' +
                            'All Files|*|';
      if SaveDialog1.Execute then
        savetoFile(Memo1, Savedialog1.FileName);
      SaveDialog1.Free;
    end;

    Memo1 is the part where the text is, every thing else should be self explanitory, just make a button and a pointer to that proc when clicked, and a save dialog will(should) appear
    Last edited by Awkwardsaw; 10-20-2009 at 12:39 AM.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  4. #4
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Itd be cool if you could tell it amount of stacked items dropped, so you know how many coins/charms/feathers/stackable times you got . Neato idea I guess. The form is cool.

  5. #5
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm i might add something like that YoHoJo, also if possible could you move this? Cause I put it here by accident lol its kinda rs - related

  6. #6
    Join Date
    Mar 2007
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Very nice, I have always thought something like this would be great.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •