Results 1 to 12 of 12

Thread: Is this a bug?

  1. #1
    Join Date
    Jul 2014
    Posts
    204
    Mentioned
    4 Post(s)
    Quoted
    125 Post(s)

    Default Is this a bug?

    Everytime I let my bot run overnight I find It back like this:


    I tried pausing the script walking away, but it just teleports back to the bank ( it's supposed to do that ) and stand there moving over the boxes.
    stopping the script and starting it again fixes the problem.
    here's the code it get's stuck at:

    Simba Code:
    procedure Bank();
    var
      x, y, i: integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      bankTimer: TTimeMarker;
      InBank : Tbox;
    begin
      banktimer.start();
      if (bankTimer.getTime() > 120000) and not bankScreen.isOpen() then TeleportToBank();
      mainscreen.findObject(x, y, 7771300, 11, ['ank'], MOUSE_LEFT);
     if (not bankScreen.isOpen(8000)) then
        begin
          if(tabBackpack.count() = 28) then
          begin
            Bank;
          end;
        end;
        bankScreen.deposit([2],[-1]);
        bankScreen.close;
        tabBackpack.waitWhileLocked;
        exit;
      Inc(bankfailcount);
      if (bankfailcount < 4) then
      begin
        Bank;
      end;
      end;

  2. #2
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

    Default

    Simba Code:
    procedure Bank();
    var
      x, y, i: integer;
      TPA: TPointArray; //Unused variable
      ATPA: T2DPointArray; //Unused variable
      bankTimer: TTimeMarker;
      InBank: Tbox; //Unused variable
    begin
      banktimer.start();
      if (bankTimer.getTime() > 120000) and not bankScreen.isOpen() then
        TeleportToBank();
      mainscreen.findObject(x, y, 7771300, 11, ['ank'], MOUSE_LEFT);
      if (not bankScreen.isOpen(8000)) then
      begin
        if (tabBackpack.count() = 28) then
        begin
          Bank;
        end;
      end;
      bankScreen.deposit([2], [ - 1]);
      bankScreen.close;
      tabBackpack.waitWhileLocked;
      exit;
      Inc(bankfailcount);
      if (bankfailcount < 4) then
      begin
        Bank;
      end;
    end;

    If mainscreen.findObject fails, it will then wait 8 seconds to confirm whether bankscreen.isOpen. Since that will also fail, it will exit the function without increasing fail count because this code...
    Simba Code:
    Inc(bankfailcount);
      if (bankfailcount < 4) then
      begin
        Bank;
      end;
      end;
    ...will never occur since you have exit; before it. So whatever failsafe you intended with that failcount will never happen.

    It also seems like your colors are a bit inaccurate if the color search for the bank results in those boxes all over the place.

    Calling a function within itself can be confusing unless you truly want to start the entire section of code again. Try using things like attempts instead and having everything laid out clearly in the single function so you can better see the order of events.

    Simba Code:
    var
      attempts: integer;

    while attempts < 5 do
    begin
      doStuff;
      if weFailed then
      begin
        inc(attempts);
        writeln('We failed!');
        continue;
      end;
    end;
    Last edited by Clarity; 11-18-2014 at 07:39 AM.

  3. #3
    Join Date
    Jun 2014
    Location
    Lithuania
    Posts
    475
    Mentioned
    27 Post(s)
    Quoted
    200 Post(s)

    Default

    Also if treasure hunter chest is on the screen at certain locations bankscreen.isopen() fails.

  4. #4
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

  5. #5
    Join Date
    Jul 2014
    Posts
    204
    Mentioned
    4 Post(s)
    Quoted
    125 Post(s)

    Default

    got it working
    Let's run it for a few hours. The thing causing the problem was:
    It tried "bankScreen.deposit([2],[-1]);" before the bankscreen was open, adding a pause fixed that ( well I hope it did )

  6. #6
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

  7. #7
    Join Date
    Jul 2014
    Posts
    204
    Mentioned
    4 Post(s)
    Quoted
    125 Post(s)

    Default

    Quote Originally Posted by Ashaman88 View Post
    Does bankscreen.open(NPCGREY not work?
    Never liked bankscreen.open(NPC_TYPE) cus sometimes ( for me ) it didn't work.
    Seems to work fine now on Blue bankers in varock west bank.
    Might give it a try.

    edit: doesn't work
    picture:
    http://i.imgur.com/Qd7V87w.png

  8. #8
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

    Default

    Quote Originally Posted by lanadekat View Post
    Never liked bankscreen.open(NPC_TYPE) cus sometimes ( for me ) it didn't work.
    Seems to work fine now on Blue bankers in varock west bank.
    Might give it a try.

    edit: doesn't work
    picture:
    http://i.imgur.com/Qd7V87w.png
    Might want to hide your RSN.

  9. #9
    Join Date
    Jul 2014
    Posts
    204
    Mentioned
    4 Post(s)
    Quoted
    125 Post(s)

    Default

    Quote Originally Posted by Clarity View Post
    Might want to hide your RSN.
    oops
    I'm just gonna leave it, that isn't any prove I'm botting. That could be a normal runescape and someone photoshoped the overlay and the smart window. That pricture is no prove I'm botting.
    And if they ban me, I don't care about the account.

  10. #10
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

    Default

    Quote Originally Posted by lanadekat View Post
    oops
    I'm just gonna leave it, that isn't any prove I'm botting. That could be a normal runescape and someone photoshoped the overlay and the smart window. That pricture is no prove I'm botting.
    And if they ban me, I don't care about the account.
    I mean, I just think it's generally a good idea not to broadcast one's RSNs, and they are pretty easy to edit out. But if you don't care, you don't care

  11. #11
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Quote Originally Posted by lanadekat View Post
    Never liked bankscreen.open(NPC_TYPE) cus sometimes ( for me ) it didn't work.
    Seems to work fine now on Blue bankers in varock west bank.
    Might give it a try.

    edit: doesn't work
    ]
    Man that stinks. For banks that don't work you should make a bug report (see big bug button at the top of the forums). I don't usually use very many banks on a regular basis and I don't regularly test them all so we need as many bug reporters as we can get!

  12. #12
    Join Date
    Jul 2014
    Posts
    204
    Mentioned
    4 Post(s)
    Quoted
    125 Post(s)

    Default

    Quote Originally Posted by Ashaman88 View Post
    Man that stinks. For banks that don't work you should make a bug report (see big bug button at the top of the forums). I don't usually use very many banks on a regular basis and I don't regularly test them all so we need as many bug reporters as we can get!
    I'll try running your herblore script on that bank, It could be a problem with my script.
    and I'll create a bug report if it doesn't work

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
  •