SCAR Code:
{*******************************************************************************
function TabExists(Tab: Integer): Boolean;
By: ZephyrsFury
Description: Returns True if the Tab exists.
*******************************************************************************}
function TabExists(Tab: Integer): Boolean;
var
tP: TPoint;
begin
if (tab < 20) then
begin
SRL_Warn('TabExists', 'Tab ' + IntToStr(Tab) + ' is not using the new constants! Please upgrade your script.', warn_AllVersions);
Exit;
end;
if (not(InRange(Tab, Tab_Combat, Tab_LogOut))) then
begin
SRL_Warn('TabExists', 'Tab ' + IntToStr(Tab) + ' is not a valid tab number.', warn_AllVersions);
Exit;
end;
if (Tab = tab_LogOut) then
begin
Result := (GetColor(753, 6) = 6261404);
Exit;
end;
tP := Point(536 + (Tab - 21) mod 8 * 30, 187 + (Tab - 21) div 8 * 298);
Result := (GetColor(tP.X, tP.y) <> 4412771);
end;