SCAR Code:
//Looks for Game text in the chat box at (a, b).
//if the bottom line has a player's chat on it, it will move up a line and so on
//until it gets to a line with black text on it.
function FindBlackInChat(a, b:integer): boolean;
var
x, y, Line: integer;
begin
Line:= 0;
Result:= false;
if not(FindColor(x, y, 16711680, 42, 451, 254, 459)) then
Line:= 1;
if Line= 0 then
if not(FindColor(x, y, 16711680, 42, 437, 254, 439)) then
Line:= 2;
if Line= 0 then
if not(FindColor(x, y, 16711680, 42, 420, 254, 427)) then
Line:= 3;
if Line= 0 then
if not(FindColor(x, y, 16711680, 42, 406, 254, 412)) then
Line:= 4;
if Line= 0 then
if not(FindColor(x, y, 16711680, 42, 394, 254, 400)) then
Line:= 5;
if Line= 0 then
if not(FindColor(x, y, 16711680, 42, 379, 254, 384)) then
Line:= 6;
if Line= 0 then
if not(FindColor(x, y, 16711680, 42, 365, 254, 369)) then
Line:= 7;
if Line= 0 then
if not(FindColor(x, y, 16711680, 42, 347, 254, 357)) then
Line:= 8;
if Line= 1 then
if GetColor(a, b)= 0 then
Result:= true;
if Line= 2 then
if GetColor(a, b-14)= 0 then
Result:= true;
if Line= 3 then
if GetColor(a, b-28)= 0 then
Result:= true;
if Line= 4 then
if GetColor(a, b-42)= 0 then
Result:= true;
if Line= 5 then
if GetColor(a, b-56)= 0 then
Result:= true;
if Line= 6 then
if GetColor(a, b-70)= 0 then
Result:= true;
if Line= 7 then
if GetColor(a, b-84)= 0 then
Result:= true;
if Line= 8 then
if GetColor(a, b-98)= 0 then
Result:= true;
end;