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.