Snappie's AutoFletcher - first script!

Discussion in 'RuneScape Scripts' started by snappie1000, Oct 29, 2008.

Snappie's AutoFletcher - first script!
  1. Unread #1 - Oct 29, 2008 at 11:42 AM
  2. snappie1000
    Joined:
    Apr 7, 2007
    Posts:
    464
    Referrals:
    1
    Sythe Gold:
    1
    Two Factor Authentication User

    snappie1000 Forum Addict

    Snappie's AutoFletcher - first script!

    My first script. I will update it if i get some good feedbacks. Make sure you are logged in and you must have a knife in first slot and logs in the other slots. Also you need logs in your first bank slot. It will only fletch oak or better longbows. This script will work in any bank in:
    - Falador
    - Varrock
    - Draynor
    - Al-Kharid

    Current verison: V0.2
    Added:
    - Easy to fill in form
    - Made more randomness


    Code:
    program AutoFletcher
    
    {.include SRL/SRL.scar}
    {############################ Description. READ! ##############################)
    (## Version: 0.1                                                             ##)
    (## Created by: Snappie1000                                                  ##)
    (##                                                                          ##)
    (## Requiments: Knife in first inventory slot and 27 logs in the other 27    ##)
    (## slots and some logs in first bank slot                                   ##)
    (##                                                                          ##)
    (## Futher information:                                                      ##)
    (## At line 23 you will find "Bank = '';. Here you have to enter in which    ##)
    (## bank you are. Fill in one with of the following commands:                ##)                                                    ##)
    (##  'feb' (Falador East Bank)                                               ##)
    (##  'fwb' (Falador West Bank)                                               ##)
    (##  'veb' (Varrock East Bank)                                               ##)
    (##  'vwb' (Varrock West Bank)                                               ##)
    (##  'db'  (Draynor Bank)                                                    ##)
    (##  'akb' (Al-Kharid Bank)                                                  ##)
    (##############################################################################}
    
    const
    Bank2 = 'veb';                     //Check description for futher information
    Loads2= 10;
    
    {########### Don't change this except when you know what your doing ###########}
    var
      x, y, LoadsDone, LogsCut : Integer;
      frmDesign : TForm;
      Label1 : TLabel;
      Label2 : TLabel;
      Label3 : TLabel;
      username : TEdit;
      password : TEdit;
      nickname : TEdit;
      start : TButton;
    
    
    procedure ButtonClick(sender: TObject);
    begin
      frmDesign.Caption:= frmDesign.Caption + '.';
      frmDesign.ModalResult:= mrOk;
    end;
    
    procedure InitForm;
    begin
      frmDesign := CreateForm;
      frmDesign.Left := 480;
      frmDesign.Top := 180;
      frmDesign.Width := 400;
      frmDesign.Height := 200;
      frmDesign.Caption := 'Snappie''s AutoFletcher';
      frmDesign.Color := clBlack;
      frmDesign.Font.Color := clWindowText;
      frmDesign.Font.Height := -11;
      frmDesign.Font.Name := 'MS Sans Serif';
      frmDesign.Font.Style := [];
      frmDesign.Visible := False;
      frmDesign.PixelsPerInch := 96;
      username := TEdit.Create(frmDesign);
      username.Parent := frmDesign;
      username.Left := 20;
      username.Top := 28;
      username.Width :=170 ;
      username.Height := 17;
      username.TabOrder := 8;
      username.Text := '';
      password := TEdit.Create(frmDesign);
      password.Parent := frmDesign;
      password.Left := 20;
      password.Top := 78;
      password.Width := 170;
      password.Height := 17;
      password.TabOrder := 9;
      password.Text := '';
      nickname := TEdit.Create(frmDesign);
      nickname.Parent := frmDesign;
      nickname.Left := 20;
      nickname.Top := 128;
      nickname.Width := 170;
      nickname.Height := 17;
      nickname.TabOrder := 10;
      nickname.Text := '';
      Label1 := TLabel.Create(frmDesign);
      Label1.Parent := frmDesign;
      Label1.Left := 20;
      Label1.Top := 10;
      Label1.Width := 164;
      Label1.Height := 10;
      Label1.Caption := 'Username:';
      Label1.Font.Color := clYellow;
      Label1.Font.Height := -13;
      Label1.Font.Name := 'Comic Sans MS';
      Label1.Font.Style := [];
      Label2 := TLabel.Create(frmDesign);
      Label2.Parent := frmDesign;
      Label2.Left := 20;
      Label2.Top := 60;
      Label2.Width := 164;
      Label2.Height := 10;
      Label2.Caption := 'Password:';
      Label2.Font.Color := clYellow;
      Label2.Font.Height := -13;
      Label2.Font.Name := 'Comic Sans MS';
      Label2.Font.Style := [];
      Label3 := TLabel.Create(frmDesign);
      Label3.Parent := frmDesign;
      Label3.Left := 20;
      Label3.Top := 110;
      Label3.Width := 164;
      Label3.Height := 32;
      Label3.Caption := 'Nickname:';
      Label3.Font.Color := clYellow;
      Label3.Font.Height := -13;
      Label3.Font.Name := 'Comic Sans MS';
      Label3.Font.Style := [];
      start := TButton.Create(frmDesign);
      start.OnClick := @buttonclick;
      start.Parent := frmDesign;
      start.Left := 210;
      start.Top := 28;
      start.Width := 145;
      start.Height := 120;
      start.Caption := 'Start Fletching';
      start.TabOrder := 12;
    end;
    
    
    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;
    
    procedure ShowFormModal;
    begin
      frmDesign.ShowModal;
    end;
    
    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;
    
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name := username.Text;
      Players[0].Pass := password.Text;
      Players[0].Nick := nickname.Text;
      Players[0].Active := True;
    end;
    
    
    procedure AntiRandoms;
    begin
      FindNormalRandoms;
      if FindFight then
        RunAway('N', True, 1, 5000);
    end;
    
    
    procedure AntiBan;
    begin
      case random(20) of
        0: PickUpMouse;
        1: BoredHuman;
        2: HoverSkill('Fletching', False);
        3,4: begin
               MakeCompass('N');
               wait(10+random(5));
               MakeCompass('S');
               wait(10+random(5));
               MakeCompass('N');
             end;
      end;
    end;
    
    
    procedure Fletch;
    begin
     if not LoggedIn then LoginPlayer;
      wait(500+random(1000));
      AntiRandoms;
      MouseItem(1, true);                                // click knife
      wait(500+random(1000));
      MouseItem(2, true);                                // click log
      wait(500+random(1000));
      Mouse(214+random(94), 381+random(58), 1, 1, false) // click longbow
      wait(500+random(1000));
      ChooseOption('X');
      Wait(500+random(1000));
      AntiRandoms;
        Case Random(10) of
          0: TypeSend(AddMistakes('27', 20));
          1: TypeSend(AddMistakes('27', 20));
          2: TypeSend(AddMistakes('28', 20));
          3: TypeSend(AddMistakes('29', 20));
          4: TypeSend(AddMistakes('38', 20));
          5: TypeSend(AddMistakes('39', 20));
          6: TypeSend(AddMistakes('51', 20));
          7: TypeSend(AddMistakes('60', 20));
          8: TypeSend(AddMistakes('89', 20));
          9: TypeSend(AddMistakes('99', 20));
        end;
      Writeln ('Fletching logs.');
      Wait(500+random(1000));
      AntiBan;
      wait(51000+random(500));
    end;
    
    
    procedure GoBank;
    begin
     if not LoggedIn then Exit;
      AntiRandoms;
      LogsCut:=LogsCut+27;
      LoadsDone:=Loadsdone+1;
      Writeln ('######## Report #####################');
      Writeln ('## Fletched: ' +IntToStr(LogsCut)+ ' log(s).');
      Writeln ('## Fletched: ' +IntToStr(Loadsdone)+' load(s).');
      Writeln ('## Ran for: ' +TimeRunning+'.');
      Writeln ('#####################################');
      OpenBankQuiet(bank2);
      wait(500+random(1000));
      if (BankScreen=false) then
        begin
         writeln('Couldn''t find bank, terminating script');
         logout;
         terminatescript;
        end;
      if (BankScreen=true) then
       begin
        Mouse(612, 232, 4, 4, false);
        Wait(200+random(500));
        ChooseOption('All');
        Wait(200+random(500));
        Mouse(51, 109, 4, 4, false);
        Wait(200+random(500));
        ChooseOption('X');
        Wait(200+random(500));
          Case Random(10) of
            0: TypeSend(AddMistakes('27', 20));
            1: TypeSend(AddMistakes('27', 20));
            2: TypeSend(AddMistakes('28', 20));
            3: TypeSend(AddMistakes('30', 20));
            4: TypeSend(AddMistakes('33', 20));
            5: TypeSend(AddMistakes('51', 20));
            6: TypeSend(AddMistakes('71', 20));
            7: TypeSend(AddMistakes('88', 20));
            8: TypeSend(AddMistakes('89', 20));
            9: TypeSend(AddMistakes('99', 20));
          end;
        Wait(250+random(500));
        CloseBank;
       end;
    end;
    
    begin
      SetupSRL;
      SafeInitForm;
      SafeShowFormModal;
      DeclarePlayers;
      Repeat
        Fletch;
        GoBank;
      until(Loadsdone >= Loads2);
    end.
    
     
  3. Unread #2 - Oct 29, 2008 at 11:58 AM
  4. HyperSecret
    Joined:
    Jun 5, 2007
    Posts:
    123
    Referrals:
    0
    Sythe Gold:
    0

    HyperSecret Active Member

    Snappie's AutoFletcher - first script!

    need to call DeclarePlayers;

    Code:
    SetupSRL;
    DeclarePlayers;
    Maybe a couple failsafes?

    Code:
    if not LoggedIn then Exit; //functions and procedures
    if not LoggedIn then LoginPlayer; //mainloop
    Also with banking?

    Code:
    if not OpenBankFast(bank) then
      if not OpenBankQuiet(bank) then
       //break or try something here?
    
    ?
     
  5. Unread #3 - Oct 29, 2008 at 12:01 PM
  6. snappie1000
    Joined:
    Apr 7, 2007
    Posts:
    464
    Referrals:
    1
    Sythe Gold:
    1
    Two Factor Authentication User

    snappie1000 Forum Addict

    Snappie's AutoFletcher - first script!

    I alredy declared players in procedure fletch. Failsafes are a great idea. Ill add them in my script.
     
  7. Unread #4 - Oct 29, 2008 at 12:02 PM
  8. HyperSecret
    Joined:
    Jun 5, 2007
    Posts:
    123
    Referrals:
    0
    Sythe Gold:
    0

    HyperSecret Active Member

    Snappie's AutoFletcher - first script!

    Don't repeat it ;)
     
  9. Unread #5 - Oct 29, 2008 at 1:13 PM
  10. Rs Pker
    Joined:
    Oct 27, 2008
    Posts:
    122
    Referrals:
    0
    Sythe Gold:
    0

    Rs Pker Active Member
    Banned

    Snappie's AutoFletcher - first script!

    its and with banking?
     
  11. Unread #6 - Oct 29, 2008 at 1:50 PM
  12. snappie1000
    Joined:
    Apr 7, 2007
    Posts:
    464
    Referrals:
    1
    Sythe Gold:
    1
    Two Factor Authentication User

    snappie1000 Forum Addict

    Snappie's AutoFletcher - first script!

    ofcours
     
  13. Unread #7 - Oct 29, 2008 at 3:14 PM
  14. GMK
    Joined:
    Aug 2, 2007
    Posts:
    395
    Referrals:
    0
    Sythe Gold:
    0

    GMK Forum Addict

    Snappie's AutoFletcher - first script!

    looks good snappie, glad to see that you have taken up scripting.
     
  15. Unread #8 - Oct 29, 2008 at 3:35 PM
  16. HyperSecret
    Joined:
    Jun 5, 2007
    Posts:
    123
    Referrals:
    0
    Sythe Gold:
    0

    HyperSecret Active Member

    Snappie's AutoFletcher - first script!

    sorry snappie, don't want to repeat SetupSRL; either (= bad)

    mainloop should be

    Code:
    begin
      SetupSRL;
      DeclarePlayers;
      Repeat
        Fletch;
        GoBank;
      until(Loadsdone >= Loads);
    end.

    sorry for the confusion.


    What declareplayers does is sets the player up for logging in and out and creating a TPA of the nickname for anti-randoms. So this only needs to be called once.

    SetupSRL sets up everything in SRL, just some random stuff like MouseSpeed, Creates things, connects to stats, stuff like that...
     
  17. Unread #9 - Oct 30, 2008 at 4:14 PM
  18. Jethr0x
    Joined:
    Jan 24, 2007
    Posts:
    3,070
    Referrals:
    13
    Sythe Gold:
    0

    Jethr0x Grand Master
    Banned

    Snappie's AutoFletcher - first script!

    TypeSend('27');

    eeek, make more randomness.

    learn cases... OR, i think theres a "HitKeys;" command.
     
  19. Unread #10 - Oct 31, 2008 at 3:43 PM
  20. snappie1000
    Joined:
    Apr 7, 2007
    Posts:
    464
    Referrals:
    1
    Sythe Gold:
    1
    Two Factor Authentication User

    snappie1000 Forum Addict

    Snappie's AutoFletcher - first script!

    Thanks.

    I've added the script like you said. Thanks for the help tough.

    "procedure TypeSend(Text: String);
    By: Mutant Squirrle
    Description:
    Types text humanlike using random timeing on keys."

    But if you mean typing 27 all the time; im working on a V0.2 which I will include with stuff like this (and I hope it will get a good working form).
     
  21. Unread #11 - Oct 31, 2008 at 4:50 PM
  22. GMK
    Joined:
    Aug 2, 2007
    Posts:
    395
    Referrals:
    0
    Sythe Gold:
    0

    GMK Forum Addict

    Snappie's AutoFletcher - first script!

    Snappie, just one thing. to add to what Jethr0x said, use this
    Code:
    TypeSend(AddMistakes('Text here', 20))
    It types what you put in "text here" and might make a mistake in spelling like a human would.
     
  23. Unread #12 - Nov 1, 2008 at 4:10 AM
  24. snappie1000
    Joined:
    Apr 7, 2007
    Posts:
    464
    Referrals:
    1
    Sythe Gold:
    1
    Two Factor Authentication User

    snappie1000 Forum Addict

    Snappie's AutoFletcher - first script!

    So that's like
    Code:
        Case Random(10) of
          0: TypeSend(AddMistakes('27', 20));
          1: TypeSend(AddMistakes('27', 20));
          2: TypeSend(AddMistakes('28', 20));
          3: TypeSend(AddMistakes('29', 20));
          4: TypeSend(AddMistakes('38', 20));
          5: TypeSend(AddMistakes('39', 20));
          6: TypeSend(AddMistakes('51', 20));
          7: TypeSend(AddMistakes('60', 20));
          8: TypeSend(AddMistakes('89', 20));
          9: TypeSend(AddMistakes('99', 20));
        end;
    
     
  25. Unread #13 - Nov 1, 2008 at 6:07 AM
  26. snappie1000
    Joined:
    Apr 7, 2007
    Posts:
    464
    Referrals:
    1
    Sythe Gold:
    1
    Two Factor Authentication User

    snappie1000 Forum Addict

    Snappie's AutoFletcher - first script!

    Script updated
     
  27. Unread #14 - Nov 1, 2008 at 6:54 AM
  28. radiclerobby
    Joined:
    Mar 9, 2008
    Posts:
    720
    Referrals:
    0
    Sythe Gold:
    0

    radiclerobby Apprentice
    Banned

    Snappie's AutoFletcher - first script!

    ok good good but you wouldnt wana make all those typesends all have added mistakes if you think about it its kinda detectable and a human wouldnt type everything wrong :p just tryin to help matie
     
  29. Unread #15 - Nov 1, 2008 at 7:28 AM
  30. snappie1000
    Joined:
    Apr 7, 2007
    Posts:
    464
    Referrals:
    1
    Sythe Gold:
    1
    Two Factor Authentication User

    snappie1000 Forum Addict

    Snappie's AutoFletcher - first script!

    True. But the more random the script is, the less likely a ban is.
     
  31. Unread #16 - Nov 1, 2008 at 9:38 AM
  32. GMK
    Joined:
    Aug 2, 2007
    Posts:
    395
    Referrals:
    0
    Sythe Gold:
    0

    GMK Forum Addict

    Snappie's AutoFletcher - first script!

    Radicle, the 20 in the function means that it wont always make mistakes but just sometimes. trust me its good function to use

    And yes snappie thats the idea.
     
  33. Unread #17 - Nov 2, 2008 at 10:04 PM
  34. HyperSecret
    Joined:
    Jun 5, 2007
    Posts:
    123
    Referrals:
    0
    Sythe Gold:
    0

    HyperSecret Active Member

    Snappie's AutoFletcher - first script!

    Percentage of the time you want it to make a mistake is what the 20 means.
     
  35. Unread #18 - Nov 3, 2008 at 1:52 AM
  36. snappie1000
    Joined:
    Apr 7, 2007
    Posts:
    464
    Referrals:
    1
    Sythe Gold:
    1
    Two Factor Authentication User

    snappie1000 Forum Addict

    Snappie's AutoFletcher - first script!

    Could anyone please test the script and post a feedback?
     
  37. Unread #19 - Nov 3, 2008 at 7:33 PM
  38. Jethr0x
    Joined:
    Jan 24, 2007
    Posts:
    3,070
    Referrals:
    13
    Sythe Gold:
    0

    Jethr0x Grand Master
    Banned

    Snappie's AutoFletcher - first script!

    isnt addmistakes just for letters?

    just do like
    typesend(Inttostr(27+random(1000))

    or just do hitkeys;
     
  39. Unread #20 - Nov 4, 2008 at 3:04 PM
  40. GMK
    Joined:
    Aug 2, 2007
    Posts:
    395
    Referrals:
    0
    Sythe Gold:
    0

    GMK Forum Addict

    Snappie's AutoFletcher - first script!

    it should work as long as the number is in string format. Jethr0x, i think he would be better off saying words then just random numbers up to 1027 =] .
     
< A Timer Script I made | >

Users viewing this thread
1 guest


 
 
Adblock breaks this site