Results 1 to 6 of 6

Thread: bankscreen broken

  1. #1
    Join Date
    Dec 2007
    Posts
    174
    Mentioned
    0 Post(s)
    Quoted
    43 Post(s)

    Default bankscreen broken

    am I allowed to edit the bankscreen function? and if not will it be updated soon? or will I need to make my own for now?
    edit:
    found 2 fixes. the easy option is to open the show settings tab in your bankscreen and disable tabs. the second is to make the box bigger to find the text in the bankscreen function. I added this to my script along with the official bankscreen so it searches for either one and seems to be working.
    function BankScreen2: Boolean;
    begin
    result := findcolortolerance(x,y,2003443,182,16,336,32,30);
    end;
    Last edited by westkevin12; 05-11-2014 at 04:18 AM.

  2. #2
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    1,199
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    Quote Originally Posted by westkevin12 View Post
    am I allowed to edit the bankscreen function? and if not will it be updated soon? or will I need to make my own for now?
    edit:
    found 2 fixes. the easy option is to open the show settings tab in your bankscreen and disable tabs. the second is to make the box bigger to find the text in the bankscreen function. I added this to my script along with the official bankscreen so it searches for either one and seems to be working.
    function BankScreen2: Boolean;
    begin
    result := findcolortolerance(x,y,2003443,182,16,336,32,30);
    end;
    Simba is fully open source so that you are free to change it and any functions within it!

  3. #3
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Taken (and converted) from AeroLib:
    Simba Code:
    function isBankOpen(): boolean;
    begin
      result := findTextTPA(2070783, 5, toBox(125,304,170,327), 'Insert', 'SmallChars07', -1);
    end;

    Although my findTextTPA functions require a TBox parameter rather than X1,Y1,X2,Y2 but I don't recall where, in SRL-OSR's function, those parameters are located so I'll let you convert it. This will work in both standard and tabbed bank modes.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  4. #4
    Join Date
    Dec 2007
    Posts
    174
    Mentioned
    0 Post(s)
    Quoted
    43 Post(s)

  5. #5
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    There is a bit more than bankscreen which has wrong co-ords.. The bankslot functons also need adjusting and finally the 2 buttons at the bottom (depositall etc.).. Here's a very quick fix which will restore basic banking functions:
    Simba Code:
    function BankScreen: Boolean;
    begin
      result := findTextTPA(2070783, 5, 115, 287, 155, 312, 'mode', 'SmallChars07', nothing);
    end;  

    function BankIndexToMSPoint(Index: Integer): TPoint;
    begin
      if (not InRange(Index, 1, 48)) then
      begin
        srl_Warn('BankIndexToMSPoint', 'Specified index is not a visible bank slot.  Returning first slot''s bank point.', warn_AllVersions);
        Result := Point(73, 85);
        Exit;
      end;
      Index := Index - 1;
      Result := Point(73 + ((Index mod 8) * 47), 85 + (38 * (Index div 8)));
    end;

    procedure QuickDeposit(Which: String);
    begin
      if BankScreen then
      begin
        case lowercase(Which) of
          'inventory','inv':          MouseBox(431, 304, 458, 327, mouse_left);
          'equipment','worn','equip': MouseBox(467, 300, 491, 326, mouse_left);
          else
            SRL_Warn('QuickDeposit', 'Invalid deposit method ', WARN_ALLVERSIONS);
        end;
        Wait(200 + Random(300));
      end;
    end;
    Alternatively, you could just replace bank.simba with this: http://pastebin.com/jtjRCreA
    Last edited by Krazy_Meerkat; 05-15-2014 at 08:14 AM.

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

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
  •