Results 1 to 4 of 4

Thread: Repeat procedure?

  1. #1
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Question Repeat procedure?

    Im working on a failsafe for my banking procedure in a script, and I want the script to try banking again if it cant find the uptext DTM, How do I do that? This is what I have so far.

    Simba Code:
    Procedure Bank;
    var
      BankDTM:integer;
    begin
      BankDTM := DTMFromString('mbQAAAHicY2VgYPABYksgjgLiRCBWBmJHIHYBYmcobQ/EktePM0jdOA6mQVj4ynEGbIARCwYDAMlQC0U=');
      Writeln('Time To Bank');
      wait(randomrange(200, 300));
      MMouse(259, 170, 4, 4);
      wait(randomrange(200, 400));
      if FindDTM(BankDTM, x, y, 1, 1, 1000, 1000) then
      begin
        Clickmouse2(1);
        wait(randomrange(1500, 2000));
        Mouse(583, 277, 2, 2, Mouse_right);
        Chooseoption('ll')
        wait(randomrange(400, 500));
        Mouse(102, 159, 2, 2, Mouse_right);
        wait(randomrange(300, 400));
        Chooseoption('ll');
        wait(randomrange(200, 400));
        Mouse(490, 84, 2, 2, 1);
        wait(randomrange(400, 600));
        Fletched := Fletched + 28
      end else
        begin
          Fails := Fails + 1
          Retry Banking procedure???
        end;

    end;
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  2. #2
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Simba Code:
    begin
      Fails := Fails + 1
      //Retry Banking procedure???
      if Fails > X then
      begin
        Bank;
        Fails := 0;
        exit;
      end;
    end;

  3. #3
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks! Ill try it now.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  4. #4
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Currently using this with a FindChest function for finding a TPA of the rim of the SW bank chest
    Simba Code:
    procedure POpenBank;
    var
      Counter: integer;
    begin
      Status('POpenBank');
      SetAngle(SRL_ANGLE_HIGH);
      repeat
      Inc(Counter);
      FFlag(0);
      if FindChest or (not(LoggedIn)) or FindNormalRandoms or PinScreen or BankScreen then
        Break;
      until(Counter > 5);
    end;

    Then I have my WaitFuncs for InPin and BankScreen at the beginning of my next procedure. Not working as well as my banking pre-jagex-screwing-us-all-around, but working none the less.

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
  •