PDA

View Full Version : AutoTalker



snatch
09-01-2007, 07:05 AM
just posting here to prove that im trying to learn how to script.
what script should i make next that will be fairly easy?



program AutoTyper;
{.include SRL/SRL.scar}
Const
TextToType = 'hello'; //What You Want Your Message To Say

begin
ClearDebug;
WriteLn('AutoTyper');
WriteLn('MADE BY SNATCH');
repeat
Wait(3000+random(500)); //Edit If You Want To Change The Time Between Messages
TypeSend(TextToType);
until(false);
end.

Bourdou!
09-01-2007, 07:40 AM
PowerMiners are fairly easy

Hugolord
09-01-2007, 07:46 AM
make you talker login and start talking randomly is a good update btw

Sir R. M8gic1an
09-03-2007, 12:18 PM
here's another suggestion for your next update;
(yes i'd keep developing this script to it's max potential to learn much more)
use arrays for the messages you want to say (there's quite a few good tuts (message[0],message[1])
if you use the arrays i'd also advise you to check out the for to do cycle, or
you might also want to try to say a random a variable (x := Random(10)+1;) and then use it on a case statement (that works like a bunch of if then else if statements )
case x of
1: TypeSend('something');
2:TypeSend('otherthing');
3:TypeSend('anything');

and finally don't make this "error":

repeat
until(false)

never make unstoppable loops.

i'd suggest you make a constant at the beginning, something like timesToTalk and make a variable called something like timesTalked
until (timesTalked => timesToTalk)


i made this yesterday to buy coal, and used most of the stuff i just told you might want to try. I didn't use arrays.


program CoalBuyer;
{.include srl/srl.scar}
const
timesToTalk = 500; //isn't it self explanatory?
var
x, mistake, times, price: integer;
begin
ClearDebug;
times := 0;
mistake := 0;
price :=0;
repeat
x := 1 + random(10);
case x of
//you may want to edit some of the messages
//it will occasionally make a 'typo' as antiban
1: Typesend('buying coal');
2: Typesend('buying coal');
3: Typesend('buying all coal');
4: Typesend('buying all coal');
5:begin
Typesend('bying col, 150ea');
price := price+1;
mistake := mistake+1;
end;
6:begin
Typesend('bying col, 150ea');
price := price+1;
mistake := mistake+1;
end;
7: begin
Typesend('buying coal, 150ea');
price := price+1;
end;
8: begin
Typesend('buying coal, 150ea');
price := price+1;
end;
9: begin
Typesend ('buying cola');
mistake := mistake+1;
end;
10:begin
Typesend('byuing coal');
mistake := mistake+1;
end;
end;
wait(1000+Random(500));
times := times+1;
writeln('talked '+IntToStr(times)+' times. Made '+IntToStr(mistake)+' mistakes and said price '+IntToStr(price)+' times')
until(times >= timesToTalk);
end.