SRL Archive - First Scripts

My First AutoTalker


eurostylz

2008-01-29 17:45:47

Heres my first ever Scar Script, its not as heard as i thought it would be to learn how code in scar, its a user controled loop, meaning that you have to set the ammount of times it has to be run. It very basic i just learned how to code in scar in about 20 mins

Pure1993

2008-01-30 10:32:51

Nice first script, here, but it doesn't work (wrong variables), and the standards were completely off, so I edited it a bit:

Program AutoTalker;
var
TimesToRepeat, i : Integer;
Text : String;
begin
TimesToRepeat := 0; //how often you want it to repeat, substitute the 0
Text :='Enter your text here';
i := 0 //because after typing it once, it will add one, otherwise it would already be two after typing it once.
begin
ActivateClient; //No need to do that over and over again
repeat
SendKeys((Text)+chr(13));
i := i + 1;
wait((3000)+random(500));
Until (i = TimesToRepeat);
end;
end.

If you have any question, just write me a personal message. :)

Richard

2008-01-31 15:27:57

For a first script you have done quite well and you did fairly well with standards.

One thing you should do is put TimesToRepeat in a const section and the same with the text.
Below is how I'd do it.

Var
Times, i:integer
Test :string

Const
TimesToRepeat = '0' //enter times to repeats here instead
Text :=' text goes here' //same with text
i :=0//and again with i, tell people not to edit this

Also i don't quite understand why you had begin in the variables, o well

Good idea with telling people the different text effects :D

Hope this helped

pyroryan

2008-02-08 16:32:12

Give him a break, you gotta start somewhere. You don't expect a 1st grader to be able to solve differential equations, you build your way up to it and learn as you go.

Richard

2008-02-09 08:49:28

From: pyroryan
Give him a break, you gotta start somewhere. You don't expect a 1st grader to be able to solve differential equations, you build your way up to it and learn as you go.


I'm not being harsh. I'm doing something called "constructive critism". I was telling him how to improve his script, not that it was bad.

I'm sorry eurostyles if I sounded harsh, I didn't mean to, I was trying to help.

Just out of interest, how od are first graders, I'm from England.

Heavenzeyez1

2008-02-09 12:45:42

SendKeys is Detectable?
Well Typesend sure isn't. :)
Anyway, keep up the work.
Read something in here. :)->
Tutorials.
Eerik.

fom

2008-02-09 12:52:43

You should use TypeSends it's not very detectable. Also allow the user to add more messages instead of one.

gamer 5

2008-02-09 12:54:32

From: heavenzeyez1
SendKeys is Detectable?
Well Typesend sure isn't. :)
Anyway, keep up the work.
Read something in here. :)->
Tutorials.
Eerik.


He is right try to use typesend! Its pretty much a simple autotalker, want some direction look at mine the link is in my sig.

nikos

2008-02-09 13:23:33

I also made an Auto Talker. It's my first script and let me know what you guys think.

{Nikos's Auto Talker version 0.0.1}
program AutoTalker;

var
i: Integer;

const
TimesToRepeat=10;//Times to repeat.
Text='glow1: This is Sparta!';//Enter text

procedure AutoTalk;
begin
writeln('...Auto Talking...');
sendkeys(text+chr(13));
end;

procedure Stay;
begin
i:=0;
repeat
i:=i + 1;
AutoTalk;
wait(10000+Random(8000));
until(i>=TimesToRepeat);
end;

begin
Stay;
end.

Heavenzeyez1

2008-02-09 13:27:52

From: nikos
I also made an Auto Talker. It's my first script and let me know what you guys think.

{Nikos's Auto Talker version 0.0.1}
program AutoTalker;

var
i: Integer;

const
TimesToRepeat=10;//Times to repeat.
Text='glow1: This is Sparta!';//Enter text

procedure AutoTalk;
begin
writeln('...Auto Talking...');
sendkeys(text+chr(13));
end;

procedure Stay;
begin
i:=0;
repeat
i:=i + 1;
AutoTalk;
wait(10000+Random(8000));
until(i>=TimesToRepeat);
end;

begin
Stay;
end.


Maybe post in your own thread? :)
And again: USE TYPESEND('plapla');
Eerik.
Not bad. :)

nikos

2008-02-09 20:46:23

Yea i thought of posting on separate thread, but thought why bother it will have the same title (or a similar one). It would just waste a thread. Thanks, its only my first script though. Also typesend dosent work for me in scar…

blueberry jam

2008-02-10 01:39:40

nice,

just some advice
when i started my first script i did what you did, then added a trader respnder e.c.t merhcanting and kept on going till i had a script that logged in varrok walked to center talked looks for 2 trades and went back did 3 trades there there e.c. my advice is to build yourslef up and keep on going its a great way to learn.

Da 0wner

2008-02-10 06:11:20

IT dosen't work for you because either you dont have SRL installed or you didnt include {.include SRL/SRL.scar} at the top like


Program New;
{.include SRL/SRL.scar}
Begin
TypeSend('Hi');
End.

Heavenzeyez1

2008-02-10 06:11:26

From: blueberry jam
nice,

just some advice
when i started my first script i did what you did, then added a trader respnder e.c.t merhcanting and kept on going till i had a script that logged in varrok walked to center talked looks for 2 trades and went back did 3 trades there there e.c. my advice is to build yourslef up and keep on going its a great way to learn.


That's pretty hard, though? :)
You sure u made it? :D
Eerik.