SCAR Code:
{*******************************************************************************
function LastChatter(var name: String): Boolean;
By: masquerader
Description:
*******************************************************************************}
function LastChatter(var name: string): Boolean;
var
i: Integer;
begin
name := LowerCase(Trim(GetTextAtEx(19, 412, 0, SmallChars, False, False, 0, 0,
0, 50, False, tr_allChars)))
i := Pos(':', name)
if (i <> 0) then
begin
Delete(name, i, i);
Result := True;
end;
end;
{*******************************************************************************
function GetLastChatText(var chat: String): Boolean;
By: masquerader
Description:
*******************************************************************************}
function GetLastChatText(var chat: string): Boolean;
var
textx, texty: Integer;
begin
if (IsTextInAreaEx(40, 412, 130, 413, textx, texty, ':', 0, smallchars, False,
True, 0, 0, 0)) then
begin
chat := LowerCase(Trim(GetTextAtEx(textx + 3, 412, 0, SmallChars, False,
False, 0, 1, 16711680, 40, False, tr_allChars)));
Result := True;
end;
end;
{*******************************************************************************
function ChatsBlackText: Array Of String;
By: Wizzup?
Description: Gets all text with color 0 in chatbox:
line 1 is result[0]
line 2 is result[1]
line 3 is result[2]
line 4 is result[3]
line 5 is result[4]
*******************************************************************************}
function ChatsBlackText: array of string;
var
I: Byte;
begin
SetArrayLength(Result, 5);
for I := 0 to 4 do
Result[I] := Trim(GetTextAtEx(18, 412 - (14 * I), 0, SmallChars, False,
False, 0, 1, 0, 80, False, tr_AllChars));
end;
{*******************************************************************************
function GetBlackChatMessage: String;
By: Wizzup?
Description: Gets text with color 0 in last chat line.
*******************************************************************************}
function GetBlackChatMessage: string;
begin
Result := Trim(GetTextAtEx(18, 412, 0, SmallChars, False,
False, 0, 1, 0, 80, False, tr_AllChars));
end;