Results 1 to 10 of 10

Thread: Help with Banking

  1. #1
    Join Date
    Apr 2012
    Location
    Land of the Rising Sun
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    77 Post(s)

    Default Help with Banking

    I'm trying make a procedure for banking iron and gems. However the script is only banking the iron and one gem, leaving the rest of the gems in the inventory (there are different kinds of gems, but the GemDTM has a 255 tolerance).

    Here's what I've got. I'm sure I must need some kind of repeat.... until function, but I don't really know how to use it


    Code:
    Procedure DepositOres;
       var
      x, y, IronOreDTM, i:Integer;
    
    begin
      IronOreDTM := DTMFromString('mwQAAAHic42RgYMhlYmAoAuIqIC4H4iwgjoPiJCDOAGIxRgYGLiAWAGJpIFYGYllGiDhIjBOITeXFGbQkhBgygi0Z9GVEGNICLRjCXQ0YrPQUGEy1ZBnsjZQZ+IH2EcKMRGA4AABEwgqU');
      if FindDTM(IronOreDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
      begin
        Mouse(x, y, 5, 5, false);
        WaitOption('All', 400);
        end;
      end;
    
    Procedure DepositGems;
     var
      x, y, GemsDTM, i:integer;
    
    begin
      GemsDTM := DTMFromString('mvQEAAHictc5BCoNADIXhOOBOLQhTFUFob9aKBUVEKa13cNUbt/9gFiIup4EvgUcCsSIyGJERPVo0uOO2UeOBzqz7E154q1mny57IApEEEWJ1QoozClS44Lrj8hI5rN6428+y8K3x6ksPPQv+4LB+nDsOZw==');
      if FindDtm(GemsDtm, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Mouse(x, y, 5, 5, false);
          WaitOption('Deposit', 1000);
        end;
      end;

  2. #2
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by pure_thief View Post
    I'm trying make a procedure for banking iron and gems. However the script is only banking the iron and one gem, leaving the rest of the gems in the inventory (there are different kinds of gems, but the GemDTM has a 255 tolerance).

    Here's what I've got. I'm sure I must need some kind of repeat.... until function, but I don't really know how to use it

    Fixed code

    Simba Code:
    Procedure DepositOres;
       var
      x, y, IronOreDTM, i:Integer;

    begin
      IronOreDTM := DTMFromString('mwQAAAHic42RgYMhlYmAoAuIqIC4H4iwgjoPiJCDOAGIxRgYGLiAWAGJpIFYGYllGiDhIjBOITeXFGbQkhBgygi0Z9GVEGNICLRjCXQ0YrPQUGEy1ZBnsjZQZ+IH2EcKMRGA4AABEwgqU');
      if FindDTM(IronOreDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
      begin
        Mouse(x, y, 5, 5, false);
        WaitOption('All', 400);
        end;
      end;

    Procedure DepositGems;
     var
      x, y, GemsDTM, i:integer;

    begin
      GemsDTM := DTMFromString('mvQEAAHictc5BCoNADIXhOOBOLQhTFUFob9aKBUVEKa13cNUbt/9gFiIup4EvgUcCsSIyGJERPVo0uOO2UeOBzqz7E154q1mny57IApEEEWJ1QoozClS44Lrj8hI5rN6428+y8K3x6ksPPQv+4LB+nDsOZw==');
      if FindDtm(GemsDtm, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Mouse(x, y, 5, 5, false);
          WaitOption('All', 1000); // Changed this to 'All' As well, now it chooses the all option for you
        end;
      end;

    You can also use a function like this

    Simba Code:
    procedure DepositLoot;
    begin
      if BankScreen then
        Deposit(1, 23, true); // Deposits the slots 1-23 using the all feature!
    end;

    However the use of DTMs is good practice for more complex situations and I like it!

    Also for a DTM making, read this tut

    This should deposit all the gems now(:

  3. #3
    Join Date
    Apr 2012
    Location
    Land of the Rising Sun
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    77 Post(s)

    Default

    Awesome, thanks! Such a fast reply too . I'll try it out tomorrow and see how it goes.

  4. #4
    Join Date
    May 2007
    Location
    England
    Posts
    4,141
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    If there's nothing else in the inventory other than what you want to deposit, there is also the DepositAll function which uses the button on the bank screen to empty your inventory.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  5. #5
    Join Date
    Apr 2012
    Location
    Land of the Rising Sun
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    77 Post(s)

    Default

    My noob account I'm testing the script on can't wield the rune pick, so I didn't want him to bank it
    Now I've just got to sort out the walking for this script

  6. #6
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by King View Post
    Fixed code

    Simba Code:
    Procedure DepositGems;
     var
      x, y, GemsDTM, i:integer;

    begin
      GemsDTM := DTMFromString('mvQEAAHictc5BCoNADIXhOOBOLQhTFUFob9aKBUVEKa13cNUbt/9gFiIup4EvgUcCsSIyGJERPVo0uOO2UeOBzqz7E154q1mny57IApEEEWJ1QoozClS44Lrj8hI5rN6428+y8K3x6ksPPQv+4LB+nDsOZw==');

      if FindDtm(GemsDtm, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Mouse(x, y, 5, 5, false);
          WaitOption('All', 1000); // Changed this to 'All' As well, now it chooses the all option for you
          Wait(500 + Random(250));
        end;
      end;

    However the use of DTMs is good practice for more complex situations and I like it!

    This should deposit all the gems now(:
    Only deposits 1 kind

    Simba Code:
    Procedure DepositGems;
    *var
    * x, y, GemsDTM, i:integer;




    begin
    * GemsDTM := DTMFromString('mvQEAAHictc5BCoNADIXhOOBOLQhTFUFob9aKBUVEKa13cNUbt/9gFiIup4EvgUcCsSIyGJERPVo0uOO2UeOBzqz7E154q1mny57IApEEEWJ1QoozClS44Lrj8hI5rN6428+y8K3x6ksPPQv+4LB+nDsOZw==');
    Marktime(count)
    repeat
    if FindDtm(GemsDtm, x, y, MIX1, MIY1, MIX2, MIY2) then
     begin
       Mouse(x, y, 5, 5, false);
       WaitOption('All', 1000); // Changed this to 'All' As well, now it chooses the all option for you
       end;
       end;
    If TimeFromMark(count) > 10000 then Break; // To prevent a possible infinite loop, just in case.
    until( not FindDtm(GemsDtm, x, y, MIX1, MIY1, MIX2, MIY2))

    OP:
    To simplify Use Deposit(2, 28, True); (Runepick on inventory slot 1)
    Last edited by Sjoe; 04-22-2013 at 10:14 AM.

    Creds to DannyRS for this wonderful sig!

  7. #7
    Join Date
    Apr 2012
    Location
    Land of the Rising Sun
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    77 Post(s)

    Default

    Quote Originally Posted by Sjoe View Post
    Only deposits 1 kind

    Simba Code:
    Procedure DepositGems;
    *var
    * x, y, GemsDTM, i:integer;




    begin
    * GemsDTM := DTMFromString('mvQEAAHictc5BCoNADIXhOOBOLQhTFUFob9aKBUVEKa13cNUbt/9gFiIup4EvgUcCsSIyGJERPVo0uOO2UeOBzqz7E154q1mny57IApEEEWJ1QoozClS44Lrj8hI5rN6428+y8K3x6ksPPQv+4LB+nDsOZw==');
    Marktime(count)
    repeat
    if FindDtm(GemsDtm, x, y, MIX1, MIY1, MIX2, MIY2) then
     begin
       Mouse(x, y, 5, 5, false);
       WaitOption('All', 1000); // Changed this to 'All' As well, now it chooses the all option for you
       end;
       end;
    If TimeFromMark(count) > 10000 then Break; // To prevent a possible infinite loop, just in case.
    until( not FindDtm(GemsDtm, x, y, MIX1, MIY1, MIX2, MIY2))

    OP:
    To simplify Use Deposit(2, 28, True); (Runepick on inventory slot 1)
    Awesome, thanks! Yeah I tried that first code and it only banked one diamond out of all the gems then finished. I resorted to that Deposit(2, 28, True) code. Thanks for the fix, I'm sure it'll be useful!

  8. #8
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Sjoe View Post
    Only deposits 1 kind

    Simba Code:
    Procedure DepositGems;
    *var
    * x, y, GemsDTM, i:integer;




    begin
    * GemsDTM := DTMFromString('mvQEAAHictc5BCoNADIXhOOBOLQhTFUFob9aKBUVEKa13cNUbt/9gFiIup4EvgUcCsSIyGJERPVo0uOO2UeOBzqz7E154q1mny57IApEEEWJ1QoozClS44Lrj8hI5rN6428+y8K3x6ksPPQv+4LB+nDsOZw==');
    Marktime(count)
    repeat
    if FindDtm(GemsDtm, x, y, MIX1, MIY1, MIX2, MIY2) then
     begin
       Mouse(x, y, 5, 5, false);
       WaitOption('All', 1000); // Changed this to 'All' As well, now it chooses the all option for you
       end;
       end;
    If TimeFromMark(count) > 10000 then Break; // To prevent a possible infinite loop, just in case.
    until( not FindDtm(GemsDtm, x, y, MIX1, MIY1, MIX2, MIY2))

    OP:
    To simplify Use Deposit(2, 28, True); (Runepick on inventory slot 1)
    Ohhhh, he wants multiple types of gems >.< Didn't read right, thought me meant all of one gem.

  9. #9
    Join Date
    Apr 2012
    Location
    Land of the Rising Sun
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    77 Post(s)

    Default

    I noticed too that when you only have one gem in your inventory, the deposit all option doesn't come up

  10. #10
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by pure_thief View Post
    I noticed too that when you only have one gem in your inventory, the deposit all option doesn't come up
    Simpler and better to use deposit 1- blah blah lol

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
  •