Log in

View Full Version : AutoResponder... Yet another attempt.



Jason2gs
02-24-2007, 11:13 PM
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.


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.

Smartzkid
02-24-2007, 11:28 PM
Left ya'h pass in there...
Check your PMs for what I changed it to.

you shouldn't need 'NickNameBMP:=CreateBitMapmaskfromtext(Players[CurrentPlayer].Nick,UpChars)' in DeclarePlayers - SRL should do that for you. You only need to make the nickname bitmap yourself if you're not going to use DeclarePlayers.

Jason2gs
02-25-2007, 02:01 AM
Lol, guess I should probably change that :p

Thanks, man =)