Yes. Another attempt at my AutoResponder...
I want it to Exit; the procedure if it finds my nick InChat.
It doesn't seem to be working, though.
Please help,
Mike.
SCAR Code:
program New;
{.include SRL/SRL.scar}
procedure DeclarePlayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(1);
CurrentPlayer:=0;
Players[0].Name :='Nubypkerdude';
Players[0].Pass :='password';
Players[0].Nick :='ubypkerdude';
Players[0].Active:=True;
NickNameBMP:=CreateBitMapmaskfromtext(Players[CurrentPlayer].Nick,UpChars)
end;
procedure AutoResponder;
begin
Wait(2000 + Random(2000));
if(InChat(Players[CurrentPlayer].nick))then
Exit;
if(InChat('hi')) or (InChat('hey')) or (InChat('hello'))then
begin
Wait(1000 + Random(2000));
case Random(3) of
0: TypeSend('hey');
1: TypeSend('sup');
2: TypeSend('what''s up?');
end;
end;
end;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
AutoResponder;
until(false)
end.