SRL Archive - First Scripts

Autotalker


aneeshgamer

2009-01-19 10:49:57

This is a very simple autotalker made by me.
It has two procedures. It is NOT smart.
here is the script
program AutoTalker;

var
SpeakVar:String;
WaitVar:Integer;

procedure Waiter;
begin
WaitVar:=5000+random(100);
Wait(WaitVar);
end;

procedure Speaker;

begin
SpeakVar:='Duel ME!, DUEL me, DUel ME!'
SendKeys(SpeakVar+chr(13));

end;

begin
Wait(5000);

Repeat;
Waiter;
Speaker;
Until(false);
end.
set SpeakVar to what u want 2 say
set WaitVar to the amount of time
start while already loggedin
if anybody knows how to improve it, or make it smart, plx reply

hylander

2009-01-20 10:22:37

I Tested Works Great Mate

benjaa

2009-01-20 11:23:11

hey aneeshgamer, like hylander says - this script will work fine

except the function SendKeys is very bannable

here's my input;

program AutoTalker;
{.include SRL/SRL.scar}

var
SpeakVar : String;
WaitVar, Talks : Integer;

const
SpeakVar1 = 'Duel ME!, DUEL me, DUel ME!'; //what to say option 1
SpeakVar2 = 'Friendly Duel me!'; ////what to say option 2
HowManyTalks = 10; //how many times to say it

begin
SetupSRL;
ActivateClient;

Repeat;
case(Random(2))of
0 : TypeSend(AddMistakes(SpeakVar1));
1 : TypeSend(AddMistakes(SpeakVar2));
end;
Inc(Talks); //adds 1 to 'Talks' variable
Wait(RandomRange(5000, 6000));
if(Talks >= HowManyTalks)then break;
Until(false);
end.

What i did was add a second option for you to say, and it randomly chooses one of them.
I broke the endless loop you made
Added SRL includes (helpful when you get to more complicated scripts)

Post anything you dont understand

aneeshgamer

2009-01-21 01:29:34

Thanks for the replies guys
benjaa, special thanks for the suggestion, however, when compiling that script u posted,
i get this error:
Failed when compiling
Line 6: [Error] (16212:10): Duplicate identifier 'Talks' in script
im guessing theres a problem with WaitVar or Talks???
could you help me?

ian.

2009-01-21 01:50:36

program AutoTalker;
{.include SRL/SRL.scar}

const
SpeakVar1 = 'Duel ME!, DUEL me, DUel ME!'; //what to say option 1
SpeakVar2 = 'Friendly Duel me!'; ////what to say option 2
HowManyTalks = 10; //how many times to say it
ChanceOfError = 2;

begin
SetupSRL;
ActivateClient;

Repeat;
case(Random(2))of
0 : TypeSend(AddMistakes(SpeakVar1, ChanceOfError));
1 : TypeSend(AddMistakes(SpeakVar2, ChanceOfError));
end;
Inc(Talks); //adds 1 to 'Talks' variable
Wait(RandomRange(5000, 6000));
if(Talks >= HowManyTalks)then break;
Until(false);
end.

Lvl6

2009-01-21 06:04:11

I would definately use a const instead of vars. Oh someone has already mentioned that. I have to say, AutoTalkers are prettyyy.. very easy to make.

aneeshgamer

2009-01-21 10:47:54

99-
thanks for the reply its working well for me. Could u guyz explain "case" to me?
thanks in advance
-Aneesh