NiCbaZ
2009-05-12 14:37:08
[PHP]{*******************************************************************************
function GetCurrentTab: Integer;
By: Wizzup?
Description: Returns current tab
*******************************************************************************}
function GetCurrentTab: Integer;
var
b: Boolean;
IntArr: TIntegerArray;
begin
b := False;
IntArr[543,178,1580634,570, 17,1778795,604, 174,1910385,632, 172, 1910385
,666, 182, 1647204,699, 177, 1910385,735, 177,1778795,569, 471, 1910385
598, 471, 1910385,633, 478, 1778795,668, 476, 1778795,703, 481, 1580634
740, 471, 1778795,555, 275, 2070783,533, 475 1581150]
for Result := 1 to 15 do
begin
B:= GetColor(IntArr[Result],IntArr[Result + 1]) = IntArr[Result + 2]
if b then
Exit;
end;
Result := 0;
end;
{*******************************************************************************
function TabExists(TabNumber: Integer): Boolean;
By: Flyboy
Description: Returns true if tab exists.
Very useful for tutorial Is. as well as a simple double check to make sure
your fully logged in.
*******************************************************************************}
function TabExists(TabNumber: Integer): Boolean;
var
IntArr: TIntegerArray;
begin
IntArr[543,178,1580634,570, 17,1778795,604, 174,1910385,632, 172, 1910385
,666, 182, 1647204,699, 177, 1910385,735, 177,1778795,569, 471, 1910385
598, 471, 1910385,633, 478, 1778795,668, 476, 1778795,703, 481, 1580634
740, 471, 1778795,555, 275, 2070783,533, 475 1581150]
Result:= GetColor(IntArr[TabNumber],IntArr[TabNumber + 1]) = IntArr[TabNumber + 2]
end;
[/PHP]
Just shortened a bit, needs testing, commit if you wish.
function GetCurrentTab: Integer;
By: Wizzup?
Description: Returns current tab
*******************************************************************************}
function GetCurrentTab: Integer;
var
b: Boolean;
IntArr: TIntegerArray;
begin
b := False;
IntArr[543,178,1580634,570, 17,1778795,604, 174,1910385,632, 172, 1910385
,666, 182, 1647204,699, 177, 1910385,735, 177,1778795,569, 471, 1910385
598, 471, 1910385,633, 478, 1778795,668, 476, 1778795,703, 481, 1580634
740, 471, 1778795,555, 275, 2070783,533, 475 1581150]
for Result := 1 to 15 do
begin
B:= GetColor(IntArr[Result],IntArr[Result + 1]) = IntArr[Result + 2]
if b then
Exit;
end;
Result := 0;
end;
{*******************************************************************************
function TabExists(TabNumber: Integer): Boolean;
By: Flyboy
Description: Returns true if tab exists.
Very useful for tutorial Is. as well as a simple double check to make sure
your fully logged in.
*******************************************************************************}
function TabExists(TabNumber: Integer): Boolean;
var
IntArr: TIntegerArray;
begin
IntArr[543,178,1580634,570, 17,1778795,604, 174,1910385,632, 172, 1910385
,666, 182, 1647204,699, 177, 1910385,735, 177,1778795,569, 471, 1910385
598, 471, 1910385,633, 478, 1778795,668, 476, 1778795,703, 481, 1580634
740, 471, 1778795,555, 275, 2070783,533, 475 1581150]
Result:= GetColor(IntArr[TabNumber],IntArr[TabNumber + 1]) = IntArr[TabNumber + 2]
end;
[/PHP]
Just shortened a bit, needs testing, commit if you wish.