Haven't done an auto responder but...
Use:
SCAR Code:
{*******************************************************************************
function GetLastChatText(var chat: String): Boolean;
By: masquerader / Wizzup?
Description: Returns true if blue chat text was found
*******************************************************************************}
function GetLastChatText(var chat: string): Boolean;
begin
Chat := GetChatBoxText(8, clChat);
Result := (Chat <> '');
end;
or depending on the line..:
SCAR Code:
{*******************************************************************************
function GetChatBoxText(Line, TextCol: Integer): string;
By: ZephyrsFury
Description: Gets text on the line Line with colour TextCol. (Line 1 is the top,
Line 8 is the bottom line).
Colours:
clMessage/clBlack - Black text messages ("Oh Dear you are dead", etc).
clChat/clBlue - Chat messages from you and other players.
clTrade/clPurple - Colour of trade request text.
clFriend - Colour of friend and clan chat.
Works with other colours too.
*******************************************************************************}
function GetChatBoxText(Line, TextCol: Integer): string;
var
P: TPoint;
cArr: TPointArray;
B: TBox;
begin
P := TextCoords(Line);
if (FindColorsTolerance(cArr, TextCol, MCX1, P.y, MCX2, P.y + 13, 0)) then
begin
B := GetTPABounds(cArr);
Result := Trim(GetTextAtEx(B.x1 - 1, B.y1 - 2, 0, SmallChars, False, False,
0, 1, TextCol, 80, False, tr_AllChars));
end;
end;
I think that is quite straight forward, so you could do something like:
SCAR Code:
program New;
{.include SRL\SRL.Scar}
var
LvlText: TStringArray;
begin
LvlText := ['lvls', 'lvl', 'level?', 'lvlz?'];
if GetChatBoxText(8, clChat)then
for i := 0 to 3 do //or High(Lvltext);
begin
case Random(5) of
0: TypeSend('Im level' + IntToStr(WClevel)); //etc, that would be determined using gametab/ref or whatever
end.
It doesn't compile but you get the idea right?
E: Also make the case number slightly higher than the amount of typesends you have, so its random in away by not talking sometimes.
PM me for more help...Don't just just <3 me
jk lol