Richard
02-22-2008, 09:21 PM
The Basics Tutorial
Note: I recomend that you read the "How To Auto" section before reading this.
Contents:
1: When you open up SCAR
2: Procedures
3: Basic Functions
4: Logging in Players
5: Giving extra information to the user
When you open up SCAR
When you first open up SCAR you will get something that looks like this:
program New;
begin
end.
The "program New;" should be the very first thing in your script, it is the name of your script (or program), you should change the "new" bit to something that is relavent to your script, but it MUST NOT have any spaces. The "begin" is the beginning of you program, known as the "main loop", this will do the set functions/procedures in the set order. This will always be near the end of your script. The "end." is the end of your script, this will be the very last thing in your script. The "." means that the script will terminate when it gets to this point. The peices of the program are put inbetween the "begin" and "end.".
Procedures
These are basically little mini programs in your script that you will put into you main loop so your main loop doesn't get over crowded. They are shown quite similarly to how SCAR is shown when opened up:
Procedure New;
Begin
end;
Like at the beginning you rename the new to something relavent with that procedure. You may notice that the "end" has a semicolon( ; ) instead of a fullstop at the end of it. This means that when it gets to the end it justs ends the procedure, not the whole script. Like the main loop the functions go inbetween the begin and end.
Basic Functions
This is where you can get SCAR to actually do things. I will only tell some of the most basic functions to get you started but if you want more advanced procedures then go to the intermediate sections in the tuts.
Mouse Movement
Mouse(X, Y, X2, Y2);
This will mouse the mouse to the coordinates of X and Y will the randomness of X2 and Y2. To get certain coordinates just use the colour-picker and it will tell you the coordinates of where you clicked. Usually you would use about 5 in the X2 and Y2 as that is a good enough off-put (well, I think so).
Waiting
Wait(time + random(time));
This will wait the set time before moving onto the next functions. Put the time you want to wait in the first "time" in milliseconds (1/1000 of a second) and the random time in the second "time" bit.
Writing in Debug box
WriteLN('Text here');
This will type the text you put in the place where the "Text here is" and you must always have to apostrophes either side of the text.
Writing on Runescape
TypeSend('Text here');
This will type the text you specify in the "Text here" bit into the client you are using.
Logging in Players
This next bit is where you can get you script to log in your player. But to do this you will next to tell SCAR the username and password of your account(s). You normally do this by having a procedure that declares the players, and you do it normally like this.
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'Nickname';
Players[0].Active := True;
end;
I think you can tell that the Name and Pass is where you put your name and pass. The Nick bit is how SCAR searches for randoms, you put in 3 letters in from your username that are all together, cant have spaces and it can't have the first letter of your name in it. The Active bit shows whether you are using this account of not, True means yes, False means no.
The next bit you need it to have LoginPlayer near the begining of you main loop, before you do the bit where you are logged into runescape. What you should include before that is "ActivateClient" this will activate the client so you don't have to switch windows.
If you want to add an area for a certain ammount of loads for example you would put
Players[0].Integers[0] := 0;
But you would change the 0 to another number if you had more than 1 of them
Its pretty much the same thing if you want something to do with writing, you just change the integers bit to strings
Players[0].Strings[0] := '';
And like with integers, you would change the last number to some other number if you had more than 1 of them
Giving extra info to the user
To give extra information to the user is quite simple, you can either use the curly brackets {} or you 2 or more slashed. Doing either of these means that SCAR will not include that writing into the script, it will basically ignore them and move on.
Example of brackets:
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'Nickname';
Players[0].Active := True;
{This is where you put in you playe information for the script}
end;
Example of slashes
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;//How many players you are using
NumberOfPlayers(HowManyPlayers);//Leave this please
CurrentPlayer := 0;//Starting player
Players[0].Name := 'Username';//Username here
Players[0].Pass := 'Password';//Password here
Players[0].Nick := 'Nickname';// 3 letter of you name here
Players[0].Active := True;//Whether you are using this player
end;
See? Giving extra information is pretty simple and very useful.
Thanks for reading my tut and I hope that it helped you begin you first script!
Note: I recomend that you read the "How To Auto" section before reading this.
Contents:
1: When you open up SCAR
2: Procedures
3: Basic Functions
4: Logging in Players
5: Giving extra information to the user
When you open up SCAR
When you first open up SCAR you will get something that looks like this:
program New;
begin
end.
The "program New;" should be the very first thing in your script, it is the name of your script (or program), you should change the "new" bit to something that is relavent to your script, but it MUST NOT have any spaces. The "begin" is the beginning of you program, known as the "main loop", this will do the set functions/procedures in the set order. This will always be near the end of your script. The "end." is the end of your script, this will be the very last thing in your script. The "." means that the script will terminate when it gets to this point. The peices of the program are put inbetween the "begin" and "end.".
Procedures
These are basically little mini programs in your script that you will put into you main loop so your main loop doesn't get over crowded. They are shown quite similarly to how SCAR is shown when opened up:
Procedure New;
Begin
end;
Like at the beginning you rename the new to something relavent with that procedure. You may notice that the "end" has a semicolon( ; ) instead of a fullstop at the end of it. This means that when it gets to the end it justs ends the procedure, not the whole script. Like the main loop the functions go inbetween the begin and end.
Basic Functions
This is where you can get SCAR to actually do things. I will only tell some of the most basic functions to get you started but if you want more advanced procedures then go to the intermediate sections in the tuts.
Mouse Movement
Mouse(X, Y, X2, Y2);
This will mouse the mouse to the coordinates of X and Y will the randomness of X2 and Y2. To get certain coordinates just use the colour-picker and it will tell you the coordinates of where you clicked. Usually you would use about 5 in the X2 and Y2 as that is a good enough off-put (well, I think so).
Waiting
Wait(time + random(time));
This will wait the set time before moving onto the next functions. Put the time you want to wait in the first "time" in milliseconds (1/1000 of a second) and the random time in the second "time" bit.
Writing in Debug box
WriteLN('Text here');
This will type the text you put in the place where the "Text here is" and you must always have to apostrophes either side of the text.
Writing on Runescape
TypeSend('Text here');
This will type the text you specify in the "Text here" bit into the client you are using.
Logging in Players
This next bit is where you can get you script to log in your player. But to do this you will next to tell SCAR the username and password of your account(s). You normally do this by having a procedure that declares the players, and you do it normally like this.
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'Nickname';
Players[0].Active := True;
end;
I think you can tell that the Name and Pass is where you put your name and pass. The Nick bit is how SCAR searches for randoms, you put in 3 letters in from your username that are all together, cant have spaces and it can't have the first letter of your name in it. The Active bit shows whether you are using this account of not, True means yes, False means no.
The next bit you need it to have LoginPlayer near the begining of you main loop, before you do the bit where you are logged into runescape. What you should include before that is "ActivateClient" this will activate the client so you don't have to switch windows.
If you want to add an area for a certain ammount of loads for example you would put
Players[0].Integers[0] := 0;
But you would change the 0 to another number if you had more than 1 of them
Its pretty much the same thing if you want something to do with writing, you just change the integers bit to strings
Players[0].Strings[0] := '';
And like with integers, you would change the last number to some other number if you had more than 1 of them
Giving extra info to the user
To give extra information to the user is quite simple, you can either use the curly brackets {} or you 2 or more slashed. Doing either of these means that SCAR will not include that writing into the script, it will basically ignore them and move on.
Example of brackets:
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'Nickname';
Players[0].Active := True;
{This is where you put in you playe information for the script}
end;
Example of slashes
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;//How many players you are using
NumberOfPlayers(HowManyPlayers);//Leave this please
CurrentPlayer := 0;//Starting player
Players[0].Name := 'Username';//Username here
Players[0].Pass := 'Password';//Password here
Players[0].Nick := 'Nickname';// 3 letter of you name here
Players[0].Active := True;//Whether you are using this player
end;
See? Giving extra information is pretty simple and very useful.
Thanks for reading my tut and I hope that it helped you begin you first script!