Results 1 to 4 of 4

Thread: Banking (SRL_ResetNavBar;)

  1. #1
    Join Date
    Nov 2011
    Location
    United states
    Posts
    516
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default Banking (SRL_ResetNavBar;)

    Umm well i was just messing around with an old script I had and I noticed that it would no longer bank and I found that if I changed the loggedin function I would work....

    Here is my banking function:
    Simba Code:
    procedure Bank;
    var
      FailSafe, SuperFailSafe : Integer;
      BankPath : TPointArray;
    begin
      FailSafe := 0;
      repeat
        FindNormalRandoms;
        MakeCompass('N');
        SetAngle(SRL_ANGLE_HIGH);
        OpenBankNPC;
        Inc(FailSafe);
        if (FailSafe > 5) and not(BankScreen) and not(PinScreen) then
        begin
          Writeln('Walking back to bank....');
          WalkToBank;
        end;
        if (FailSafe > 10) and not(BankScreen) and not(PinScreen) then
        begin
          Writeln('Bank tele safe.');
          LoadStone;
          WalkToBank;
          FailSafe := 0;
          {Mouse(664, 81, RandomRange(-2, 2), RandomRange(-2, 2), true); }
        end;
        FindNormalRandoms;
      until BankScreen or PinScreen; //or not(LoggedIn);
      if PinScreen then
      begin
        repeat
          InPin(Players[0].Pin);
        until BankScreen; //or not(LoggedIn);
      end;
      if BankScreen then
      begin
        writeln('in');
        Wait(RandomRange(200, 300));
        InvMouse((Random(15) + 2), 0);
        //Mouse(700, 315, 3, 3, Mouse_Right);
        WaitOptionMulti(['ll', 'All'], 300);
        Wait(RandomRange(200, 300));
        CloseBank;
        //Mouse(490, 60, RandomRange(-3, 3), RandomRange(-3, 3), Mouse_Left);
        Wait(RandomRange(500, 700));
      end;

    end;

    and here is what I changed in simba players to make it bank:
    Simba Code:
    function LoggedIn: Boolean;
    begin
      //White text on Report Abuse Button
      //SRL_ResetNavBar;
      Result := (GetColor(472, 490) = 16777215);
    end;
    line 137

    What happens is when i opens the bank it thinks you are not logged in because if the not(loggedin) are uncommented they trigger.... When i use my other scripts that I have it banks fine.... which is really odd.... this used to work.... I am banking at edgeville bank, it works fine without the reset of the nav bar so im not sure if this is a bug so just wanted to tell everyone before a million posts are put up with thisproblem... Any ideas?

    ~Getdropped

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

    Default

    I had this problem in my scripts, but I'm not sure what causes it. Instead of taking the time to do that I wrote a waitloggedin function - Pretty much just waits to see if it's loggedin for however long you want. Since putting that in nobody has had that problem with my scripts. You can see it in any of my scripts

  3. #3
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Is there anything that could be covering up your NAV BAR at the top? Specifically the 's' of the Forums (used to be the 'H' of Home if you haven't update your SRL).
    You could debug the error by adding this to the end of LoggedIn:
    Simba Code:
    if not Result then
    begin
      writeln('FoundBar: ' + ToStr(FoundBar));
      writeln('Color: ' + ToStr(GetColor(472, 490) = 16777215));
    end;
    Then you can find out which part went wrong.

  4. #4
    Join Date
    Nov 2011
    Location
    United states
    Posts
    516
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    Is there anything that could be covering up your NAV BAR at the top? Specifically the 's' of the Forums (used to be the 'H' of Home if you haven't update your SRL).
    You could debug the error by adding this to the end of LoggedIn:
    Simba Code:
    if not Result then
    begin
      writeln('FoundBar: ' + ToStr(FoundBar));
      writeln('Color: ' + ToStr(GetColor(472, 490) = 16777215));
    end;
    Then you can find out which part went wrong.
    All my extensions are still up to date.... And all the points arnt covered at the time when it checks.... the R in "Report" and the H in "Home".... I just changed the code to:
    Simba Code:
    (*
    LoggedIn
    ~~~~~~~~

    .. code-block:: pascal

        function LoggedIn: Boolean;

    Returns True if Logged in.

    .. note::

        by WT-Fakawi, Getdropped

    Example:

    .. code-block:: pascal

    *)

    function LoggedIn: Boolean;
    begin
      //White text on Report Abuse Button
      if (GetColor(472, 490) = 16777215) then
      begin
        Result := true;
        Exit;//no need to do anything to the navbar
      end;
      SRL_ResetNavBar;
      Result := (GetColor(472, 490) = 16777215);
    end;

    because it is rather pointless to check for the nav bar when you already found the report button.... it would be more efficient

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
  •