SRL Archive - First Scripts

Pretty Good First Script (autotalker) :P


Nose Smasher

2007-08-11 13:44:53

After making the 'Hello World.' and another AutoTalker, I realized that it should say many different things! Or many different typing versions of what we are autotyping. Such as different spellings, different # of Spaces, and just switch it up a little…

Let me know what you guys think…
(I was trying to get the hang of the whole 'Case' thing… Is the way I did it the easiest/best way to use it?)

Thank You All very much!

Nose Smasher

2007-08-11 13:56:25

I guess it's small enough to just Copy/Paste…
Let me know what you think! =\


    //~~~~~Nose Smasher's AutoTyper~~~~~\\
{Credits to Driger's TUT}

program AutoTalker;
{.include SRL\SRL.Scar}

procedure talk1;
begin
TypeSend('buyin r2h - username'); //What you are typing
end;

procedure talk2;
begin
TypeSend('buyin R2h!!! username!');
end;

procedure talk3;
begin
TypeSend('buy r2h - username');
end;

procedure talk4;
begin
TypeSend('~~~~~ username buys r2h! ~~~~~');
end;

{Add as many as you wish!}

procedure talkrandom;
begin
wait(7148 + random(534)); //Time in between sends (milliseconds)
case random (4) of
0: talk1;
1: talk2;
2: talk3;
3: talk4;
end;
end;


begin
repeat
talkrandom;
until(false)

end.

~alex~

2007-08-11 14:19:24

Im pretty sure random(4) wil start at zero and count upwards so technically you will only have the numbers 0 - 3 being produced. Try making it random(4) + 1.
I might be wrong. Also what is the point of the writelns? They only print out in the scar debug box.. One last thing, you havnt called setupSRL, even though its not really needed for this script its still good to get into the habbit of doing it. Other than that well done :)

Nose Smasher

2007-08-11 14:34:48

Im pretty sure random(4) wil start at zero and count upwards so technically you will only have the numbers 0 - 3 being produced. Try making it random(4) + 1.
I might be wrong. Also what is the point of the writelns? They only print out in the scar debug box.. One last thing, you havnt called setupSRL, even though its not really needed for this script its still good to get into the habbit of doing it. Other than that well done


Thanks, didn't know about the '0' thing… Also, I got rid of the writeln's.
And what is setupSRL?

~alex~

2007-08-11 16:49:08

At the start of every script you should call it. It sets up srl for autoing. When you make other scripts your mouse will move super fast and you can get runtime errors if you dont call it.

Harry

2007-08-11 16:52:54

SetupSRL; as the first line in your main loop. After begin ;)

Nose Smasher

2007-08-12 06:24:45

Thank you very much Alex and Hy. :)

Nose Smasher

2007-08-13 16:05:43

So I guess no one else has any feedback…

Thanks……..

Harry

2007-08-13 16:08:41

Well, auto talkers are a little simple.. maybe for next script make your autotalker accept trades? :D

Kik

2007-08-13 16:37:43

I think everybody makes an autotalker for their first script - I did too. Maybe making a powercutter or a powerminer? Check out my tut on colorfinding (in sig) - it's got an example of two of how to use findcolor to make a powerminer/cutter.

drnewheart

2007-08-13 18:03:04

From: kikwit
I think everybody makes an autotalker for their first script - I did too. Maybe making a powercutter or a powerminer? Check out my tut on colorfinding (in sig) - it's got an example of two of how to use findcolor to make a powerminer/cutter.


No, for my first script I made a nat theiver.


This was a good script for a first autotalker. It was smart to make it not say the same thing over and over again. Next time why not try like Hy said to make it trade the person and stop autotalking but not only that add forms and a little anti-ban. Not that you would need it but it shows that you know a little about scripting.

HyperSecret

2007-08-14 01:17:45

also just alittle thing you could make username a const and instead of having username and have them type it everytime just have it be type it in as a constant to say

polka power

2007-09-03 15:47:43

awesome, now i can talk as fast as everyrone else

markel

2007-09-05 09:51:42

i use it in world 2:P