SRL Archive - First Scripts

Extremely Nooby First Script


nething

2007-10-08 21:37:40

I have been "scripting" for about 2 months. I have mainly just been altering other peoples scripts to fit my needs. This is my first Solo attempt to make a script. It is really simple but this is what I got.

What it is is an extremely complicated version of the "Hello World" Script. I included A lot of the basics like constants, vars, If/then, and the SRL Declare Players (for practice). Well, Here it is. My first Solo Script:

program Hello;
{.include srl/srl.scar}

var
TimesWritten: Integer;

const
TimesToWrite = 5; //how many time to write
WhatToWrite = 'Hello Everyone'; //What you want to say
TimeBetween = 0; //Milliseconds
ClearDeBugs = False; //Clear the Debug First?
MySRLID = ''; // SRL Stats ID
MySRLPassword = ''; //SRL Stats Password

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

SRLID := MySRLID;
SRLPassword := MySRLPassword;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
begin
if (ClearDebugs) then
begin
ClearDebug;
end else
Writeln('Not Clearing Debug');
end;
Writeln('Player(s): ' + IntToStr(HowManyPlayers) + ';');
end;

procedure WriteIt;
begin
repeat
WriteLn(WhatToWrite);
TimesWritten := TimesWritten + 1;
Wait(TimeBetween);
until TimesWritten = TimesToWrite;
end;

begin
DeclarePlayers;
WriteIt;
end.

Any Compliments/Suggestions are welcome.

Harry

2007-10-08 21:40:08

Looks nice for a first script- better than all the 5 line autotalkers we see here.


begin
repeat
SendKeys('lol spam');
until(false);
end.

Runescape Pro

2007-10-08 21:44:47

for 1 thing, its a script… but to add srl stats to it, LMAO!

Sp0rky

2007-10-08 22:17:59

nething, thats a fantastic first script. Great job.

Why not use the declare players? At the moment its pointless.


program Hello;
{.include srl/srl.scar}

var
TimesWritten: Integer;

const
TimesToWrite = 5; //how many time to write
WhatToWrite = 'Hello Everyone'; //What you want to say
TimeBetween = 0; //Milliseconds
ClearDeBugs = False; //Clear the Debug First?
MySRLID = ''; // SRL Stats ID
MySRLPassword = ''; //SRL Stats Password

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

SRLID := MySRLID;
SRLPassword := MySRLPassword;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
begin
if (ClearDebugs) then
begin
ClearDebug;
end else
Writeln('Not Clearing Debug');
end;
Writeln('Player(s): ' + IntToStr(HowManyPlayers) + ';');
end;

procedure WriteIt;
begin
repeat
TypeSend(WhatToWrite);
TimesWritten := TimesWritten + 1;
Wait(TimeBetween);
until TimesWritten = TimesToWrite;
end;

begin
ActivateClient;
SetupSRL;
DeclarePlayers;
LoginPlayer;
WriteIt;
end.

And now it's an rs autotalker that logs you in! Haha.

You seem to be really getting a firm grasp of the basics, why not move onto more advanced stuff?

nething

2007-10-08 22:27:24

From: Sp0rky
nething, thats a fantastic first script. Great job.

Why not use the declare players? At the moment its pointless.


program Hello;
{.include srl/srl.scar}

var
TimesWritten: Integer;

const
TimesToWrite = 5; //how many time to write
WhatToWrite = 'Hello Everyone'; //What you want to say
TimeBetween = 0; //Milliseconds
ClearDeBugs = False; //Clear the Debug First?
MySRLID = ''; // SRL Stats ID
MySRLPassword = ''; //SRL Stats Password

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

SRLID := MySRLID;
SRLPassword := MySRLPassword;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
begin
if (ClearDebugs) then
begin
ClearDebug;
end else
Writeln('Not Clearing Debug');
end;
Writeln('Player(s): ' + IntToStr(HowManyPlayers) + ';');
end;

procedure WriteIt;
begin
repeat
TypeSend(WhatToWrite);
TimesWritten := TimesWritten + 1;
Wait(TimeBetween);
until TimesWritten = TimesToWrite;
end;

begin
ActivateClient;
SetupSRL;
DeclarePlayers;
LoginPlayer;
WriteIt;
end.

And now it's an rs autotalker that logs you in! Haha.

You seem to be really getting a firm grasp of the basics, why not move onto more advanced stuff?


Lol Never thought about that. Dang just noticed I forgot SetupSRL.

@rs2pro666 I just put it there for practice. No real reason.

nething

2007-10-08 23:18:13

How bout this?! Just finished lol. It is So Amazingly Pointless But it Works!

program Hello;
{.include srl/srl.scar}

var
TimesWritten: Integer;
TotalTypes: Integer;
RunningTime: Integer;
StartTime: Integer;

const
TimesToWrite = 3; //how many time to write
WhatToWrite = 'Hello Everyone'; //What you want to say
TimeBetween = 1000; //Milliseconds
ClearDeBugs = True;
MySRLID = '';
MySRLPassword = '';

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

SRLID := MySRLID;
SRLPassword := MySRLPassword;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
begin
if (ClearDebugs) then
begin
ClearDebug;
end else
Writeln('Not Clearing Debug');
end;
Writeln('Player(s): ' + IntToStr(HowManyPlayers) + ';');
end;

//---------------------------------------------------------------------
//FindFastRandoms
//By: WT-Fakawi
//---------------------------------------------------------------------

Function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 10 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9: RC;
10: Respond;
end;
wait(1);
end;
end;

//---------------------------------------------------------------------
//Typing Procedure
//By: Me
//---------------------------------------------------------------------

procedure WriteIt;
begin
TimesWritten := 0
repeat
Typesend(WhatToWrite);
TimesWritten := TimesWritten + 1;
TotalTypes := TotalTypes + 1;
FindNormalRandoms;
FindFastRandoms;
SRLRandomsReport;
Wait(TimeBetween+Random(250));
until TimesWritten = TimesToWrite;
end;

//--------------------------------------------------------------------
//Progress Report
//Design: WT-Fakawi's Goblin Schredduler
//--------------------------------------------------------------------

Procedure ProgressReport;
begin
writeln(' ');
WriteLn ('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
WriteLn (' -- First AutoTyper -- Progress Report -- by Nething -- ');
Writeln ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
WriteLn ('Typed A Total Of '+inttostr(TotalTypes)+' Times');
WriteLn ('Ran for '+ TimeRunning);
SRLRandomsReport;
end;

//--------------------------------------------------------------------
//Main Loop
//--------------------------------------------------------------------

begin
SetupSRL;
ScriptID := '371';
ActivateClient;
StartTime := GetSystemTime;
DeclarePlayers;
LoginPlayer;
repeat
RunningTime := GetSystemTime;
WriteIt;
Logout;
ProgressReport;
Wait(4000+Random(2000));
NextPlayer(True);
until(false)
end.

Like I said Nobody would actually use this script but it works and it is a script so that is all I care about.

EDIT: Oh by the way. Just wondering, are the standards right on this?

EDIT:EDIT: W00T 100th Post

EDIT:EDIT:EDIT: Oops I just noticed I double posted :( Sorry :\

70rd4n

2007-10-13 05:00:49

dude u cant tell me this was your first script??! its solid as..

keep it up dunn

BobboHobbo

2007-10-13 05:06:45

Nice for a first script. I can see you know standards. :) Well done.

Viper8 3

2007-10-14 20:01:19

This would be one of the best first auto talkers I've used. Good job.

irishpir8

2007-10-14 20:15:03

nice auto talker

Sp0rky

2007-10-14 20:24:44

I want to make a 'The person above me is spamming just to get 10 posts' image… I think I might.

Infact the 2 people above me are doing this…

Smartzkid

2007-10-14 20:38:35

Sporky, if you did, it'd be instantly be the most used picture on SRL :)

nething

2007-10-17 18:20:00

Hey at least I can post again :) Nobody had posted and I wanted to bump but I really didn't want to triple post. Double is bad enough.

Any more feedback? Would be appreciated.

Zeta

2007-10-17 18:30:09

pretty good for your first script, but you forgot SetUpSRL; at the beggining of your main loop

nething

2007-10-17 18:41:10

Yea I know. Its fixed in the edited version (look farther down).