Issue: Action bar bounds not setting correctly in the wilderness

  1. issueid=450 07-30-2015 02:42 PM
    SRL Member
    Action bar bounds not setting correctly in the wilderness
    Similar colors between the floor in the wilderness and the border colors of the action bar im assuming

    when in the wilderness TRSActionBar.__find will a lot of times return false, or sometimes return true, but have incorrect bounds. I verified this by debugging actionbar.__slots. This is then causing many things within SRL to stop functioning, including many of the mainscreen functions.

    It used to work fine before, it only started messing up last night.

    This is the script im running to check all of this
    Simba Code:
    program scriptTemplate;

    {$DEFINE SMART}              // Always have this to load smart
    {$I SRL-6/SRL.simba}         // To load the SRL include files
    {$I SPS/lib/SPS-RS3.Simba}   // To load the SPS include files

    var
    h: Integer;

    procedure declarePlayers();
    begin
      setLength(players, 1);
      with players[0] do
      begin
        loginName := 'username';
        password := 'password';
        isActive := true;
        isMember := true;
      end
      currentPlayer := 0;
    end;

    //I just copied part of the TRSActionBar__find() function here
    function drawActionbar(out height: integer): boolean;
    var
      I: Integer;
      borderColor: TColorData := [4997944, 11, [2, [0.27, 0.44, 0.00]]];
      TPA: TPointArray;
      ATPA: T2DPointArray;
    begin
      if borderColor.gatherIn(TPA, getClientBounds()) then
      begin
        ATPA := TPA.cluster(2);
        ATPA.filterBetween(1, 250);

        if (length(ATPA) < 1) then
        begin
           print('TRSActionBar.__find(): Didn''t find enough ActionBar border colors');
           exit();
        end;

        ATPA.sortBySize(True);

        smartImage.debugATPA(ATPA);

        print('TRSActionBar.__find(): result = ' + toStr(result) + ' (height = '+intToStr(height)+')', TDebug.SUB)
      end;
    end;

    // main loop
    begin
      clearDebug();               // Clear the debug box
      smartEnableDrawing := true; // So we can draw on SMART
      smartShowConsole := false;
      setupSRL();                   // Load the SRL include files
      declarePlayers();             // Set up your username/pass

      if not isLoggedIn() then             // If player isn't logged in then
      begin
        players[currentPlayer].login();   // Log them in
        exitTreasure();            // Exit treasure hunter
        minimap.setAngle(MM_DIRECTION_NORTH);  // Make compass north and angle high
        mainScreen.setAngle(MS_ANGLE_HIGH);
      end;

      drawActionbar(h);
      smartImage.drawBoxes(actionbar.__slots,false,clBlue);
    end.

    this is me testing it in lumbridge to make sure the problem wasn't my setup.




    this is me testing it in the wilderness by the agility course



    The debug output inside the wilderness varied greatly tbh. the ATPA boxes were everywhere but this is just an example where it returned true, but the location was incorrect.
Issue Details
Issue Number 450
Project SRL Bugs and Suggestions
Status Resolved
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




  1. 08-01-2015 11:39 AM
    Issue Changed by The Mayor
    • Status changed from Unconfirmed to Confirmed
  2. 08-01-2015 12:52 PM
    Issue Changed by The Mayor
    • Status changed from Confirmed to Resolved
+ Reply