SRL Archive - First Scripts

AutoTyper 'Happy Birthday!'


Jacob

2007-06-22 10:39:58

Its a spam thing.

Program Autotyper;
var message: string;

Procedure setup;
begin
message:= 'Happy Birthday !'
end;
begin
setup;
repeat
Writeln(Message);
wait(2000)
until(false)
end.

Pentti helped me with the write in thing.

ZephyrsFury

2007-06-22 11:04:47

lol ok… well its not a very good spammer unless you want it to spam your debug. Writeln only writes the message in the debug. you need to add TypeSend or something similar so that the script actually writes it in the game. that means you must also add SRL to your script otherwise it won't work, add this just below the program AutoTyper; part:

{.include SRL/SRL.scar}

you need to learn the standards for scripting such as indenting and correct setting out.

also theres no point in using a variable because you aren't changing it during the script. use a constant instead.

you also need to randomize it more cos at the moment you'll get banned before you can say 'Happy Birthday'. you can randomize the wait times by adding a 'random' function to the wait function:

wait(2000+random(500)


also if you are going to use a procedure, make sure its more than one line long otherwise it would be easier to just write it in the main loop itself.

and if you look carefully you'll notice it won't compile cos you've forgotten a couple of semi-colons in several places such as after message:='happy birthday'. you obviously haven't tested it.

Jacob

2007-06-22 11:11:57

Where do I put this

wait(2000+random(500)
?

Jacob

2007-06-22 11:14:44

Include file C:\Program Files\SCAR 2.03\includes\SRL/SRL.scar does not exist.
Failed when compiling

sorry for duble post

ZephyrsFury

2007-06-22 11:24:34

lol ok… with your first question, change the wait(2000) into wait(2000+random(500));.

with your second question, you need to download SRL from the main page. sry i thought you would have it already.

also i recommend you download and install SCAR 3.06 cos 2.3 is quite old and all new script would be designed for 3.06:
http://freddy1990.com/scar.php

Jacob

2007-06-22 13:19:01

I can't find the thing I need to download.

ZephyrsFury

2007-06-22 23:13:44

i posted the link for SCAR Divi 3.06 above in my last post. when you download and install that, go to Files then click Download SRL. that should download the latest SRL to your includes folder. then you just have to wait until it says 'SRL installed' or something in your debug.

stupedspam

2007-06-22 23:18:20

WriteLn only types your message in the scar debug box… If you want it to send it to the active client then use SendKeys(Message);

Other than that good first script :D
~Stupedspam

ZephyrsFury

2007-06-22 23:33:11

From: stupedspam
WriteLn only types your message in the scar debug box… If you want it to send it to the active client then use SendKeys(Message);


well actually you should use TypeSend cos SendKeys goes poof.. and your text is there perfectly within a millisecond.