Results 1 to 21 of 21

Thread: First banker

  1. #1
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default First banker

    Here's my first script!! I'm proud of it, so please tell me if I horribly screwed the SRL, if what I used doesn't exist, or if I'm brilliant for a newb, but please don't flame... Lol.

    Code:
    program Bank;
    {.include SRL/SRL.scar}
    
    var
    x,y: integer
    
    const
    Gtg = 'Brb, bank.';
    
    procedure Brb;
    begin
      SendKeys(Gtg +chr(13));
    end;
    
    procedure Bank;
    begin
      SetupSRL;
      if FindSymbol(x, y, 'bank') then
      MMouse(x, y, 10, 10);
      Wait(1000+random(50));
      Mouse(x, y, 0, 0, true);
      Flag;
      OpenBankFast('feb');
      DepositAll;
      Wait(1200+random(50));
      CloseBank;
    end.
    As of right now, all it can bank in is the Falador East Bank, due to lack of other codes.

    If I did something extremely unintelligent, then let me know, and refer all major SRL screw-ups to waflight of the freddy1990.com forums, because I used his tut to make this. Link below.

    http://freddy1990.com/forums/index.p...18611#msg18611

  2. #2
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice, but you CAN use all banks(just change feb to veb if you want Varrock East Bank,etc.).
    When you wait 10 days and get 8 more posts(no spam) then you will get acces to more tuts, scripts, etc.
    As far as I can say, the script is very basic but a good start...(you might wanne take a look in the include part of your scar folder...

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    You have done a good job! I remember making scripts like that too a long time ago. It was a kick to discover it actually worked! Before you know it you'll be writing a 1000 line script. Keep it up!
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  4. #4
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Thanks!

    WT-Fakawi, you don't know how much it means to me that you said that.
    Thanks a lot. If anyone really wants to use the script, be my guest. I'll also keep in mind to make it usable with all banks, although I'm not sure what string to enter to let SCAR know.

    I have another question, and decided not to create another topic for it:
    I know it exists, so what is the SRL for finding if a key is pressed?
    I think it's IsKeyDown('x') or something like that...
    Last edited by zeeky111; 03-28-2009 at 04:52 PM. Reason: 2nd question

  5. #5
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by zeeky111 View Post
    WT-Fakawi, you don't know how much it means to me that you said that.
    Thanks a lot. If anyone really wants to use the script, be my guest. I'll also keep in mind to make it usable with all banks, although I'm not sure what string to enter to let SCAR know.

    I have another question, and decided not to create another topic for it:
    I know it exists, so what is the SRL for finding if a key is pressed?
    I think it's IsKeyDown('x') or something like that...
    I don't really know about the key question but I think you're right
    For youre bank questio you could make a const like this:
    const
    WhichBank : 'veb';
    List of banks:
    feb = Falador east bank fwb = Falador west bank
    veb = Varrock east bank vwb = Varrock west bank
    akb = al kharid bank db = draynor bank
    eb = edgeville bank
    and then you could use in script somewhere:
    OpenBankFast(WhichBank);
    If you want more help, you can allways visit the IRC channel or add me on MSN: Pm me
    Last edited by impiwimpi; 04-28-2009 at 02:39 AM.

  6. #6
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Thumbs up

    Thanks again! That helped too.

    Here's the updated so far:

    Code:
    program Bank;
    {.include SRL/SRL.scar}
    
    var
    x,y: integer
    
    const
    Gtg = 'Brb, bank.';
    WhichBank = 'db';
    
    procedure Brb;
    begin
      SetupSRL;
      SendKeys(Gtg);
    end;
    
    procedure Bank;
    begin
      if FindSymbol(x, y, 'bank') then
      MMouse(x, y, 10, 10);
      Wait(1000+random(50));
      Mouse(x, y, 0, 0, true);
      Flag;
      OpenBankFast(WhichBank);
      DepositAll;
      Wait(1200+random(50));
      CloseBank;
    end.
    EDIT: Ack! I can't download the includes, thus I can't test the script. Any solutions? I went File > Download Includes, and it came up in the debug screen, but a dialog box came up and said "Error while obtaining includes list!"
    Last edited by zeeky111; 03-28-2009 at 05:54 PM. Reason: "EDIT"

  7. #7
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by impiwimpi View Post
    I don't really know about the key question but I think you're right
    For youre bank questio you could make a const like this:

    List of banks:
    feb = Falador east bank fwb = Falador west bank
    veb = Varrock east bank vwb = Varrock west bank
    akb = al kharid bank db = draynor bank
    eb = edgeville bank
    and then you could use in script somewhere:

    If you want more help, you can allways visit the IRC channel or add me on MSN: lars_hulstaert@hotmail.com
    btw, that should be

    const
    WhichBank = 'feb';
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  8. #8
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    btw, that should be

    const
    WhichBank = 'feb';
    No, I wanted Draynor Bank.

  9. #9
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    draynor is db so just change WhichBank to 'db'

    EDIT: I was first
    Last edited by impiwimpi; 03-28-2009 at 06:05 PM.

  10. #10
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Then

    Const
    WhichBank = 'db';
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  11. #11
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah. I changed the const to WhichBank = 'db'.

    Btw, can anyone help me? My computer won't let me download includes from SCAR, so I can't test it. I'm not asking you to test it, but is there any way for me to get the includes a different way?
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

  12. #12
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did you tryed it with this guide : http://www.villavu.com/forum/showthread.php?t=17890

  13. #13
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default w00t!

    Works, thank you!
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

  14. #14
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Exclamation

    One more problem: (sorry for 2x post)

    I get this:
    Code:
    Line 2: [Error] (2:24): 'BEGIN' expected in script C:\Program Files\SCAR 3.15\Scripts\RS Scripts\Bank(proto).scar
    When I compile this:
    Code:
    program Bank;
    {.include SRL/SRL.scar};
    
    var
    x,y: integer;
    
    const
    WhichBank = 'db';
    
    begin
      if FindSymbol(x, y, 'bank') then
      MMouse(x, y, 10, 10);
      Wait(1000+random(50));
      Mouse(x, y, 0, 0, true);
      Flag;
      OpenBankFast(WhichBank);
      DepositAll;
      Wait(1200+random(50));
      CloseBank;
    end.
    I took out the procedure because I only wanted it to bank. It really never worked, though it seems like it will eventually...
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

  15. #15
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Fix:

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

    var
    x,y: integer;

    const
    WhichBank = 'db';

    begin
      if FindSymbol(x, y, 'bank') then
      MMouse(x, y, 10, 10);
      Wait(1000+random(50));
      Mouse(x, y, 0, 0, true);
      Flag;
      OpenBankFast(WhichBank);
      DepositAll;
      Wait(1200+random(50));
      CloseBank;
    end.

    For the script in the beginning, don't use SendKeys, it will get you banned, use TypeSend which also clicks enter for you.

    GJ on your first basic script.

    Hint: Use [SCAR] tags.
    Last edited by Smarter Child; 03-28-2009 at 09:35 PM.

  16. #16
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay, I tweaked it, and it doesn't work, still...
    SCAR Code:
    program Bank;
    {.include SRL/SRL.scar}

    var
      x,y: integer;
     
    const
      WhichBank = 'db';

    procedure Bank;
    begin
      if FindSymbol(x, y, 'Bank') then
        begin
          Mousespeed := 7;
          MMouse(x, y, 10, 10);
          Wait(1000+random(50));
          Mouse(x, y, 0, 0, true);
          Flag;
          OpenBankFast(WhichBank);
          DepositAll;
          Wait(1200+random(50));
          CloseBank;
        end else;
    end;

    begin
      ClearDebug;
      WriteLn('Debug cleared.');
      SetupSrl;
      WriteLn('SRL set up.');
      Wait(5000);
      WriteLn('Banking initiated.');
      Bank;
      WriteLn('All items deposited.');
      WriteLn('Shutting down.');
      Wait(1000);
      WriteLn('  ________');
      WriteLn(' /____   /');
      WriteLn(' /   ___/ ');
      WriteLn(' \______\ ');
      WriteLn('          ');
      WriteLn('A Zeeky111 Proggy');
    end.
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

  17. #17
    Join Date
    Apr 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    good one there not sure i seen this before but im new so idk

  18. #18
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    With your tweaked version, when compiled i get this:

    Successfully compiled (2624 ms)

    Maybe, your not at latest SRL?

  19. #19
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Talking K.

    Rofl, that may be it.
    I'll try... And I'll edit this post with future concerns about this script in particular.
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

  20. #20
    Join Date
    Apr 2009
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice, u can bank all tho

  21. #21
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by royalmarket View Post
    nice, u can bank all tho
    Would you or anyone else care to elaborate?
    Is BankAll or DepositAll a function I'm not seeing?


    EDIT: I tried tweaking it yet a bit more by adding a failsafe.
    Now, the script compiles beautifully, but goes directly to the failsafe.
    Not sure if it's an error not visible to the "compiler" or what, so here's the script:
    SCAR Code:
    program Bank;
    {.include SRL/SRL.scar}

    var
      x,y: integer;

    const
      WhichBank = 'vwb';
     
    procedure Idle;
    begin
      while not IsKeyDown(chr(13)) do
        Wait(10);
    end;

    procedure Bank;
    begin
      if FindSymbol(x, y, 'Bank') then
        begin
          Mousespeed := 7;
          MMouse(x, y, 10, 10);
          Wait(1000+random(50));
          Mouse(x, y, 0, 0, true);
          Flag;
          OpenBankFast(WhichBank);
          DepositAll;
          Wait(1200+random(50));
          CloseBank;
        end else
          Begin
            WriteLn('Failsafe initiated. Error encountered.');
            TerminateScript;
          end;
    end;

    begin
      ClearDebug;
      WriteLn('Debug cleared.');
      SetupSrl;
      WriteLn('SRL set up.');
      WriteLn('Waiting. Press Enter to continue.');
      Idle;
      Wait(5000);
      WriteLn('Banking initiated.');
      Bank;
      WriteLn('All items deposited.');
      WriteLn('Shutting down.');
      Wait(1000);
      WriteLn('  ________');
      WriteLn(' /____   /');
      WriteLn(' /   ___/ ');
      WriteLn(' \______\ ');
      WriteLn('          ');
      WriteLn('A Zeeky111 Proggy');
    end.
    Last edited by zeeky111; 04-07-2009 at 02:27 AM. Reason: EDIT
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

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
  •