SCAR Code:
{*******************************************************************************
function SuperTradeScreen(screen: integer): Boolean;
By: Rasta Magician
Description: Returns true if you're in trade screen. 1 for first screen, 2
for 2nd screen
eg: SuperTradeScreen(2) will return true if you're in the second trade screen
*******************************************************************************}
function SuperTradeScreen(screen: integer): Boolean;
var
foundGreen, foundRed, foundBlue :boolean;
a, b:integer;
begin
if screen = 1 then
begin
if (TabExists(2))and(TabExists(3))and(TabExists(8)) then
begin
writeln('tabs still there, we are not in trade')
Result := False;
end else
begin
writeln('no tabs');
foundGreen := FindColorTolerance(a, b, 49152, 218, 168, 297, 212, 5);
foundRed := FindColorTolerance(a, b, 192, 222, 248, 294, 286, 5);
if (foundGreen)and(foundRed) then
begin
Result:= True;
writeln('we are in trade screen 1');
end else
Result := False;
end;
end;
if screen = 2 then
begin
foundGreen := FindColorTolerance(a, b, 49152, 195, 305, 250, 320, 5);
foundRed := FindColorTolerance(a, b, 192, 268, 305, 321, 320, 5);
foundBlue := FindColorTolerance(a, b, 16776960, 369, 285, 458, 315, 5);
if (foundGreen)and(foundRed)and(foundBlue) then
begin
Result:= True;
writeln('we are in trade screen 2');
end else
Result := False;
end;
end;