SRL Archive - Outdated Tutorials

Getting Started with SCAR and SRL


Da 0wner

2009-04-19 02:19:16

Welcome to my tutorial!

First of all we need to download a few things:
  1. Subversion
  2. SCAR 3.20 if you haven't already.

Once you download and install those things then you must open SCAR and click this:

A cmd prompt window should pop up and display files that are being downloaded. If it does not then you did not install Subversion correctly. It may require a restart.

Once the window disappears you now have SRL! Then go to Options and click the SRL Download tab and click Move Plugins.

Then you have to open the script you wish to use.

First thing you need to do is fill out the player array. If you do not see that don't worry there might be a form that will pop up when you press play. If you don't see it, don't click play yet.

A player array looks like this. This is a single index in the player array.

Player[0].Name := 'Zezima';
Player[0].Pass := 'iCheat';
Player[0].Nick := 'ezi'; // Nick is 3-4 characters after the first character of the name.
Players[0].Active := True;
That is a simple player. There can be more variables like Strings[0], Extendeds[0], Integers[0], Booleans[0], if you see those set them appropriately with the description that is usually next to them in comments (// or {})

You also must declare 2 more things. That are usually above the player arrays.

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

HowManyPlayers is the number of players you are using in a literal amount. (i.e not the highest index.)

CurrentPlayer is the array index that is the player you are using currently at the start of the script. (in this case it would be 0 as that is the index of the only player I am using.

Then you must see if there is any constants or variables that you need to fill in.

Constants can not be changed and are only set once at the beginnig of a script. Variables can be changed during the script.

Variables look like this and can be mostly anywhere in a script.

program New;

procedure Proc1(s : string {s is a variable});
var
ss : string; { Vars are declared under var like the above. They can be set anywhere in the script though. }
begin
ss := s;
Writeln(s); { That was a useless procedure but just showing you that ss is a variable and is set in the procedure. }
end;

As you can see variables have to be declared as certain types. However there is also a special type called variant that can be any but we won't discuss that now because most people don't use them. They are also declared under var.

Constants look like this and are near the top of the script.

program New;

const
Const1 = 'This is a string.'; // String
Const2 = True; // Boolean
Const3 = 5; // Integer
Const4 = 3.14 // Float/Extended
Those would be const and you can see that they do not need to be defined as variables do. They also don't need to be declared with the := but rather with just an equals sign.

Next you must find out if SMART is used. A simple way of deciding is this:
If you see {.include SRL/Misc/SMART.scar} near the top of the script, then there is. If not, then there is no SMART.

If there is SMART then just click play.

If not, then find the and drag it to the RuneScape client. Then you are ready to auto! I hope that tutorial has helped you out a little bit.

Largenova

2009-04-20 02:45:00

When ever I click to update it says "(Error) - Couldnt move the plugins from the SRl folder to the plugins folder"

Da 0wner

2009-04-20 04:37:55

Do you have Vista?

NCDS

2009-04-20 04:49:20

Is another one of these really necessary?

ian.

2009-04-20 05:25:09

no. :/

Da 0wner

2009-04-20 05:56:23

Haha, I never wrote one of these and just decided to write one for no reason. Was just bored :p.