Results 1 to 18 of 18

Thread: AutoFletch,need2loop

  1. #1
    Join Date
    Mar 2007
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    AutoFletch,need2loop

    Hi guys! Im pretty new to SRL-forums, and SCAR. At that note, I started this little auto fletcher about 5 hours ago. I want to make it loop, and I typed stuff in for that, but no matter how hard I try, I just cant get it to loop. I was using Varrok East bank so the bank booth was South of me. The place where the mouse goes in the bank is where i have my Yew logs sitting. They are on the third bank row from the top.

    I don't really know how to show you the script, maybe ill just post it here...?

    SCAR Code:
    //By
    //Redknight153
    program AutoFletcher;
    {.include SRL/SRL.scar}

    const
    Message1='27';


    procedure OpenMyBank;

    begin
    MoveMouseSmooth(268,215);
    Wait(500+random(100));
    ClickMouse(268+random(3),215+random(3),false); //opens bank options
    Wait(500+random(100));
    MoveMouseSmooth(276,261);
    Wait(500+random(100));
    ClickMouse(276+random(3),261+random(3),true); //opens bank quickly
    Wait(1000+random(1000));
    end;


    procedure ItemsIn;

    begin
    MoveMouseSmooth(622,230);
    Wait(500+random(100));
    ClickMouse(622+random(3),230+random(3),false); //opens yew (u) deposite options
    Wait(500+random(100));
    MoveMouseSmooth(616,303);
    Wait(500+random(100));
    ClickMouse(616+random(3),303+random(3),true); //banks all yew (u)
    Wait(500+random(100));
    end;


    procedure ItemsOut;

    begin
    MoveMouseSmooth(142,155);
    Wait(500+random(100));
    ClickMouse(142+random(3),155+random(3),false); //opens withdrawl yew log options
    Wait(500+random(100));
    MoveMouseSmooth(139,223);
    Wait(500+random(100));
    ClickMouse(139+random(3),223+random(3),true); //takes out 27 yew logs
    Wait(500+random(100));
    end;


    procedure CloseMyBank;

    begin
    MoveMouseSmooth(489,44);
    Wait(500+random(100));
    ClickMouse(489+random(3),44+random(3),true); //closes bank interface
    Wait(500+random(100));
    end;


    procedure Fletch;

    begin
    MoveMouseSmooth(575,227)
    Wait(500+random(50));
    ClickMouse(575+random(3),227+random(3),true); //use knife
    Wait(500+random(100));
    MoveMouseSmooth(622,235)
    Wait(500+random(100));
    ClickMouse(622+random(3),235+random(3),true); //with yew log
    Wait(500+random(100));
    MoveMouseSmooth(263,407)
    Wait(500+random(100));
    ClickMouse(263+random(3),407+random(3),false); //fletch options
    Wait(500+random(100));
    MoveMouseSmooth(263,478)
    Wait(500+random(100));
    ClickMouse(263+random(3),478+random(3),true); //fletch "X"
    Wait(500+random(100));
    end;


    procedure Fletch27;

    begin
    Wait(1000+random(100));
    TypeSend(Message1); //types 27 for fletch "x"
    end;


    procedure Loop;

    var
    a: Integer;

    begin
    a:= 0;
    repeat
    a:= a + 1;
    until(a >=3);
    end;


    procedure AutoFletcher;

    begin
    OpenMyBank; //opens bank
    ItemsIn; //deposites bows
    ItemsOut; //withdrawls logs
    CloseMyBank;//closes bank
    Fletch; //starts to fletch
    Fletch27; //types 27
    Loop; //loops program
    end;

    //Hope this really helps you out if you ever use it,
    //I know i will ;D
    //Only good unless you are at the computer or in an anti-random spot,
    //maybe some day it will get anti-random??

    begin
    AutoFletcher; //Fletch away :P
    end.

  2. #2
    Join Date
    Sep 2007
    Posts
    415
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    First off,
    SCAR Code:
    scar tags
    for easier reading, [scar] and finish it.

    SCAR Code:
    program AutoFletcher;
    {.include SRL/SRL.scar}

    const
    timestoloop = 5; //how many times you want the script to loop
    Message1='27';


    procedure OpenMyBank;

    begin
    MoveMouseSmooth(268,215);
    Wait(500+random(100));
    ClickMouse(268+random(3),215+random(3),false); //opens bank options
    Wait(500+random(100));
    MoveMouseSmooth(276,261);
    Wait(500+random(100));
    ClickMouse(276+random(3),261+random(3),true); //opens bank quickly
    Wait(1000+random(1000));
    end;


    procedure ItemsIn;

    begin
    MoveMouseSmooth(622,230);
    Wait(500+random(100));
    ClickMouse(622+random(3),230+random(3),false); //opens yew (u) deposite options
    Wait(500+random(100));
    MoveMouseSmooth(616,303);
    Wait(500+random(100));
    ClickMouse(616+random(3),303+random(3),true); //banks all yew (u)
    Wait(500+random(100));
    end;


    procedure ItemsOut;

    begin
    MoveMouseSmooth(142,155);
    Wait(500+random(100));
    ClickMouse(142+random(3),155+random(3),false); //opens withdrawl yew log options
    Wait(500+random(100));
    MoveMouseSmooth(139,223);
    Wait(500+random(100));
    ClickMouse(139+random(3),223+random(3),true); //takes out 27 yew logs
    Wait(500+random(100));
    end;


    procedure CloseMyBank;

    begin
    MoveMouseSmooth(489,44);
    Wait(500+random(100));
    ClickMouse(489+random(3),44+random(3),true); //closes bank interface
    Wait(500+random(100));
    end;


    procedure Fletch;

    begin
    MoveMouseSmooth(575,227)
    Wait(500+random(50));
    ClickMouse(575+random(3),227+random(3),true); //use knife
    Wait(500+random(100));
    MoveMouseSmooth(622,235)
    Wait(500+random(100));
    ClickMouse(622+random(3),235+random(3),true); //with yew log
    Wait(500+random(100));
    MoveMouseSmooth(263,407)
    Wait(500+random(100));
    ClickMouse(263+random(3),407+random(3),false); //fletch options
    Wait(500+random(100));
    MoveMouseSmooth(263,478)
    Wait(500+random(100));
    ClickMouse(263+random(3),478+random(3),true); //fletch "X"
    Wait(500+random(100));
    end;


    procedure Fletch27;

    begin
    Wait(1000+random(100));
    TypeSend(Message1); //types 27 for fletch "x"
    end;

    procedure AutoFletcher;
    begin
      repeat
        OpenMyBank; //opens bank
        ItemsIn; //deposites bows
        ItemsOut; //withdrawls logs
        CloseMyBank;//closes bank
        Fletch; //starts to fletch
        Fletch27; //types 27
        inc(a); //increases the var "a"
      until(a >= timestoloop);
    end;

    //Hope this really helps you out if you ever use it,
    //I know i will ;D
    //Only good unless you are at the computer or in an anti-random spot,
    //maybe some day it will get anti-random??

    begin
    AutoFletcher; //Fletch away :P
    end.

    no need for the loop procedure, all it did was increase a until a >= 3..which doesn't help anything. also, try using the SRL functions for mouse moving, unless you want a ban.
    Quote Originally Posted by That guy that wrote forefeathers
    <munklez>haha im too lazy, girls annoy me
    <munklez> they always wanna like, do stuff
    <munklez> and i just wanna program
    <munklez> and they always take all my money

  3. #3
    Join Date
    Mar 2007
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So it will repeat forever? Last night when i learned how to script i made an auto alcher.

    I had a= Integer; a:= 0; a:+ a +1; then i put a >= how ever many alchs
    Something like that...
    Does that seem right?

    What are SRL mouse moving funstions

    MoveMouseSmoothEx(123,123+random(0)1,2,3,1,2);
    ^Maybe this?^


  4. #4
    Join Date
    Sep 2007
    Posts
    415
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the srl functions are mouse and mmouse, first you must have downloaded SRL and all that jazz. look at the script again, i updated. now there is the timestoloop const that defines how many times the script will loop
    Quote Originally Posted by That guy that wrote forefeathers
    <munklez>haha im too lazy, girls annoy me
    <munklez> they always wanna like, do stuff
    <munklez> and i just wanna program
    <munklez> and they always take all my money

  5. #5
    Join Date
    Mar 2007
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright. Ill get that software ASAP. I redid the script like you did, and then ran it. This popped up in the DebugBox.
    "Line 101: [Error] (12744:5): Unknown identifier 'a' in script"

    For some reason when I press Ctrl+Alt+R or S to run/stop the script, it doesn't register that I pressed them. The only way i can run/stop scripts is if I click the run/stop buttons.

  6. #6
    Join Date
    Oct 2006
    Posts
    1,211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its because you never declared a as a variable. Add:

    SCAR Code:
    var
      a: integer;

    above the const line ok?

  7. #7
    Join Date
    Mar 2007
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Haha wow, were amazing! I was messing around with it and i figured that I would add that to see if it worked. Whaddya know, it did!

    Then you wrote that, perfect!

    where do i get mouse and mmouse like drizzt was talking about though?

    Whats up with my Ctrl+Alt+R/S not running/stopping the scripts?

  8. #8
    Join Date
    Mar 2007
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  9. #9
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Just use TerminateScript;

  10. #10
    Join Date
    Mar 2007
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  11. #11
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Then do
    SCAR Code:
    If IsFKeyDown(3) Then
      TerminateScript;


  12. #12
    Join Date
    Mar 2007
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK, so today I go to log in and fletch some of my bows, but I got the "Your account has been disabled." screen. I have been banned for 10 WHOLE days!
    Any way to make this script a lot less noticeable?
    I don't quite know where this would go wither.

    SCAR Code:
    If IsFKeyDown(3) Then
      TerminateScript;

    SCAR Code:
    //By
    //Redknight153
    program AutoFletcher;
    {.include SRL/SRL.scar}

    var
    a: Integer;

    const
     timestoloop = 25; //how many times the script will loop
     Message1='27';


    procedure OpenMyBank;

    begin
     Mouse(268,205, 3, 3, false); //opens bank options
     Wait(500+random(250));
      Mouse(270, 245, 3, 3, true); //opens bank quickly
      Wait(1000+random(750));
    end;


    procedure ItemsIn;

    begin
     Mouse(622, 230, 3, 3, false); //opens (u) bow deposite options
     Wait(500+random(250));
      Mouse(600, 302, 3, 3, true); //banks all (u) bows
      Wait(500+random(250));
    end;


    procedure ItemsOut;

    begin
     Mouse(142, 155, 3, 3, false); //opens withdrawl log options
     Wait(500+random(250));
      Mouse(139, 230, 3, 3, true); //takes out "All" logs
      Wait(500+random(250));
    end;


    procedure CloseMyBank;

    begin
     Mouse(489, 44, 3, 3, true); //closes bank interface
     Wait(500+random(250));
    end;


    procedure Fletch;

    begin
     Mouse(575, 227, 3, 3, true); //use knife...
     Wait(500+random(250));
      Mouse(622, 231, 3, 3, true); //...with log
      Wait(500+random(250));
       Mouse(263, 407, 3, 3, false); //fletching options
       Wait(500+random(250));
        Mouse(263, 478, 3, 3, true); //fletch "X"
        Wait(500+random(250));
    end;


    procedure Fletch27;

    begin
     Wait(1000+random(100));
     TypeSend(Message1); //types 27 for fletch "X" option
     Wait(50000+random(2500));
    end;

    procedure AutoFletcher;
    begin
     repeat
      OpenMyBank;    //opens bank
      ItemsIn;      //deposites bows
      ItemsOut;    //withdrawls logs
      CloseMyBank;//closes bank
      Fletch;    //starts to fletch
      Fletch27; //types 27
      inc(a);  //increases the var "a"
     until(a >= timestoloop);
    end;

    //Hope this really helps you out if you ever use it,
    //I know i will ;D
    //Only good unless you are at the computer or in an anti-random spot,
    //maybe some day it will get anti-random??

    begin
     SetupSRL; //enables use of SRL
     AutoFletcher; //Fletch away :P
    end.

  13. #13
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    i would suggest you have a look at includes/srl/srl/core/bank.scar

    you will find functions that would fit you well, such as OpenBankFast, CloseBank, Deposit and possibly Withdraw.

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  14. #14
    Join Date
    Mar 2007
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  15. #15
    Join Date
    Mar 2007
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  16. #16
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    this will find he bank and open it
    FindBank(TheBank: String): Boolean;

    possible banks:
    SCAR Code:
    'feb' (Falador East Bank)
    'fwb' (Falador West Bank)
    'veb' (Varrock East Bank)
    'vwb' (Varrock West Bank)
    'db'  (Draynor Bank)
    'akb' (Al-Kharid Bank)


    if your close to the bank booths this will find them and open the bank
    function OpenBankFast(Location: String): Boolean;

    possible locations:
    SCAR Code:
    'akb', 'al kharid', 'lb', 'lumbridge', 'veb', 'varrock east', 'vwb',
        'varrock west', 'feb', 'falador east', 'fwb', 'falador west', 'db', 'draynor',
        'eb', 'edgeville bank'


    This will deposit you items
    Procedure Deposit(SlotFrom, SlotTo: Integer; vType: Variant);
    Deposit(2, 28, True) will deposit items starting from inv spot 2, until inv spot 28 choosing option 'all'

    procedure Withdraw(col, row, Amount: Integer);

    this will withdraw a certain amount of items from the row and col specified


    good luck scripting

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  17. #17
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Also for Anti Ban, Check SRL for their antiban procedures, Or just use this simple one:

    SCAR Code:
    procedure AntiBan;
    begin
     If (not (Loggedin)) then
      Exit;
      case Random(57) of

        0,1,2: PickUpMouse;

        23,5,9: GameTab(1 + Random(11));

        56: Search;

        55: MMouse(Random(MSX2), Random(MSY2), 0, 0);

        19: begin
              HoverSkill('Mining',false);
              gametab(4);
              ChooseOption('Cancel');
              MMouse(Random(MSY1), Random(MSX1), 0, 0);
            end;

         10: begin
              GameTab(1 + Random(13));
              wait(1000+ random(600));
              gametab(4);
              ChooseOption('Cancel');
            end;

         34: begin
              HoverSkill('random',false);
              gametab(4);
             end;

         33: Begin
               Case Random(67)+1 of

                0,1,23,25,45,46: Typesend('...');

                2,22,42,52,62: Typesend('Yawn');

                3,5,9,19: Typesend('Hey');

                66,65,64,63: Typesend('Fishing lvls?');

                56,55,54,53,67: Typesend('l0l');
           end;
        end;
     end;
    end;


    Hope I Helped

  18. #18
    Join Date
    Mar 2007
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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
  •