SRL Archive - Outdated Tutorials

Unmatched Beginner's Guide to Scripting Scar


WhoCares357

2006-12-30 00:16:29

Please, Enjoy this. And please post feedback as well as ways of improving this tutorial. I made it for you and I want it to be the best it can be.

I have released my next tut. It is called "Hands On" because it is hands on (duh). Hope you like it:
Unmatched Beginner's Guide to Scripting Scar (Hands On)

Merry Christmas.
Happy New Years.
And Happy/Merry Any Other Holiday Which is Approaching.


!WARNING!
THE COMMANDS USED IN THIS TUTORIAL ARE OUTDATED.
Do not use any of the Mouse (moving or clicking) commands on Runescape. Do not use the SendKeys command on Runescape either.

The include SRL (made by the generous people on this forum) has created greatly improved commands that are undetectable by Runescape. THE INTERACTIVE COMMANDS USED IN THIS TUTORIAL (mouse movement, mouse clicking, typing) ARE NOW DETECTABLE. DO NOT USE THEM ON RUNESCAPE OR YOU WILL GET BANNED. I made a short tutorial on some of the more common SRL commands. You can find that tutorial Here.

Unmatched Beginner's Guide to Scripting SCAR
by WhoCares357


<><><><><><><><><><><><><><>
—Created by WhoCares357—
–Edited by SomeGuy357–
–Special Thanks to Kaitnieks for creating Scar and Freddy1990 for continuing it–
<><><><><><><><><><><><><><>


Table of Contents

I. Introduction
II. Requirements
–A. Equipment
–B. Personality
III. Scar 2.03
–A. Info
–B. How to Use
IV. Format
–A. Layout
–B. Procedures
–C. Colors
–D. Comments
V. Variables and Constants
VI. The Middle
–A. Functions/Commands
—-1. Wait
—-2. Keys
—-3. Color
—-4. Mouse
—-5. Bitmap
—-6. Others
–B. Random
–C. Loops/Until
VII. Finalization
–A. Includes
–B. Good Luck





+——————— [Introduction] ———————+


I have read many tutorials about Scar and even other language tutorials that all lack the essential details for true beginners. I have designed this lengthy, but efficient tutorial for the language of PASCAL&#8217;s little pal, Scar. Scar is a simple program for macroeing in a game called RuneScape. You can find the game here- http://www.runescape.com.

You don&#8217;t have to use Scar for RuneScape, but that is what it was intended for. This is just a small jumping stone to your career or interest in programming and creating software. I hope you enjoy your time in this tutorial and wish you the best of luck in your future.

By the way, if you have Scar 2.03 or later version and know how to use it, just skip the Requirements and Scar 2.03 to avoid a few extra minutes of reading.


+——————— [Introduction] ———————+




+——————— [Requirements] ———————+


–Equipment–


Hmm, let's see.

First of all you will need a functioning pc. Of course if you didn't have that, how could you be reading this?

Second thing you need is Scar version 2.03 or later. If you do not have this, download it from this URL- http://www.dylock.net/scar/.
If the location of Scar download is changed then refer to http://www.sythe.org for the new location. If that is no longer available then just search http://www.google.com.

Finally, you will need drive and must want to learn this easy language of Scar. I can not make you learn it, so you must stick with it even when it proves a little difficult.



–Personality–


One word: NEATNESS.

First thing with this is of course grammar. Especially in your comments, make sure to not abbreviate words. Also there are certain things you should capitalize and others you should leave in lower case. You will get the feeling of neatness while you look through my example codes.

Why? Well, neatness builds reputation and will help if you venture into a deeper programming language like Java, C++, or others by mending your habits right off.

+——————— [Requirements] ———————+




+———————
 ---------------------+



–Info–


Ever heard of RuneScape? Yup, that is exactly what the program Scar was made for. Scar is a compiler. A compiler is a program that transforms what you tell (code) the program to do into computer language. The computer then does what it is told to do from this code. However, what makes Scar special for RuneScape players is that the creator Kaitnieks built in some functions or commands especially for RuneScape. Scar is now widely used for macroeing (cheating) on RuneScape.



–How to Use–


Once you download and install Scar 2.03 or later version you will be forced with the question of how to use it. It is actually very simple.

Open your Scar 2.03 or later version and read the following.

First thing you will have to do is download the Includes. Press File-Download Includes and make sure all of the boxes are checked. Then press download, or overwrite. It will take a few moments to download.

Second, a few shortcuts should be learned to avoid complications once you use your scripts. For these shortcuts, you do not need to be in Scar. "Ctrl+Alt+R" Starts the script. "Ctrl+Alt+A" pauses the script. "Ctrl+Alt+S" stops the script. "Ctrl+Alt+P" solor picker. (Copies color number into Debug Box, I'll go over colors later)

The color picker is one of the most important tools in Scar. I will explain what it does in Format-Colors. I will explain how to use it here. Click on the &#8220;Color Picker&#8221; in the Scar toolbar or just press &#8220;Ctrl+Alt+P&#8221; and click on the color you want. In the lower part of Scar (Debug Box) you will see something like this.


Color Picked: 16777215 at (182, 364)

The first big number, &#8220;16777215&#8221; is the color number.
&#8220;(182, 364)&#8221; are the coordinates or location on the screen where the color was found.

Third thing that Scar requires for RuneScape is to set the Client Window. I will now explain the purpose of this. Get ready for some simple math. If you know about computer coordinates system, skip this part.

Let's take a look at your compute screen. If you did not know, your computer is made up of pixels. Pixels are like squares of color that combined, create your screen image. Each pixel is a different coordinate. Pixels also use colors. If you have studied math, you will know that coordinates use x and y.
"X" is the distance from the origin (0) horizontally (left to right) left of 0 is negative, right is positive
'Y" is the distance from the origin (0) vertically (up to down) up of 0 is positive, down is negative
This is how it would look like.

P.S. The "Y" for computer screen coordinates is reversed.(Y becomes &#8211;Y and the other way around)



_________-Y__________
————|————
————|————
————| ————
-X———-0,0———X
————|————
————| ————
————|–5, 25—-
_________Y__________


An example of a coordinate would be this.

(5, 25)

As you can see, this coordinate is 5 to the right of 0, and 25 down from 0.
In a coordinate x always goes before y.

Now how this applies to Scar.

Now, Back to your computer screen: Most computer screens now-a-days have a resolution of at least 1024x768(Highest coordinate of 1024, 768), but everyone's is different.

Now, what setting the Client Window prevents, is miss-calculating the coordinate you do something in. Instead of letting the computer coordinates be used, this tool makes the RuneScape screen become the whole computer screen for Scar. Like this.

Before Setting Client Window


0, 0------------------------------|
|----100,100--------------------|
|---| Rune---------|------------|
|---|----Scape-----|------------|
|---| ---------800,800----------|
----------------------------1024, 768

(How Scar Sees It)

After Setting Client Window

0, 0---------------|
|----Rune--------|
|-------Scape----|
|------------------|
|--------------700, 700


(How Scar Sees It)

As you see by setting the Client Window, Scar turns RuneScape window into the whole screen for itself.

The steps to setting the Client Window are the following.

1. Click and hold the circle around an x looking button at the end of the toolbar.
2. Drag it onto the RuneScape screen and release.
3. If you see a white box shape close in on the RuneScape screen then you did it correctly.
4. It is usually good to do it twice, just in case.

One last thing: the Debug Box. The Debug Box is the bottom text box on Scar. This text box is used for storing the color numbers, and all other information. It also displays the errors.

That&#8217;s all for explaining Scar my pupils. Now let&#8217;s begin the fun part: scripting.



+———————
 ---------------------+




+--------------------- [Format] ---------------------+


By now, you should have your Scar 2.03 or later version open. You should test some of the examples or/and even try to make your own to understand this better.



–Layout–


As you may have seen on multitudes of other Tutorials, the layout of Scar and even Pascal language is the following.

program NewExample;

begin

end.

As you can see, every script begins with program name (NewExample;). You should be able to guess, that this is for naming your script. This is not necessary but is accustomed to tell the users what the script is for. You will have to leave a space after &#8220;program&#8221; before writing the name of the program. To practice good habits, always write your program names as I have here. Have the first letter of each word in the name (not the &#8220;program&#8221;) capitalized.

For example do this

program NewExample;

and not this.

program Newexample;

Notice how in the first example every first letter of a new word in the name is capitalized.

In the program name, there can not be any spaces.

For example this would be wrong,

program New Example;

and this would be correct.

program NewExample;

Also in Scar every line ends with a ;. This excludes &#8220;begin&#8221;, the last &#8220;end&#8221;, and a few other bold words (Certain codes will turn bold when written in Scar) that we will go over later. This is not necessary but it will be necessary if you ever join another language of programming. Good habits to grow into will help.

I will post the first example again so you do not have to scroll.

program NewExample;

begin

end.

Ok, now to the next part. As you can guess, begin is the beginning of your instructions, while the end is the end of them. Begin, like program and end are going to be bold. Just for the sake of neatness try to never capitalize the words that become bold when you type them into Scar. Now you can see that after &#8220;end&#8221; there is a dot. This dot only applies to the last end.

In your procedure, you will most likely have more than one begin and end. Now, when you have more than one beginning and end, your end, on every other end than the last one, will change to this: end;.

Here is an example.

program NewExample;

begin

begin

end;

end.

Remember that ; is not placed after begin, the last end., and a few other codes that we will go over later.


In the following example you will see three separate begin and ends.

begin
begin
begin

end;
end;
end.

As you can see, I have aligned the &#8220;begin&#8221; and &#8220;end&#8221; with one extra space for every new begin and end. This format is not necessary, but once again neatness and consistency will help both you to edit your work easier, and the user to see what you have done.

We will learn what goes in the middle of this later.




–Procedures–


Now that you know a little of the layout in Scar scripts let&#8217;s learn something new: Procedures

A procedure is just a piece of the script that does something. This is difficult to explain, so I will be using some examples here.

First let&#8217;s look at the layout of a procedure.

program NewExample;

procedure Stay;
begin
Wait(500);
end;

begin
Stay;
end.

This is the layout. As you can see the name of the procedure is in the same format as in the program name. One thing you will notice once again, is that all lines, except for begin and the last end, end with ;. Like I said, good habits will eliminate the small errors in your future scripts.

As you can see, a procedure has its own begin and end. It can have more than one begin and end as it becomes more complex.

Now from this example you get your first glimpse of a command! &#8220;Wait(500)&#8221; is a command that tells Scar to wait 500 milliseconds. (1000 Milliseconds=1 Second) We will go through this more thoroughly later.

I will copy the example here again so you don&#8217;t have to scroll too much.

program Procedures;

procedure Stay;
begin
Wait(500);
end;

begin
Stay;
end.

Alright, now as you can see, after the procedure I have a second set of begin end. This is where it actually does things. You see, procedures aren&#8217;t used unless you tell the program to use it. It is like a part of the script written so that later you don&#8217;t have to write out the whole thing again. As in this example, the procedure &#8220;Stay&#8221; will now replace the need for you to write out &#8220;Wait(500)&#8221; every time you need it.

Let&#8217;s look at an example with two procedures, now.

This is an example:

program Procedures2;

procedure Write;
begin
Writeln('Hi, you are doing very well with this learning!');
end;

procedure Stay;
begin
Write;
Wait(500);
end;

begin
Stay;
end.
Don&#8217;t get scared!! I will explain this step by step.

As you can see, I have just added on to the last example. I have added the procedure &#8220;Write&#8221;. This is another command. &#8220;Writeln('')&#8221; is a command that writes what you put between '' in the Debug Box. By the way, the &#8220;l&#8221; in &#8220;Writeln&#8221; is &#8220;L&#8221;. I got this confused with &#8220;I&#8221; the first time I learned the command.

Once again, I wrote the procedure &#8220;Write&#8221; so that I would not have to go keep writing out Writeln('Hi, you are doing very well with this learning!') every time.

Now, you might see that I included the procedure &#8220;Write&#8221; in the procedure &#8220;Stay&#8221;. You may include procedures in other procedures when you write your own scripts. However, there is a rule to this.

Scar will not allow you to include a procedure if the procedure you want to include is below that location.

This may sound confusing, but think of it like this. In my first example of two procedures, I wrote out procedure &#8220;Write&#8221; and placed it before procedure &#8220;Stay&#8221; so that I could use it in there. If I had written the procedure &#8220;Stay&#8221; with the procedure &#8220;Write&#8221; included, and then typed the instructions for procedure &#8220;Write&#8221;, it would show up as an error.

If you are still confused here are examples of a correct and wrong way of including procedures.

Correct way.

program Procedures2;

procedure Write;
begin
Writeln('Hi, you are doing very well with this learning!');
end;

procedure Stay;
begin
Write;
Wait(500);
end;

begin
Stay;
end.

Wrong way.

program ProceduresBad2;

procedure Stay;
begin
Write;
Wait(500);
end;

procedure Write;
begin
Writeln('Hi, you are doing very well with this learning!');
end;

begin
Stay;
end.

Including procedures will be very helpful when your scripts become more and more complex. Just remember the rule.

If you still do not understand it, try to look at the examples and notice the differences.




–Colors–


From the title you may be saying, &#8220;Has this guy gone bunkers, what does this have anything to do with colors?&#8221; Well, no I&#8217;m not crazy, and Scar has everything to do with colors. Scar in itself even has a color picker! (&#8220;Ctrl+Alt+P&#8221;) If you have read my long explanation of coordinates, (Congratulations on finishing it by the way) you will notice that I included the fact that pixels store colors. Now every color has a number. Yup, that&#8217;s right. What the Color Picker does is it finds the colors number. Another surprise! Colors have numbers. (When you pick a color with scar the number will appear in the Debug Box) This number can then be used in functions/commands to search for the color and do something with it. (We will explore these functions/commands later)




–Comments–


Sometimes, while you write a script you will want to make a note or two or maybe a few dozen. Comments are used for this very reason. Along with this you can also give users information on the constants that they fill in. (We will explore this in the next chapter)

There are two ways to write a comment.

The first way is by putting // in front of the comment.
Here is an example.

program ExampleComment1; //This is the program name

begin

end.

The second way is by using {}. During this sort of comment you must not forget to set }. If you forget that, your whole script from { will become a comment.
Here is an example.

program ExampleComment2; {This is the program name}

begin

end.

Try copying these two examples to Scar. As you will see, comments turn green.


+——————— [Format] ———————+




+——————— [Variables and Constants] ———————+



–Variables and Constants–


Variables and Constants may be hard to understand until you use them.

First of all, both variables and constants come after the program name and before anything else.

This is an example:

program VarAndConst;

var

const

begin

end.

Let&#8217;s look up close at variables first. Just like constants, variables store information. However, variables differ from constants because variables can be changed throughout the whole script. (Hence the name variables [varied]) I will come back to this a little later.

There are four basic types of variables: Integer, String, Boolean, Extended.
I won't cover others, because they are of no use to you until you are more advanced.

Integer-Stores a positive or negative whole number
Extended-Stores any numbers (Including decimals)
String-Stores any characters (Mostly used for Writeln or SendKeys)
Boolean-Stores the values &#8220;True&#8221; and &#8220;False&#8221;

First, let&#8217;s learn how to include them. To include a variable you must first write var. Afterwards you can either skip a line or just start on the line below this. Now first you have to decide which variables you will need. This could be one letter or a word, but try to make it something that makes sense. Don&#8217;t put anything random. If this is hard to understand just follow my example.

This is an example:

program VariablesExample1;

var
i: Integer;
Greeting: String;
Yes: Boolean;

//Rest of the script

As you can see, I included an integer, a string, and a boolean.

Let&#8217;s look at these one by one.

First there is the integer. Now, if you aren&#8217;t too shabby at math, you will remember that integers are whole numbers. They can never have a decimal or fraction. They can also be either positive or negative. In scripting, integers are just this.

The most common integers are x and y. What these two integers most likely store are coordinates. X is for the x coordinates (First part of coordinate) and Y is for the y coordinates. (Second part of coordinate) Of course you can use other letters for this, but x and y is the most common way to go.

To use integers, you must first declare them. What this means is you have to tell the program what the integer is. For example if I had the integer &#8220;i&#8221;, I would have to tell the program what i stands for.

Here is an example:

program VariablesExample2;

var
i: Integer;

begin
i:=0;
//Rest of the script
end.

In this example, I first inserted the integer in the var section. I then declared what the integer equals in the part I wanted to use it.

Now the great thing about variables, as I have said before, is that they can be changed for different parts of your script. For example, if in one of your procedures, you want the integer &#8220;i&#8221; to equal 0 and for another procedure you want it to equal 7, you can do that!

Here is an example:

program VariablesExample3;

var
i: Integer;

procedure IntegerIsZero;
begin
i:=0;
//Rest of the procedure
end;

procedure IntegerIsSeven;
begin
i:=7;
//Rest of the procedure
end;

begin
IntegerIsZero;
IntegerIsSeven;
end.

As you can see, you can use a variable in two different places and have it stand for two different things.

Now the variable extended is used the exact same way, except that it stores mixed numbers instead of whole ones. (Numbers with decimals or fractions) As a beginner you will most likely not use until a little while longer, so just don&#8217;t worry about it for now.

Alright, now let&#8217;s look into strings. Unlike, integers, strings can store any number, letter or symbol. They are mainly used to store characters for functions like Writeln or SendKeys. Once again, since this is a variable we can change it for different parts of the script. Let&#8217;s look at an example.

This is an example.

program StringExample1;

var
Greeting: String;

procedure Say1;
begin
Greeting:='Hello';
Writeln(Greeting);
end;

procedure Say2;
begin
Greeting:='Yo!';
Writeln(Greeting);
end;

begin
Say1;
Say2;
end.

In this example, I used the string &#8220;Greeting&#8221; in two procedures. I declared Greeting as two different things. Go ahead, try this in Scar and change it up a bit.

Now-the boolean. This was the hardest variable for me to understand, and I see now that it is pretty difficult to explain. I will try my best.

As I have defined boolean in the beginning, a boolean just means true or false. Now what confused me when I first started was how to use it. However later I realized that you will almost never use booleans as variables. Once you get more advanced, you will find a use for it, but for now let&#8217;s just learn how it works.

Pascal and Scar work in this format: if, then, else.

What this format does is ask tells scar: If this is this, then do this, if it is not then do this. Here is an example to explain this a little better.

This is an example:

program ExampleIfThenElse;

var
i: Integer;

begin
i:=0;
begin
if(i=0) then
begin
Writeln('I is zero');
end else
Writeln('I is not zero');
end;
end.

This is how to use if, then, and else.

I first declared that I is zero. then I began my if, then, else sequence. I told the program: If i is zero, then write i is zero in the debug box. However if i is not zero, then write i is not zero in the debug box.

Study the layout and try to change a few things up to learn it a little better.

Now, by now you should be wondering how this applies to boolean. Well, remember that boolean stands for true or false. As I have said before, boolean in variables is mostly used just by Scar. You cannot see the boolean, but it is there.

Here is how it works. Let&#8217;s look at my script again.

This is an example.

program ExampleIfThenElse;

var
i: Integer;

begin
i:=0;
begin
if(i=0) then
begin
Writeln('I is zero');
end else
Writeln('I is not zero');
end;
end.

As you can see, if i is zero then it does something, otherwise it does something else. What boolean does is this. Scar checks if i is zero. &#8220;If&#8221; i is zero, then Scar returns the value that this is true. &#8220;Then&#8221; if &#8220;If&#8221; is true (i really is zero), then it does what you tell it after then. However, if the value of &#8220;If&#8221; returns as false (I is not zero), you tell it what to do using end else.

Remember this little fact. You do not have to use if, then, else. However, it makes your script much neater and easier to look at. Also, if you use this layout, you don&#8217;t necessarily need &#8220;end else&#8221;. If you don&#8217;t tell it what to do if the value is returned false, it just won&#8217;t do anything.

This might be hard to understand, but just don&#8217;t worry about it yet if you don&#8217;t understand it. However, you should still learn the layout of if, then, and else. Once you are more advanced, come back here and see if you can understand it.



Constants!

These babies are very useful and are very easy compared to variables. You will mainly use these for declaring colors. Just like for variables, use names that make sense. This is especially important for constants because this will mostly be used to create options for the user.

Alright, let&#8217;s explain what constants are used for first. Constants are the exact same as variables except that you cannot change them during the script. This is good for letting the user choose colors for a fighting script or text for an auto talker.

This is how to set a constant up.

This is an example.

program ExampleConstant1;

const
GroundColor= 0;//Set the color of the ground here
TreeColor= 452789;//Set the color of the tree here

//Rest of the script

Constants are declared as soon as they are written.

Now let&#8217;s look at a new function for finding colors and use a constant for the color.

This is an example.

program ExampleConstant2;

var
x,y: Integer;

const
FishColor= 19245;//Set the color of the fish

begin
if(FindColor(x,y,FishColor,0,0,600,600)) then
begin
Writeln('Found Fish');
end else
Writeln('Did not find Fish');
end.

Let&#8217;s look at this step by step. You already know about the program part. Look at the variables I have declared. I have declared x and y as integers. (Whole numbers) You will see how I use them later. Now as you should already know, I have declared the FishColor constant in the beginning of the script. Now I started the script with the format of if, then, else.

You should already understand this. If you do not, you should look back and study it a bit. Alright, now I will explain the procedure, &#8220;FindColor&#8221; quickly. First think you will notice, is the x and y. Now, I have declared these integers in the beginning for the reason of using them in this function. The &#8220;x,y&#8221; are just there to fill in the coordinates where Scar finds the color. The &#8220;FishColor&#8221; is the constant that we have set earlier. Instead of FishColor you could have just wrote the color number. The last part, &#8220;0,0,600,600&#8221; tells Scar from where, upper left, to where, lower right, to search for this color.

In this way, I transferred the color &#8220;FishColor&#8221; into the function.

Ok, now once you&#8217;ve mastered this, let&#8217;s move on. You know how to use constants to transfer colors, now let&#8217;s look at how to transfer booleans and strings. These are both very easy, and you should understand them from this example.

This is an example.

program ExampleConstants3;

const
ShallWeWrite=True;//True to Type, False not to Type
Write='Hi';

begin
if(ShallWeWrite=True) then
begin
Writeln(Write);
end;
end.

In this script we have used both a boolean and a string as a constant. We used boolean by asking the user to write True if he/she wants the program to write and then we asked what to write.

That&#8217;s pretty much all for constants. Constants are very fun when you start including options with True and False.

Have Fun!


+——————— [Variables and Constants] ———————+




+——————— [The Middle] ———————+


–Functions/Commands–




If you have gotten this far, then I will most certainly congratulate you because you just came to the center of Scar. These commands all came out with Scar's first release. They are pretty old (Especially functions like MoveMouse, ClickMouse, and SendKeys) Includes (you will learn in next chapter) are used to produce newer, undetectable functions. You can find the basic ones at http://www.villavu.com/forum/showthread.php?t=6366. For now, just learn these old ones for practice.



<Wait>


This is an example:

Wait(1000);

This command, though very simple, is essential if you wish to auto in RuneScape or most other games. What this function does is it waits the number of milliseconds you designate it. If this stood by itself, then it would not be very useful. However, there is a randomizer that makes this function more human.

This is an example:

Wait(1000+random(200));

As you see here, I have added &#8220;+random(200)&#8221;. What this does, is instead of always waiting 1000 milliseconds (Which is very noticeable) It waits a random of 200 extra random milliseconds. With this, the function could wait 1025 milliseconds or 1167 milliseconds.

We will explore the randomizer option a bit later.

You must remember that &#8220;1000miliseconds = 1second&#8221;.



<Keys>


This is an example:

program TypeExample1;

begin
Writeln('Hi');
Wait(1000+random(100));
SendKeys('Hello');
end.

Here are two of the functions to type.

The first is &#8220;Writeln&#8221;. (&#8221;l&#8221; is &#8220;L&#8221; not &#8220;i&#8221;) This function types what you insert between &#8220;('')&#8221; in the Debug Box. (lower screen of Scar) This function is used to display the script user with information like how long the script has been running. We will learn to do this in the &#8220;Other&#8221; section of this tutorial.

Next we have &#8220;Wait&#8221;. Refer to the above function description if you have not yet.

Finally we have &#8220;SendKeys&#8221;. This function will serve you in your first few scripts where you will probably create an auto-talker.

The function types whatever you place between &#8220;('')&#8221; into the text box you are currently focused on. With Scar, you may have to set the Client Window on the text box.

Now you may wonder how you make the function press enter. This is very simple.

This is an example:

program TypeExample2;

begin
SendKeys('Hello'+chr(13));
end.

As you can guess, &#8220;chr(13)&#8221; represents the key &#8220;enter&#8221;.



<Color>

This is an example:

program FindColorExample1;

var
x,y: Integer;

begin
FindColor(x,y,293419,577,7,727,163);
end.

Oh, don&#8217;t get scared now. Let&#8217;s take this step by step.

This function finds the color that you tell it to find (&#8220;293419&#8221; in this example) and saves the place where it found the color in &#8220;x,y&#8221;.

The &#8220;x,y&#8221; in the function are just empty integers that are waiting to be filled with the location in which the color is. To use this function you would have to tell the program that x and y are integers as I have done at &#8220;x,y: Integer;&#8221;.

Next we have the color number. (293419) The color number can be replaced by a constant as you have learned in your previous lessons.

Finally there is &#8220;577,7,727,163&#8221;. This goes all the way back to the first lesson. This part of the function tells Scar where to look for the color. &#8220;577,7&#8221; are the coordinates for the top left corner and &#8220;727,163&#8221; are coordinates for the bottom right corner of the square in which Scar looks for the color.

&#8220;FindColor&#8221; looks for the color from the top left corner to the lower right corner of the square you tell it to look in. To understand this, let&#8217;s take a look at this example.

Let&#8217;s say that you want to look for color &#8220;242&#8221; in &#8220;0,0,100,100&#8221;. Now there are two objects in between those coordinates.

The first object had the color 242 and is at the coordinates 25,30. The second object had the same color of 242, but was at the coordinates 75,80. Which object do you think Scar will go to first? It will go to the first object, because it searches from the top left corner to the bottom right corner.

Here is another function to do with color.

This is an example:

program FindColorExample2;

var
x,y: Integer;

begin
FindColorSpiral(x,y,293419,577,7,727,163);
end.

This function is the same as FindColor, except that it is used to find colors that take up a lot of space.



<Mouse>


This is an example:

program MoveMouseExample1;

begin
MoveMouse(25,250);
Wait(100);
ClickMouse(25,250,true);
end.

This example moves the mouse to the coordinates 25,250 and then clicks there.

&#8220;MoveMouse&#8221; moves the mouse to the coordinates you place between &#8220;()&#8221;.

Refer to a previous lesson for the &#8220;Wait&#8221; function.

&#8220;ClickMouse&#8221; clicks the mouse at the coordinates you place between &#8220;()&#8221;. The &#8220;true&#8221; stands for clicking the left mouse button, while if you put &#8220;false&#8221; in that position Scar will right-click.

true = left mouse button
false = right mouse button

This is an example:

program MoveMouseExample2;

begin
MoveMouse(25+random(2),250-random(20));
end.

Here you see that I have added randoms to the coordinates. Yup! You can do that.

&#8220;25+random(2)&#8221; will tell Scar to move the mouse anywhere from 25-27 for the coordinate x and &#8220;250-random(20)&#8221; will tell Scar to move the mouse anywhere from 230-250 for the y coordinate.


Let&#8217;s explore some other forms of the function &#8220;MoveMouse&#8221;.

This is an example:

program MoveMouseExample3;

begin
MoveMouseSmooth(25,250);
end.

This function works the same as &#8220;MoveMouse&#8221; except that it moves it slower and softer. Experiment with it to see the difference.

This is an example:

program MoveMouseExample4;

begin
MoveMouseSmoothEx(25,250+random(0),20,40,45,25,20);
end.

This function is the same as &#8220;MoveMouseSmooth&#8221; except that it moves the mouse more humanlike. The last part that starts with &#8220;+random&#8221; are options for humanlike response. Press F1 in Scar and scroll down to MoveMouseSmoothEx to see the options for this.


Let&#8217;s explore a few other forms of the function &#8220;ClickMouse&#8221;

This is an example:

program ClickMouseExample1;

begin
HoldMouse(25,250,true);
Wait(100);
ReleaseMouse(25,250,true);
end.

&#8220;HoldMouse&#8221; clicks and holds the mouse as clicked. This is good if you want to highlight something with the mouse. &#8220;true&#8221; stands for the left mouse button. &#8220;false&#8221; in that position would tell Scar to right click and hold.

Refer to a previous lesson for description of &#8220;Wait&#8221; function.

&#8220;ReleaseMouse&#8221; works alongside &#8220;HoldMouse&#8221; and releases the mouse from being held as clicked. &#8220;true&#8221; acts the same as in &#8220;ClickMose&#8221; and &#8220;HoldMouse&#8221; functions.


Now let&#8217;s combine our knowledge and use a color function with a mouse function.

This is an example:

program CombineExample1;

var
x,y: Integer;

const
MonsterColor = 293491;

begin
if(FindColor(x,y,MonsterColor,0,0,100,100)) then
begin
MoveMouseSmoothEx(x,y +random(0),20,40,45,25,20);
Wait(100+random(10));
ClickMouse(x,y,true);
end;
end.

Look over this example carefully. In this example, Scar does the following: If it finds the &#8220;MonsterColor&#8221; then it will move the mouse to the coordinates of where it finds the color and then click at those coordinates.

As you have learned in the description of &#8220;FindColor&#8221;, x and y in the function store the coordinates in which the color is found. If the color is found, the coordinates are stored in x,y and we can use them to tell Scar where to click.



<Bitmap>


If you do not know, bitmap is an image type. Sometimes in a script you want the compiler (Scar in this case) to find an image instead of a color. That is what you would use the following for.

If you have the image of the object you wish to find, you must convert it to bitmap file type. Search http://www.google.com to find a free program that does this for you.

Next, Scar requires you to place the image on a black background. Thus, only the object you wish to find is looked for and not the background as well. Open paint or any other image editing tool and paint the background black. As well as this, make the object centered so that it is in the center of the black background. Also, make the image as small as possible while still capturing your whole object.

Now save it and we will continue learning how to use it.

Ok, now open Scar and follow these steps.

On top of the there is a toolbar with &#8220;File, Edit, View, etc.&#8221;

1. Click Script and then click on Picture to String.
2. A window will pop up
3. Click Open
4. Open the bitmap you want to use
5. Click Paste
6. Click OK
7. Look on the bottom in the Debug Box and you will see a code something like-


Fish := BitmapFromString(8, 11, 'z78DA33302007B801C16015C7C5A6A' +
'77A62F4E252894CD21F0000D64369E1');

-Except it will most likely be much longer.
&#8220;Fish&#8221; in this example is the name of the bitmap.

8. Now we will need to create a variable for the bitmap.

This is an example:

program BitmapExample1;

var
Fish: Integer;

begin
end.

As you see, you must declare the bitmap as an integer before using it.

9.Now we must load the bitmap at the beginning of the script.
This is an example:

program BitmapExample2;

var
Fish: Integer;

begin
Fish := BitmapFromString(8, 11, 'z78DA33302007B801C16015C7C5A6A' +
'77A62F4E252894CD21F0000D64369E1');
end.
That is how you. You don&#8217;t necessarily have to do this in the beginning. You could load the bitmap right before you use it. If you do, however, wish to just load all your bitmaps in the beginning, it is better to create a procedure with all the bitmaps loaded in it.

This is an example:

program BitmapExample3;

var
Fish: Integer;

procedure LoadBmps;
begin
Fish := BitmapFromString(8, 11, 'z78DA33302007B801C16015C7C5A6A' +
'77A62F4E252894CD21F0000D64369E1');
end;

begin
LoadBmps;
//Do whatever
end.

As you see, I loaded the bitmap in the procedure and then just included the procedure in the final part of the script.

The function &#8220;FreeBitmap&#8221; releases the loaded bitmap.

This is an example:

program BitmapExample4;

var
Fish: Integer;

procedure LoadBmps;
begin
Fish := BitmapFromString(8, 11, 'z78DA33302007B801C16015C7C5A6A' +
'77A62F4E252894CD21F0000D64369E1');
end;

procedure FreeBmps;
begin
FreeBitmap(Fish);
end;

begin
LoadBmps;
//Do whatever
FreeBmps;
end.

You see, the trouble with bitmap is that it uses up memory. On a low memory computer, this will slow it down greatly. Try avoiding using bitmaps as much as possible.

Alright, now that you know how to load a bitmap, let&#8217;s learn how to use it.

This is an example:

program BitmapExample5;

var
Fish: Integer;
x,y: Integer;

procedure LoadBmps;
begin
Fish := BitmapFromString(8, 11, 'z78DA33302007B801C16015C7C5A6A' +
'77A62F4E252894CD21F0000D64369E1');
end;

procedure UseBitmap;
begin
if(FindBitmap(Fish,x,y)) then
begin
MoveMouseSmoothEx(x,y+random(0),20,40,45,25,20);
Wait(1000+random(100));
ClickMouse(x,y,true);
end;
end;

procedure FreeBmps;
begin
FreeBitmap(Fish);
end;

begin
LoadBmps;
UseBitmap;
FreeBmps;
end.

As you see, &#8220;FindBitmap&#8221; is the function to find the bitmap on the whole screen. This function searches the whole screen. &#8220;Fish&#8221; in the example is the bitmap name that you want to find. &#8220;x,y&#8221; is where the coordinates of the bitmap will be stored.

As in FindColor, FindBitmap looks from the top left corner to the bottom right corner.

The other version of &#8220;FindBitmap&#8221; is &#8220;FindBitmapIn&#8221;. &#8220;FindBitmapIn&#8221; is the same as &#8220;FindBitmap&#8221; except that you set the box where Scar looks in.

This is an example:

program BitmapExample6;

var
Fish: Integer;
x,y: Integer;

procedure LoadBmps;
begin
Fish := BitmapFromString(8, 11, 'z78DA33302007B801C16015C7C5A6A' +
'77A62F4E252894CD21F0000D64369E1');
end;

procedure UseBitmap;
begin
if(FindBitmapIn(Fish,x,y,0,0,100,100)) then
begin
MoveMouseSmoothEx(x,y+random(0),20,40,45,25,20);
Wait(1000+random(100));
ClickMouse(x,y,true);
end;
end.

procedure FreeBmps;
begin
FreeBitmap(Fish);
end;

begin
LoadBmps;
UseBitmap;
FreeBmps;
end.

As you see, FindBitmapIn just adds the last part. The coordinates 0,0 to 100,100 is where Scar will look for the bitmap &#8220;Fish&#8221;.


<Other>


This is an example:

program DebugExample1;

begin
ClearDebug;
end.

&#8220;ClearDebug&#8221; clears the debug box on the bottom of Scar.

This is an example:

program IntToStrExample1;

var
i: Integer;

begin
i:=0;
Writeln('i is ' +IntToStr(i) +'.');
end.

&#8220;IntToStr&#8221; takes the integer you put between &#8220;()&#8221; and places its value into what you want to type out. This is good in creating progress reports.



–Random–


Randomization is essential to RuneScape and many other game cheating. Randomizing wait times and clicking location makes the macro seem more human.

Even if you intend to spend your time scripting for things other than macroeing, randomization will help you.

This how to randomize a &#8220;Wait&#8221; function:

Wait(1000+random(100));

Scar will now wait anywhere from 1000 to 1100 seconds.

This is how to randomize &#8220;MoveMouse&#8221; function:

MoveMouse(25+random(2),35-random(10));

Scar will now move the mouse anywhere from 25 to 27 for x coordinate and 25 to 35 for y coordinate.

This is how to randomize an integer:

program RandomIntegerExample;

var
i: Integer;

begin
i:=random(5);
Writeln('i is ' +IntToStr(i) +'.');
end.

Try this example out. You will see that i will now vary and randomly be anywhere from 0 to 4. The thing you have to remember about randomizing integers is that it will be 0 to the number before what you put. So if you put &#8220;i:=random(10);&#8221; then i could be 0 to 9, but it can not be 10.



–Loops/Until–


Have you ever wondered, &#8220;How does the script keep going after it&#8217;s done something once?&#8221;

This is what programmers call &#8220;loops&#8221;. If someone refers to a loop it means that the program starts from a position where you tell it to start again from. Let&#8217;s see how to set loops up.

This is an example:

program LoopsExample1;

var
i: Integer;

begin
i:= 0;
repeat
i:= i + 1;
Writeln('This will go on 10 times.');
until(i >= 10);
end.

As you can see, first we state that i is 0. Then we type repeat. Then we tell Scar that every time a loop is done, it will add 1 to i. After this we tell Scar what actions to perform. Finally, you place &#8220;until&#8221; and between &#8220;()&#8221;, you write &#8220;i>=&#8221; and the number of loops you want Scar to go through. (How many times you want it to do what you put between repeat and until)

Along with this, you can make Scar repeat forever. (until you press stop or press ctrl+alt+s)
To do this follow this example:

program LoopsExample2;

begin
repeat
Writeln('This will go on forever.');
until(false);
end.

As you can see, to tell Scar to repeat forever, all you need is "repeat" at the beginning and "until(false)" at the end.

You can also use this repeat/until process to tell Scar to stop when something happens.

This is an example:

program LoopsExample3;

var
i,x,y: Integer;

begin
i:= 0;
repeat
i:= i + 1;
if(FindColor(x,y,10023,0,0,100,100)) then
begin
MoveMouseSmoothEx(x,y+random(0),20,40,45,25,20);
end;
until(not(FindColor(x,y,10023,0,0,100,100)));
end.

As you see here, I told Scar to find the color and move the mouse over it. It will keep doing this until it does not find the color.


+——————— [The Middle] ———————+




+——————— [Finalization] ———————+


–Includes–


Remember in the beginning when we were talking about procedures? Well, this is the reason why. &#8220;Includes&#8221; is a way to use these procedures in other scripts so you don&#8217;t have to rewrite them.
Follow this layout to use includes:

program IncludesExample;

{.include Miner.scar}

//rest of the scripts

One thing you must know, is that to use includes, they must be in either the same folder as the script you&#8217;re creating or the &#8220;Includes&#8221; folder in the Scar directory. (Where you installed Scar to)

You do not need to have them there, but if you do not then you have to write out the whole destination after &#8220;.include &#8220;.

All includes must go after program and before anything else.

The most common of all includes is SRL. This SRL was created by expert programmers to make your work easier. Includes will help you greatly when you become more experienced with Scar, but for now just ignore them.



–Good Luck–


Now that you have read this whole tutorial, you must be tired. Rest and then try to make a few simple scripts using the functions I provided for you. If you want to dig deeper into functions (I have not explained every single function) then press F1 while in Scar.

I hope this tutorial has helped you. If you find anything confusing or wrong please tell me by emailing me at [email]WhoCares_357@yahoo.com[/email] or posting in a thread if this tutorial is in one. If you want some help I might also be able to assist you. I am sorry if I delay in answering you, for I may be busy at the time. Thank you and good luck in your scripting career.


+——————— [Finalization] ———————+

===============================================================

syberium

2007-01-01 00:51:22

thx for this script! it really helped me out! very cleanly written and explains things well. nice job!

WhoCares357

2007-01-01 13:03:27

Thank You.

japman

2007-01-03 11:01:47

this was a great help to me thank you

Shot_j00

2007-01-06 12:44:25

Thank you! You just boosted my Knowledge from .0005% to 20%! This TUT is awesome very detailed ( The way i like tuts ) and helps out alot!!

Shot_j00

oliver1205

2007-01-06 17:26:51

awesome tut i read it all in one sitting. i understand scar that much more!

WhoCares357

2007-01-06 21:44:05

Thanks for feedback guys. I fixed a few errors in the script examples.

Wanted

2007-01-18 23:07:06

Thank you soo much for making this [TUT]!

It helped clear up alot of problems I was having.

I highly reccomend this for anyone who wants to learn to script.

Mad Cow

2007-01-25 04:41:26

Very nice, well structured and very informative.

10/10, keep up the nice work

-Mad Cow

WT-Fakawi

2007-01-25 05:44:10

stickyfied.

d3hm3d

2007-01-26 08:44:38

ty for this i managed to build my first script its in rs non srl scripts section!!!!

d3hm3d

2007-01-26 08:50:46

is there any srl tutorials???

WhoCares357

2007-01-26 17:33:35

Idk, I would like to look at one myself. If you find one, please pm me.

Pentti

2007-01-27 03:52:23

I really like this tutoial, very easy to understand for people who are learning scar scriptin. Good work.

Bam Bam

2007-01-27 15:56:28

Wow, this is big! It needs chapters :S

WhoCares357

2007-01-28 22:28:17

Thanks for all the feedback guys. I made this guide for the public, and I am glad that the majority appreciate it.

Mjordan

2007-01-29 14:50:20

hey thanks man this helped me tons!

b4d1

2007-01-30 16:40:49

ty its very helpful

thiefmn6092

2007-01-30 21:54:29

Great Tutorial! you++

wstephen4

2007-02-01 17:57:50

Thanks for the information, I will hopefully try to use it to a good macro (is that an oxymoron?)

WhoCares357

2007-02-01 18:52:54

From: wstephen4
Thanks for the information, I will hopefully try to use it to a good macro (is that an oxymoron?)


Lol, it kinda is since macros are against the rules.

Godliked

2007-02-03 01:01:58

This tutorial is 100% useful, it really answered ALL my questions… every time I was like "what about when this happens" you jumped right onto it.

you'll be seeing some newbie scripts soon.

its not the first time scripting in general but this is the most complex scripting i've ever encountered. Although it resembles alot like programming.

thanks again!

WhoCares357

2007-02-03 01:57:24

Glad I could help.

Mithril Fish

2007-02-03 09:55:10

As you can see, this coordinate is 5 to the right of 0, and 25 up from 0.


would that be down? instead of up?

nice guide

WhoCares357

2007-02-03 10:51:57

From: Mithril Fish
would that be down? instead of up?

nice guide


Thanks.(I fixed it) I'm always looking for little mistakes :). If you see anymore please tell.

madc0wman

2007-02-03 11:28:33

Man this is awesome! Thanks man! 10/10!

haxal

2007-02-04 19:46:55

ppl plz help i got problem with scar cordonates
this is my simple script


program New;
begin
clickmouse(256,254,true);
end.

it always go in right down corner :duh: plz ppl help idk what to do

haxal

2007-02-04 23:01:33

ohh forget i just re instal all and start scripting =)

Hamish

2007-02-05 10:28:36

Wow,This is great the only bit I dont understand is "Variables And Constants"

WhoCares357

2007-02-05 18:01:20

What's you msn? I'll help you a bit with that.

Dunceiam

2007-02-08 23:49:17

This script was so helpful…Except I started getting lost when we started talking about bitmaps and such…Or maybe because it's 12:00 a.m. and it took me 2 hours to read…=p

Otherwise, GREAT guide.:spot:

-Dunceiam

Boreas

2007-02-08 23:57:11

Dankness did you not hide this url from google, or are those morons from inside the cheating community?

WT-Fakawi

2007-02-09 02:16:32

[offtopic]banned both of 'm. [/offtopic]

Sh33pzer

2007-02-09 13:07:25

this is awesome thankyou. i am new and this will help alot ty :(h):

WhoCares357

2007-02-09 17:17:10

From: Boreas
Dankness did you not hide this url from google, or are those morons from inside the cheating community?


How do I hide it on google?

Dunceiam

2007-02-09 17:21:29

WhoCares357, are you going to continue this tutorial to include anti-randoms, etc. With some of the more complex stuff? You could create a guide going from the simplest of simple, to the hardest of hard? You've already got the simples down. =p
Anyway, as I said before, great guide, and I've re-read it 3 times to make sure I soaked everything up…:spongebob:

-Dunceiam

Edit:Would Adobe Photoshop serve as a bitmap converter?

WhoCares357

2007-02-12 18:46:01

Adobe might, but there are many good freeware that do that for you. (download.com)

BTW, I'm working on another tutorial. This one will be for noobs also (sorry to disappoint all you who need to learn anti-randoms). This guide will serve as a kind of reference to the other one.

It will come out in a week or so (I hope).

rkroxpunk

2007-02-18 02:34:13

great stuff certainly boosted my knowledge. but i don't really get the whole co ordinates thing. and i can't get it to actually do anything lmao. it just says succesfully compiled and executed etc.
Yeah i'm super noob could so yeah could you just help me out? thx

Nutsy

2007-02-18 07:05:46

Wow this is exactly wht i have been looking for, I will have to go over it a few times but every time i try to learn scar scripting i find it so hard, Hopefully this will clear things up for me!

Thank You!

Zeh Progage

2007-02-19 02:27:34

Nice tutorial, I read it all and it was great :spot: Write more tutorials I wanna learn more! :) You write so good and it's legible, I soaked it up like a dry sponge on water!

TheSantaMan

2007-02-22 21:10:19

i got one question. If i'm trying to find a color in a box then how do i make it not say invalid number of parimeters?

Pwnt by Pwnt

2007-02-22 22:44:44

hey…how do u make it move the mouse then click a couple times then move the mouse again and keep on moving? ty

EDIT: i figured it out :] expect a tutorial island runner from me :]

btw tysm for the tut really nice :]

JAD

2007-02-23 15:52:25

sorry whocares357 for not posting sooner. i read this post 8 days ago, and since then I have been determined to learn scripting devoting 3-4 hours a day to reading tuts and learning SRL functions/procedures. I forgot to say thanks for helping me get started in scripting :) this in my opinion is the best beginner guide ever. +rep
oh and i thought I'd let you know, because of you I have my very first power miner coming out, its an uber script and i hope a lot of people like it :) i put you in the thanks section of it.

Q31

2007-02-23 16:49:53

very nicely done… will try and make something up when i get a bit of time.

thank you very much

WhoCares357

2007-02-23 17:30:55

From: JAD
sorry whocares357 for not posting sooner. i read this post 8 days ago, and since then I have been determined to learn scripting devoting 3-4 hours a day to reading tuts and learning SRL functions/procedures. I forgot to say thanks for helping me get started in scripting :) this in my opinion is the best beginner guide ever. +rep
oh and i thought I'd let you know, because of you I have my very first power miner coming out, its an uber script and i hope a lot of people like it :) i put you in the thanks section of it.


I'm glad I could help someone become a scripter. I wish you luck.

From: jesus45
i got one question. If i'm trying to find a color in a box then how do i make it not say invalid number of parimeters?


Make sure that you put the correct stuff in the right place. It has to be FindColor(x,y: the coordinates to store location of found color, 2834286:The color number, x1,y1,x2,y2: the coordinates to search within);

extreme300

2007-02-24 16:20:06

thanks for the awsome tutorial, its helped me out alot, :)

srl89

2007-02-26 21:30:43

Very nice tutorial for beginners. It helped me alot. I took a Pascal course in 10th grade, I forgot most everything and this really helped me brush up on the language cause i want to learn to script. You explained things better than my teacher lol :). The good news is its all coming back to me :D

JAD

2007-02-27 14:16:58

From: srl89
Very nice tutorial for beginners. It helped me alot. I took a Pascal course in 10th grade, I forgot most everything and this really helped me brush up on the language cause i want to learn to script. You explained things better than my teacher lol :). The good news is its all coming back to me :D


is pascal very similar to scar? i thought they had certain similarities, but i didn't think they were that similar :p most of the functions/procedures we use in scar they don't have in pascal do they?

WhoCares357

2007-02-27 17:09:35

From: JAD
is pascal very similar to scar? i thought they had certain similarities, but i didn't think they were that similar :p most of the functions/procedures we use in scar they don't have in pascal do they?


I'm doing a bunch of pascal right now and it's kinda similar. The function names are different (Delay is Wait), but other things are the same like writeln.

Variables are a bit different types. Instead of extended there is real type for instance.

Pascal uses "includes" also. They call them units. There's some good tutorials on google. Check it out.

JAD

2007-02-27 17:14:55

From: WhoCares357
I'm doing a bunch of pascal right now and it's kinda similar. The function names are different (Delay is Wait), but other things are the same like writeln.

Variables are a bit different types. Instead of extended there is real type for instance.

Pascal uses "includes" also. They call them units. There's some good tutorials on google. Check it out.


hmm.. interesting. i may have to check that out :) what is pascal used for now-a-days though? its one of the first programming languages ever from what i understand.

WhoCares357

2007-02-27 17:24:41

From: JAD
hmm.. interesting. i may have to check that out :) what is pascal used for now-a-days though? its one of the first programming languages ever from what i understand.


It is pretty old lol. I don't know any modern software made with it (Except for Scar of course) but it's much easier than modern languages. I recommend learning it to unerstand basic stuff about programming (loops, variables, types, etc.)

JAD

2007-02-27 18:03:06

From: WhoCares357
It is pretty old lol. I don't know any modern software made with it (Except for Scar of course) but it's much easier than modern languages. I recommend learning it to unerstand basic stuff about programming (loops, variables, types, etc.)


Well i do know intermediate HTML, some JAVA, SQL, ADO, ASP a little flash, and i kind of know pascal from scar i guess :p so pascal maybe easy for me to learn for me just because I've studied so many other languages.
Do you have MSN? if so could you pm it to me/post it here?

WhoCares357

2007-02-27 18:43:54

[email]andrey0ll@yahoo.com[/email]

It's msn not yahoo.

Macro manning

2007-02-27 22:24:22

It was heplful thanks.

qweqwe

2007-03-01 03:39:40

obviously the best guide ive ever seen, but i would have prefered more talk about coords as i understand that it is like math, but not how u get the excact coords but overall GREat guide

THanks

WhoCares357

2007-03-01 06:58:33

From: qweqwe
obviously the best guide ive ever seen, but i would have prefered more talk about coords as i understand that it is like math, but not how u get the excact coords but overall GREat guide

THanks


You would use the little pen in the scar toolbar to get the exact coord. Click the pen, click where you want to get the coord, and look on the botttom of scar. It will show the color number and the coord of where you clicked.

purple37

2007-03-05 00:43:26

wow this was WAY easier than i thought
maybe because i know pretty good delphi so i knew how things worked but all the other things that are doable in scar wil help me make a script
now, i just have to find where do learn how to do radial walking

runer

2007-03-07 20:27:13

great guide, this will defiately come in handy when i write my first script! :)

ive read 4 guides, and by far this one has helped me the most

ammo2006

2007-03-09 11:40:36

Thx alot, i read the whole thing, I was completly new to scripting, and it was verry easy to understand(except some parts)
I now know the basics to scripting :) thx alot

bertanu

2007-03-10 11:01:24

.

Smartzkid

2007-03-10 11:03:58

Wow. This forum has been invaded by adbots.

SonOfSheep

2007-03-10 12:43:13

From: Smartzkid
Wow. This forum has been invaded by adbots.


same thing happened to my website. i get way too many page views from bots. They started posting loads of comments like that.

WhoCares357

2007-03-12 09:58:17

From: Smartzkid
Wow. This forum has been invaded by adbots.


Yes, very annoying. (I'm back from weekend vacation ;) )

psycomunky

2007-03-16 22:35:00

i was trying out the auto-miner and this popped up..

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

i enterd in my character info and everything else but this is troubling me. help anyone?:eek: :duh:

Dunceiam

2007-03-17 00:10:34

You need to download SRL…

-Dunceiam

skullbr00d

2007-03-17 10:01:22

Wow man thanks a lot I am really good at some programming languages, so I am used to this stuff, but I never found how to work with SCAR. Tried your tutorial, too perfect, it helped me a lot! I took your fish color example and followed your tutorial, improving it. Now it's a Hopeless Creature finder (I was doing A soul's bane while learning, lol), and if it finds a creature your RuneScape character will say funny stuff like "Hehe! I fell no hopelessness around me!", if he doesn't find any Hopeless Creatures LOL :D Thanks once more!

WhoCares357

2007-03-17 10:41:12

Glad it helped.

n3ss3s

2007-03-20 13:55:36

Really good tut.
I dont know are these things too hard for a basic tutorial, but
could you tell me what are TPoints, how to use them , what are they.
My guess is that TPoints are coordinates example x,y.

WhoCares357

2007-03-20 17:09:52

From: n3ss3s
Really good tut.
I dont know are these things too hard for a basic tutorial, but
could you tell me what are TPoints, how to use them , what are they.
My guess is that TPoints are coordinates example x,y.


Don't know myself, sorry. :/

HanTu

2007-03-23 04:17:36

I've read the whole of it. Thank u very much for writing everything out. :)

Ashur2Good

2007-03-26 08:23:04

This is the best tutorial ever for scripting, anyone can understand it, its so easy to read and understand bro out of 10 i give 1000!


:D best tutorial on scripts eva!:spot:

WhoCares357

2007-03-26 20:01:37

^Glad you noticed. BTW guys, I have released my next tut. It is called hands on because its hands on (duh). Hope you like it:

http://www.villavu.com/forum/showthread.php?t=7581

anti

2007-04-06 00:00:25

wow. thanks, i can really use this

wobbii

2007-04-09 15:32:10

nice tut man, helped me out lots, im learning as i go. ill go check out your new tut soon and comment

Zorlin

2007-04-10 03:04:47

So you are Who Cares from sythe?
I remember you.
As far as I can remember, you were a damn good member of sythe :P

Deathguppy

2007-04-10 05:19:55

Very nice tutorial helped me alot :D

Except the part about bitmaps… Very Confusing and I mean very confusing and still confused :confused: :confused: :confused: :confused: See

WhoCares357

2007-04-10 18:27:44

From: Zorlin
So you are Who Cares from sythe?
I remember you.
As far as I can remember, you were a damn good member of sythe :P


Still am. :)

monkeyboy_2006

2007-04-11 19:17:43

I've been insanely busy with school for so long, and I really wanted to learn to SCAR script, but I never got 'round to it. This tutorial is very helpful, and I couldn't stop reading, so I finished all at once. It really helps a lot; it helped me understand things I could never figure out before. Thanks a bunch!

Rezoh

2007-04-11 21:50:44

Thanks man, really helped me with my scripts.

soupnatizzle

2007-04-16 02:08:53

great stuff bud.

i am fluent in visual basic and this tutorial really helped me connect the two languages.

:) thanks a bunch

MylesMadness

2007-04-17 10:59:50

This was a great [tut]. I might get working on a auto now.

archerdv

2007-04-18 11:22:59

whoa thanks you this is exactly what i was looking for. you are great!

jahiti

2007-04-23 15:45:38

Thanks from this but now i have to go sleep im tired and clock is 22.45 :)

NewToAutoing

2007-04-23 17:52:07

Awesome guide, it's helping me a lot. I noticed an error though (h)

Where you said


program RandomIntegerExample;

var
i: Integer;

begin
i=random(5);
Writeln('i is ' +IntToStr(i) +'.');
end.

It should be


program RandomIntegerExample;

var
i:= Integer; // Here's where the error is. You need to put a "="

begin
i=random(5);
Writeln('i is ' +IntToStr(i) +'.');
end.

That's all i noticed. Gonna go finish reading now :D

Edit: Yeah you're right, i dunno why i thought that. From what i remember it got an error, and then when i put that in it worked, but i dunno. Doesn't matter though =/

Lalaji

2007-04-23 19:45:29

Nice dude!! this was a big help

thank you very much

EDIT :: new to autoing, actully in var you dont need the "=". You would need the "=" in the "i:= randon(5)" part.

WhoCares357

2007-04-23 21:35:21

Thanks for the correction, guys. Will fix right away.

slayerkiller13

2007-04-24 14:44:18

nice guide tyvm was my first guide that i learn about scar scripting from :D

blue steel

2007-04-25 11:49:08

Thank you very much I am just beginning and it has helped me out lots the only this is i have a short attention span and i did this in 1 sitting so i dont know how much i will remeber might read through it 2-3more times then move on to the next. Try to write a auto talker

Dipped_in_Pwn_Sauce

2007-04-25 21:23:31

Oh yeah, i will most defienatly start Scripting now. And thanks to this guide things will go 25x Easier, Thx bro. =)


Woot

Dunceiam

2007-04-28 22:19:48

Hehe, thanks a lot man. I just made a script which deleted 1317 layers on ImageReady. (I was trying to make a huge animation, but I animated it too quickly, so I wanted it deleted.) Got it deleting 1 layer every milli-second which was a ton faster then me clicking 1317 times myself :).

(Yes, this is coming from a person with 500 posts, but I never have the time to learn SCAR 'til now :))

-Dunceiam

clawzofgod

2007-04-29 12:24:50

its so detailed i got half way through then needed to take a break.
Thanks alot.

Maxine

2007-05-05 16:35:52

now im a bit less noobie in scripting:)
thanks!!

Tazzie 02

2007-05-06 04:41:05

Thanx!
Helped me heaps. Went from knowing nothing 2 something!

Tazzie

Inf456

2007-05-08 20:30:29

Very nice tut. 10/10

Robbiej

2007-05-12 15:37:20

Ehm… I can't pick new colors! I did… but now i can't do it anymore, it's like
i'm at SCAR, i press Ctrl + P
now i can choose a colour, but my runescape minimized right after i pressed ctrl+p

WhoCares357

2007-05-12 15:52:37

Try have scar to the side and RuneScape in the background.

Robbiej

2007-05-12 15:54:34

My firefox minimizes…

BTW: i forgot to say… Great tut!

EDIT: Problem solved

muffinman177

2007-05-20 12:27:09

This really helped me… thx:)

venomhead

2007-05-21 18:23:11

Thank you, very nice tut. Clean and well written. Im going to try to make yet another autospammer!

Shave Ice

2007-05-21 21:16:20

Thanks whocares

This has just started my scripting carrer
Icefire suggested this to me and it is a really good one. :)
Im still shaky on the variables though

seungki

2007-05-22 06:25:25

May I ask, your code seems…. as if it must go from top to bottom. I didn't see it if it's there, but does SCAR require code to go top to bottom and not in anyway we find fit?

Basically from my question, I basically learned some object calling stuff from your tutorial. Thanks!

-seungki

WhoCares357

2007-05-22 11:07:25

From: seungki
May I ask, your code seems…. as if it must go from top to bottom. I didn't see it if it's there, but does SCAR require code to go top to bottom and not in anyway we find fit?

Basically from my question, I basically learned some object calling stuff from your tutorial. Thanks!

-seungki


Yup. Scar reads your script like a book. It starts at the left of line one and goes right until it reaches the end of the page. Then it goes to line 2. Also, Scar does not see lines (which is why we sometimes need ; at the end of commands and procedures). The order is flexible, however.

The program Name; must come first. Then you can distribute these three things as you like: procedures, variables, constants. You must finally have the main loop (the last begin and end). Scar will read the whole script, but it will only do what is in the main loop.

wogboy12

2007-05-23 05:12:43

nice tut man, helped alot!

wogboy12

2007-05-23 05:43:03

thx very nice

evilwalrus

2007-05-26 15:14:37

thank you that was very helpful

salada man

2007-05-28 23:53:15

Wow mate. Your a bloody legend! Cheers:)

newb cheater

2007-06-01 04:37:14

Thank you…I would just like to say that I am happy i read this because it cleared a lot of things up

sense 0f pk

2007-06-02 15:52:53

thanks you so much man,

this is the first day of many for me to try to learn pascal laguange and scripting. I got one Question though. When you go through the steps, do you have to memorize how to do each bit of it till you move on? or can u go through the steps a bit faster than that?

good tut by the way xD




WhoCares357

2007-06-02 19:48:02

Don't try memorizing it. It will be memorized through experience. The only thing I suggest is reading my SRL tutorial to learn some SRL commands and apply in RS.

http://www.villavu.com/forum/showthread.php?t=7999

alfonso1024

2007-06-04 14:33:17

hi! i kind understand your explanition is really nice and cool but i just want to know how can i download a scrip for smithing i already have scar Divi 3.06 ty iam happy that are persons like you. plz feel free to add me on msn (chucho10241@hotmail.com) ty i be waiting…….:cartman:

WhoCares357

2007-06-04 18:03:15

Search in the Free Scripts section.

farfen

2007-06-04 22:46:26

thank you so much i cant wait till i finish my first script

Tim0suprem0

2007-06-05 16:32:29

Thanks a bunch!:D Made a lot of things very clear i.e. made me want to pursue learning to script!

muffinman177

2007-06-06 15:31:42

After learning everything on this tut are we supposed to move on to Intermediate?

WhoCares357

2007-06-06 18:18:02

I didn't include a few things that you should learn first. (Like case) You should still try a few of the tutorials. After that, move on to intermediate ;).

muffinman177

2007-06-07 20:36:04

Okay, thanks.

bro of mist

2007-06-15 22:00:54

can u help me
i just need to know how to make some one elses script work i am so confused right now can u make a script that i can play around with to get to nderstand it more or something or a script that i dont have to touch just use it to do what i have to do?
ty

jujitsubb777

2007-06-16 04:02:03

THIS MADE ME KNOW WHAT I WAS DOING!
-ez to understand
-pics whole way
I Say its a spankin 10/10 guide, tysm! =D

sedakai

2007-06-22 17:34:56

this is a great tut im 15 and i understad it …although im not the adverage 15 year old, ty for the awesome tut do you have anymore?

Isolated

2007-06-22 19:13:19

Lol - Hey dude - I read this tut on your freewebs site.

WhoCares357

2007-06-23 09:49:41

From: Isolated
Lol - Hey dude - I read this tut on your freewebs site.


It's still up? I haven't been there in ages…

I already updated this tutorial many times since that one, also. Glad you found this one :).

dstone09

2007-06-23 21:28:10

Thank You this helped ALOT!

Giga

2007-06-27 07:49:14

Thanks alot for the tutorial man, it's very nice explained and detailed, just starting out at scripting and I understand most of it! :)

Edit: Still reading through it!

zenma

2007-06-28 17:43:13

thanks for the tutorial i understood it good. im that much closer to scripting now :)

Here

2007-06-28 17:55:51

This tut would be useful if I didn't know Pascal. Thanks much anyways. Now to look for tuts that show me SRL.

Macho Man67

2007-06-29 02:19:52

When I first read this, I was like" What?". After reading it a second a thrid time, I finally started to get the concept of scripting. Thank you very much WhoCares357 for this tutorial. Now look at me, I have released two scripts!:D

Biskit

2007-06-30 09:29:51

Thank you, this helped me refresh my memory, i haven't used scar in about a yr + 1/2 thanks, awesome tut :)

Sinfulend

2007-07-01 15:20:13

ty this taught mealotabout scripting it is very well put together and easy to understand

tdawg165

2007-07-07 01:32:36

Very nice… this is one of the best tuts i have read so far….
Tyvm!:D

yamaha317

2007-07-11 17:53:44

thanks a ton dude this helped me on my first steps to become a programmer =)
[BANANA][/BANANA]

JWM

2007-07-13 10:24:42

hey thanks that really help but the only thing i didnt get was variables.
thanks allot,

jwm.:)

mogwairn

2007-07-14 07:22:59

thanks very much for this, hopefully il be writing my own scripts in no time :)

thunar

2007-07-16 13:14:32

Your tut is awesome… the part I have read. I got about to the color part(a part I was really looking forward to) and It started repeating every line, and blurring the lines. I tried refreshing and it didn't help. Any ideas? I would really like to read the rest of it.

WhoCares357

2007-07-16 22:51:42

I posted the tut in more than one place: http://sythe.org/showthread.php?t=148839

Buzzy

2007-07-17 06:40:29

Wow, thanks. This is really good. I am really sick and tired of leeching because I can't learn from bad tutorials. Now to make a silk merchant =)

ghost

2007-07-17 15:38:07

Excellent beginner's guide. I wish this was around back when I first started scripting. Back then the only way you could learn was by snagging the few available scripts (i.e., Odie's autofighter) and taking it apart.

WhoCares357

2007-07-17 20:27:58

From: ghost
Excellent beginner's guide. I wish this was around back when I first started scripting. Back then the only way you could learn was by snagging the few available scripts (i.e., Odie's autofighter) and taking it apart.


I know what you mean. When I learned to script, there was one tutorial that I had found, and it was more of an intermediate tutorial rather than a beginner's tutorial. Me and my friend had to experiment with scripts to learn things. I wrote this tutorial right after I was confident that I knew enough about scripting to do so. I hope this tutorial has helped make a journey through the scripting world a little easier.

Thanks for the comment.

hamstring

2007-07-20 15:24:13

wow good tut

lamatime

2007-07-23 20:32:00

I am currently still reading this but I have to tell you this. I am Amazed at my understanding! I Never thought learning the basics would be this easy! I am taking a C++ course in a camp next week and Im sure the knowledge i am learning here will help! I realize that the words used will be different, however the basic idea will be the same. Thank you so much for posting this tut as I can assure you this is the best way to learn scar. I will recommend this to all who need it. I cant wait to make my first script:spot:

hvitekrist

2007-07-26 05:06:24

THANK YOU SO MUCH FOR THIS AWESOME TUTORIAL!!!

After this tutorial I made a script wich made my mouse go to paint en draw "HOI" (dutch for hello) while using different tools ^^ I showed a friend and he was like: "WTF?! that's freakin' awesome man! How the f*ck do you do that?!"

keep the good work up:D :D :D

3james3

2007-07-27 21:10:11

Could some one put in a full script I read all this and it doesn't do that much it's confusing. Thanks for the help though. I will get my friend to help.

3James3

GotNarced

2007-07-31 19:21:45

great tut, thx

mynameisjoe

2007-08-06 10:08:51

Excellent Tut!! This helped me a lot!

P1nky

2007-08-07 01:13:00

dude took me 2 hours to read this man!!!!!!!!


-this guide is freaking g00d!!!!!!!!!! omg!!!!! lmao now i can script ofcourse use this guide wile i do it like to remmeber the codes!!!

-i accully took dam notes lmao wow it sounds so fun hopefully ill make aloot of scripts!!!!! woohoo

-BTW will this help like in life? like if u going to become a programer? if so wow im already starting not even in COLLEGE wippeeeee

Nose Smasher

2007-08-07 07:32:34

Very nice Tut! Informative, descriptive, and easy to understand. :D

m4geab0rtz

2007-08-07 18:44:37

Very helpful. Thanks =)

BabeMagnet

2007-08-07 21:13:18

how do u put it all together?

shadowpwner

2007-08-08 00:13:16

very nice, helped me alot.

warrockownz

2007-08-08 04:20:38

wow ty i came up with at least 20 scripts because i learnt :P .. sorry there not for rs

hangman72091

2007-08-13 18:28:38

very good script if u have aim could u message me and explain a couple questions i have on how to make an auto fisher and banker? ty my sn is surferkid6002

immaminer3

2007-08-15 14:56:30

omg this was the best tut i have seen so far n trust me ive seen alot. pls make one for intermediate so i can keep learning how to use scar n i can put my own scripts here to give bac. keep up the good work i like the details. way to go.

muratpower

2007-08-19 15:31:07

its a great tut
good for beginners like me :)

valesar

2007-08-21 01:08:19

Awesome Tutorial, helped me a ton. Now I just hope i can get good at the more advanced stuff.

I B X R

2007-08-22 01:56:54

I don't think I've ever read a thread more informative. Took me 1 and a half hours to read this! But everysecond was important! 15/10 on a scale from 1-10! This rocks. But what I have trouble with is Bitmaps. I don't understand how to use them. I'll be on this thread constantly re-reading until I can make my first script!!

progam ThankYouWhoCares357;

begin
repeat
Writeln('YOU OWN WhoCares357!!!!!No one can compare to the help you've given me!');
until(false)
end.

How's that for a first script?

WhoCares357

2007-08-24 21:17:30

From: I B X R
I don't think I've ever read a thread more informative. Took me 1 and a half hours to read this! But everysecond was important! 15/10 on a scale from 1-10! This rocks. But what I have trouble with is Bitmaps. I don't understand how to use them. I'll be on this thread constantly re-reading until I can make my first script!!

progam ThankYouWhoCares357;

begin
repeat
Writeln('YOU OWN WhoCares357!!!!!No one can compare to the help you've given me!');
until(false)
end.

How's that for a first script?


http://www.villavu.com/forum/showthread.php?t=9453

Try that.

[N]ick

2007-08-30 22:31:10

Thank You, this really helped explain things, but there's still one thing. I may have missed it in the guide, or maybe this is only in Wazzup's Ess miner script, but I always get this error


Line 49: [Error] (16425:1): Unknown identifier 'HowManyBooleans' in script C:\Documents and Settings\Nick\My Documents\SRL Essence Miner 1.16.scar

I B X R

2007-08-31 20:39:43

Hey, very nice guide once again:)
This is my second time reading, and it is all coming together. Yay, I say by october, I'll be a decent, if not about average scripter.

NocKme

2007-09-01 13:28:14

Ty dude that was very helpful!!!!!!

pureskull123

2007-09-01 18:36:21

why does my pc detect a trojan on scar??? great tut though

gothicly2

2007-09-02 20:24:31

Very nice tut, really liked it, learned some stuff! Now to start coding and build an army!

rdk

2007-09-03 00:09:16

very detailed! im starting to get the hang of scripting :D tyvm!

Macchew5

2007-09-03 00:42:30

Thanks, Im new to scar. Have a little programming knowledge. Would love to get into the Scar scripting scene. This TUT was very very helpful thank you so much. Hopefully soon I can start coding some useful scripts. Thanks again!

Camaro

2007-09-03 00:49:41

Wow, excellent tutorial. Took forever to read, but i'm glad I did. Thanks!

lordofdapoop

2007-09-03 03:24:00

Great tutorial!

munchkinruss

2007-09-03 04:33:21

thank you =D

viece

2007-09-03 08:57:33

Thanks, ive been looking for this. It helped me out alot =)

strex

2007-09-03 09:51:15

Thanks alot mate :) you helped me alot.

faster789

2007-09-03 10:26:14

program Procedures2;

procedure Write;
begin
Writeln('Hi, you are doing very well with this learning!');
end;

procedure Stay;
begin
Write;
Wait(500);
end;
procedure Write1;
begin
Writeln('sup');
end;
procedure stay1;
begin
write;
wait(1000);
end;
begin
Stay1;
end.

why isnt this working plz help?

SilentScripter

2007-09-03 13:26:46

very very nice tut man. I just started learning to script a couple days ago and this really helped out thxs. :D

DA_bossman132

2007-09-03 13:48:07

Hey, thanks, very much.

My knowledge of SCAR just went from nothing to somthing…

Your tut really healped me understand.

I don't completely understand SCAR yet tho…

Might i suggest you make a video tutorial?

A good program to use for video tuts is "camstudio"

Google it if you wish

I usually use it to record lineriders or runescape stuff

And thanks again for the tut

Good luck with anything else you script


HAPPY SCRIPTING

vilon

2007-09-03 13:52:26

Thanks alot for this great tutorial! :D
It really gave me a nice introduction to scripting with scar, although the programming lanaguage itself
seems a bit different from my past experiences with programming.

SilentScripter

2007-09-03 14:59:42

this is for Faster789
you should try this:

program Procedures2;

procedure Write;
begin
Writeln('Hi, you are doing very well with this learning!');
end;

procedure Stay;
begin
Wait(500);
end;

procedure Write1;
begin
Writeln('sup');
end;

procedure Stay1;
begin
wait(1000);
end;

begin
Write;
Stay;
Write1;
Stay1;
end.

yaronx10000

2007-09-03 17:32:21

nice guide, first one i read though :P looks impressive comparing to any guide (not just scripting guides)

Eacis

2007-09-03 18:10:25

W00t tnx

pathway27

2007-09-04 09:23:27

Thanks learned a lot!

sapetto

2007-09-04 10:14:32

This tutorial helped me a lot! I recommend it to every beginner

campross.04

2007-09-04 10:15:30

hey just a thanx this tut has helped me with my scripts alot be posting my first script soon ya :D

sparkles

2007-09-04 11:43:44

i had almost given up. i have read so many tutorials but this one really clarified things. i wonder why this isn't stickied (or is it and I have completely missed it?). I managed to write a simple tree-finder and cutter.

now to work on a loop.

lilterrell

2007-09-04 19:06:49

very nice tutorial im now working on my first script

cptn

2007-09-05 11:37:41

Thanks for the guilde :cool: now i can start scripting my own script ;}

mattar

2007-09-07 04:25:29

amazingly detailed.. gr8 job.. such in depth tutorial tht makes it seem like scripting is a piece of cake

purexas

2007-09-07 15:31:20

that rly helped ^^ :duh:

Genesis

2007-09-07 17:19:17

Amazing tutorial, I'm learning a lot from it.

kornthebldgd

2007-09-07 18:30:58

Thanks so much man this is going to help me out alot.
Korn

picklemansus

2007-09-08 23:55:11

Click on tools and picture to string

Not Script

xxtrem3

2007-09-09 05:53:42

Hey, can anyone help me out with antiban ?
I need it for my power cutter .

Czepa

2007-09-09 08:49:02

i have not yet read the whole guide… im planing to start writing scripts in the future when i have more time, just a quick question about scar.. when you write a procedure for example:
[LEFT]
procedure CheckVersion;
begin if version=<3 then
begin Writeln('Version is out of date')
end;
end;
// rest of script
[/LEFT]

does that get stored in the memory of scar and therefore means that whilst the script is running and it ever encounters a Version less than 3 it will say that its outdated and then end?
[LEFT]
procedure CheckVersion;
begin if version=<3 then
begin Writeln('Version is out of date')
end;
// rest of script
[/LEFT]

then this means that when it encounters a Version less than three it will write the message but continue the script?

if im right ill be so happy :D

oh and also.. did i write all that correctly?

frionl123

2007-09-09 18:42:39

awesome:)i readed it carefully and learnt something at all.Wish a day i'll make a script..:pthanx

114 boo

2007-09-10 04:55:55

this tut ownz

WhoCares357

2007-09-10 19:42:50

From: Czepa
i have not yet read the whole guide… im planing to start writing scripts in the future when i have more time, just a quick question about scar.. when you write a procedure for example:
[LEFT]
procedure CheckVersion;
begin if version=<3 then
begin Writeln('Version is out of date')
end;
end;
// rest of script
[/LEFT]

does that get stored in the memory of scar and therefore means that whilst the script is running and it ever encounters a Version less than 3 it will say that its outdated and then end?
[LEFT]
procedure CheckVersion;
begin if version=<3 then
begin Writeln('Version is out of date')
end;
// rest of script
[/LEFT]

then this means that when it encounters a Version less than three it will write the message but continue the script?

if im right ill be so happy :D

oh and also.. did i write all that correctly?


More like this:
var
version: Integer;

procedure CheckVersion;
begin
if version < 3 then
WriteLn('You have the wrong version.');
end;

begin
version := 3;
CheckVersion;
end.

Hope that helps.

Gu3st...

2007-09-11 10:20:42

(* And *) is Comment to..

Example:
Copy/Paste this into scar.

program New;
begin
//Comment.
{Comment.}
(*Comment.*)
end.

Juitar1

2007-09-13 00:15:02

This tut has been an awesome help! however i am rather stuck at one point in the middle. (as you will probably notice i have never done anything like this before so my terminalogy may be a tad askew) I am stuck at the Bitmap section of the tutorial. I was able to do steps 1-8, but i have no idea how or what to load as the Bitmap! for example:

program BitmapExample2;

var
Fish: Integer;

begin
Fish := BitmapFromString(8, 11, 'z78DA33302007B801C16015C7C5A6A' +
'77A62F4E252894CD21F0000D64369E1');
end.

where the heck did you get:
"Fish := BitmapFromString(8, 11, 'z78DA33302007B801C16015C7C5A6A' +
'77A62F4E252894CD21F0000D64369E1');"???

i tried many times to use the script i got on step 7, in different ways, but none of them worked. i'd love your help on this! (hope you understand my problem) anyway, i'll be posting more later,
cya later
Juitar

Lonedrinker

2007-09-13 07:02:51

O rly nice guid thanks

masterBB

2007-09-13 16:15:00

From: Juitar1
This tut has been an awesome help! however i am rather stuck at one point in the middle. (as you will probably notice i have never done anything like this before so my terminalogy may be a tad askew) I am stuck at the Bitmap section of the tutorial. I was able to do steps 1-8, but i have no idea how or what to load as the Bitmap! for example:

program BitmapExample2;

var
Fish: Integer;

begin
Fish := BitmapFromString(8, 11, 'z78DA33302007B801C16015C7C5A6A' +
'77A62F4E252894CD21F0000D64369E1');
end.

where the heck did you get:
"Fish := BitmapFromString(8, 11, 'z78DA33302007B801C16015C7C5A6A' +
'77A62F4E252894CD21F0000D64369E1');"???

i tried many times to use the script i got on step 7, in different ways, but none of them worked. i'd love your help on this! (hope you understand my problem) anyway, i'll be posting more later,
cya later
Juitar


I think you have to search a item of runescape on the internet… like a tuna… than translate that to bitmap and place it in your script..

now you can let your mouse search for a image(bitmap) instead of a colour.

plz check if what I said is right because I'm not sure about it…

anyway: the best tutorial of :stirthepot: "the srl-forum" :stirthepot: !!!!

masterBB

Toterache

2007-09-14 08:04:07

Hi, really great thread, just wanted to say that for loading a bitmap, you said to click on script>>picture to string>>….
and on my version of SCAR (3.6), the picture to string command is under tools>>scripts. appart from that, awsome thread, with it i created my first oak chopper autoer, and I just heard of this programm 3 days ago, and not leached a single script. :)

Juitar1

2007-09-14 12:09:35

From: masterBB
I think you have to search a item of runescape on the internet… like a tuna… than translate that to bitmap and place it in your script..

now you can let your mouse search for a image(bitmap) instead of a colour.

plz check if what I said is right because I'm not sure about it…

masterBB


yeah, i have the bitmap from runescape, and convert it to a string…but the "string" shows up in the debug box, as a 5,000 number/letter answer. i have no idea what part of this answer to put in the script. that's where i need help. anyway, thanks again.
Juitar

F1r3Fox

2007-09-14 13:50:32

Dude This Helped Like Hell . It Is So Wonderfully Writen And Detailed Only 1 Typo On The Whole Text This Is Just The Neatest Text,TuT And Post I Have Ever Seen.

P.S.:Examples Helped Alot

Fruity-Lo0py

2007-09-14 16:04:29

Tysm!!!

qasim11

2007-09-15 04:11:32

woah i get it now ! this is soo helpful ( must have taken u ages to write this tut :D )

Qasim

masterBB

2007-09-15 05:56:14

can anyone post me a good working bitmap image from a bone in the chaos temple??

I really need it..

good tut anyway

Aser

2007-09-16 01:22:20

That tut can be classified in one word 'sweet'

Thank you for using your precious time to teach us.

BuuB

2007-09-16 08:21:29

nice guide.

kertkert

2007-09-20 14:33:07

Nice tutorial! It helps A LOT if you havent scripted in SCAR before. Rep +

NineBit808

2007-09-21 18:34:28

i read this a couple days ago and it has helped tonnes thats alot man. keep it up

michaels

2007-09-21 18:37:05

WOah, that was a very thorough script explanation.

Well done. I rate it(y)

wazul

2007-09-22 20:46:08

thanks:D

Nikize

2007-09-24 02:54:49

Me and my bro started reading your tutorial at 1 A.M, then after 4 hours i and my brother got it all, and he is only 11 years old,
Great job with your tutorial man!

bujbju

2007-09-24 20:31:53

such a detailed tut, u have cleared up sooo many questions i had
TYVM :D

cris2

2007-09-26 11:32:37

wow gr8 tut, ive dicided im going to learn scar scripting, so this tutorial will be very handy, i can see you have put lots of time into it, cheers. ;)

CodyTheBaddie

2007-09-26 22:56:33

Haha, very nice tut, now instead of me being a leecher, when I have time, though I have school nowadays, I will get to learn how to do this stuff soon! =) Thanks. :sasmokin:

l33t_h4x0r

2007-09-27 05:02:44

Just good for learning basics of scar…

Use ClickMouse on RS = BAN (Correct me if i am wrong)

Acel92

2007-09-27 14:46:47

Ty for a very nice, detailed begginner guide!! 10/10
Going to make my first script: autosmither

blankblankblank

2007-09-27 21:23:54

This tutorial helped me A LOT. Thanks and I hope you didn't lose your fingers typing I mean, that is like a website's worth of typing!

grats

2007-09-27 23:35:56

thanks for this tutorial its so awesome!

Kryptospridium

2007-09-28 05:31:18

Oh no!! to much learning! brain…attempting to…leave skull!!
Now, seriously, very good! Easy to understand, lots of examples, heaps good!

Belt

2007-09-28 21:53:07

All I can say is WOW.
I felt like I would never be able to make a working script, this has given me a lot of confidence.
Thank you so much

checkers

2007-09-29 12:35:32

thank you very much for this. this will help out a lot

§hãttêrëd Rèƒlé¢tîøñ

2007-09-29 16:19:25

Helped a TON! This is going to greatly help me in the long run. Thank you so much.

blr

2007-09-30 02:15:58

I love you, this tutorial has really helped me. I just created my very first script :D

PeteJohn

2007-09-30 10:41:33

Thanks for the tutorial, I been loooking for a good beginners tutorial for a long time, thanks

Sk8boardinggit

2007-09-30 11:58:30

Dude. Ty so much. I read this and it helped me learn alot about scripting. Ty!

shadowkawn

2007-10-02 19:59:45

Started reading and got through about half of it, and it was really enlightening on scripting methods, i will continue to read the rest as soon as i find the time and then hopefully i can start making useful scripts and contributions

buck cakes

2007-10-03 23:24:21

wow, that tut was the best ive ever seen, that mustve taken a lot of work, and its so helpful

my goal is to make the best powerminer there is

Whatmatters

2007-10-04 16:23:43

Thanks a lot for the tutorial. I'm somewhat catching on to how this works.

Ersatz

2007-10-05 02:26:01

Wow.
Couldn't see myself going anywhere without reading that. It helps. In my own head I believe I know a lot, when in contrast to others I know jack shit.

Thanks, it helped my understanding of Scar heaps.

:)

cristhebest

2007-10-05 08:41:41

extremely useful, thanks !

davidwang95

2007-10-10 15:28:35

helped a lot:D

parkkicks

2007-10-12 02:32:31

great job! i hope to see some intermidate and advanced tuts from you!

schoony

2007-10-13 11:51:54

Thanks!!!

This is really useful as I have no programming experience at all:o

Rawr_Cabbage

2007-10-14 17:49:52

Nice tut, not as many pictures as others (hah) but, very detailed. Helps out alot. Should help me towards making my first script (trying to decide on whether to make an auto-fighter, collector, or power-chopper).

mortenlt

2007-10-14 17:57:44

Thank you!
Now i can start making that awsome auto i always wanted someone to make ;o)

(btw looking forward to your next guide )

Submersal

2007-10-15 02:11:57

Absolutely awesome.

Definitely going to script now.

=]

:stirthepot:

mo59827

2007-10-15 02:17:19

Awsome tutorial! I am finally starting to get the idea of how to script, although I have not gotten one working perfectly yet, this helped a ton.


-Thanks a bunch, mo:)

Helldemon80

2007-10-15 23:56:01

Wow thanks a lot :)

Sweden

2007-10-16 17:26:54

Hey, that was a nice guide, it learnt me alot! Thanks :)

harm133

2007-10-18 13:00:23

Roflz =o pretty easy if you read this ^^

kuumalaukaus

2007-10-19 17:16:45

Great guide. :)

Drone1000

2007-10-20 06:53:46

wow! Really nice guide!

M3talhe4d

2007-10-21 14:29:32

This was a fantastic read, I have a learned alot, thanks

ZaSz

2007-10-21 15:09:14

Wow thanks!

warlord0522

2007-10-21 16:36:51

thnx for the tutorial just one question.

Did you write this right?
"There are (three) different types of variables: Integer, String, Boolean, Extended"

I put in parenthisese what I think is wrong.:)

tckaile

2007-10-22 17:28:32

I've just recently gotten into SCAR and SRL and I gotta say man congrats on one great tut. It's easy and understandable. Tyvm for your help.

Nereverine

2007-10-22 18:44:17

Is it possible to script SCAR in 3d?

silenttt

2007-10-23 20:02:43

Nice tut. Someone should make some good video tutorials on this language.

WhoCares357

2007-10-24 20:45:39

From: warlord0522
thnx for the tutorial just one question.

Did you write this right?
"There are (three) different types of variables: Integer, String, Boolean, Extended"

I put in parenthisese what I think is wrong.:)


Heh. Thanks for pointing that out. There are actually many different types of variables, but I just showed the most common ones. I'll fix it. Thanks again.

maywyue

2007-10-25 03:23:48

@_@ wooooah…
geez ~ ty
helps me understand scar alot ! woot !!

LEMON118

2007-10-25 06:08:49

Thank You, that was brilliant, I will be sure to use this :D

Tepear

2007-10-27 13:24:32

I read it from top to bottom. It really really helped me understand the basics and
how things work together.

bth8

2007-10-28 01:06:04

ok thank you for this info. it was very valuble. i had been working in pascal a little before this came along, but now i know much more, sadly there is one mistake you made (at least that i caught). near the beginning you said you had to use uppercase when you started a new word. im sorry to point out that that isnt true. in pascal uppercase and lowercase dont matter at all. seriously, go try and write a code while using crazy combinations of uppercase and lowercase. it dosent change anything.

p.s. im not saying that to intimidate you or anything, im only saying that to make sure all the newbies (no offense) dont think they have to check their code for that each time when they dont have to.

WhoCares357

2007-10-29 07:02:36

From: bth8
ok thank you for this info. it was very valuble. i had been working in pascal a little before this came along, but now i know much more, sadly there is one mistake you made (at least that i caught). near the beginning you said you had to use uppercase when you started a new word. im sorry to point out that that isnt true. in pascal uppercase and lowercase dont matter at all. seriously, go try and write a code while using crazy combinations of uppercase and lowercase. it dosent change anything.

p.s. im not saying that to intimidate you or anything, im only saying that to make sure all the newbies (no offense) dont think they have to check their code for that each time when they dont have to.


Heh, it's okay. I wrote this tutorial when I was still very new to the code. One day, when I'm not so busy, I'll go in and fix all my previous errors. Thanks for the comment. I always appreciate criticism as long as it includes a spec of suggestion and correction ;).

FurshizzleItsYannick

2007-10-29 11:53:03

Really nice tutorial helped me alot making my own script :D

h4x4phun

2007-10-29 12:20:39

very nice guide whocares

sam the clam

2007-10-29 13:31:10

thanks for the tutorial! very detailed.
helped me try to start some scripting :)

mrbabaloo

2007-10-29 16:36:43

Very good guide. Good job it's stickied else I wouldn't have a clue how to use SCAR.

From: bth8
ok thank you for this info. it was very valuble. i had been working in pascal a little before this came along, but now i know much more, sadly there is one mistake you made (at least that i caught). near the beginning you said you had to use uppercase when you started a new word. im sorry to point out that that isnt true. in pascal uppercase and lowercase dont matter at all. seriously, go try and write a code while using crazy combinations of uppercase and lowercase. it dosent change anything.

p.s. im not saying that to intimidate you or anything, im only saying that to make sure all the newbies (no offense) dont think they have to check their code for that each time when they dont have to.


I think he said that its a good idea to write names like this (NameOfWhatYouAreNaming) not that you had to. I would agree that it's handy because I know that many programmers and languages require this syntax (PHP is one I know it's a good idea to do this).

spork985

2007-10-30 10:18:28

Still kind of complicated but I'm learning, thanks :D

robedino230

2007-10-31 12:02:29

nice TUT dude ! it helped me learn some of the basics!
but with the colors part the Findcolor (x,y,123456,0,0,100,100) doesn't work.
it says unknown identifier X in script…?

Jimi_Blue

2007-10-31 14:19:47

Very nice.
When I started reading this I knew nothing about SCAR and SRL. Now that I've finished it, it makes me want to write my own script.

RedDemon815

2007-11-03 11:36:32

Best tut I have ever seen,now I have alot more knowledge in scripting .
I highly recommend this to anyone just starting out!

red eyes 20

2007-11-03 19:42:52

hey, now i might be able to make a super simple script to make meger cash, heh explaned not only how to script, but how it works, inwhich you can grasp it well =)
again, thanks a ton man!!

Immortal_DemiGod

2007-11-03 21:59:39

Now if only I had found this guide/a guide like this guide years upon years ago I would have been able to create my own scripts before now

bobojohn

2007-11-04 05:15:59

very good tutorial i learned alot from it

flyingkid101

2007-11-04 10:12:27

Thanks alot this has really helped me understan SCAR a heck of alot more
great tutorial!

Logica

2007-11-04 17:43:36

Wow, this will help me so much man. I read the whole entire thing in one read..Wow, so much information. Great guide. :)

Desolater

2007-11-05 08:25:23

Very helpful thank you very much!

I am currently trying to do an auto log in i think im almost finished :D

retrovega

2007-11-07 19:29:31

wow
all i can say is wow
this is extremely helpful
you should make this into a book
no joke
ty so much for this

jacoby6000

2007-11-07 23:57:26

shweet thank you

wearenot

2007-11-08 01:31:57

very helpful thanks.
the only things that confused me at first were variables and bitmaps but now that im uasing more andvanced stuff i understand them fully
and thanks again this was a really big help

xxmynameisjohnxx

2007-11-09 16:40:47

Very Nice TUT, I've read through it now, it'll be WAY useful when I try and write a script, which will probably be soon since I can't find a auto willow cutter that seems to bank well.

sik of it

2007-11-09 19:50:26

Thanks alot for that guide, I might get started on making some script with some of the stuff I've learnt here =)

t3h solja

2007-11-09 22:53:43

Wow nice TUT dude!

grox

2007-11-10 09:40:42

wow i did my first autotalker lol

PocketVeto

2007-11-10 12:19:45

Nice TUT, man.

^^ Pretty soon, with all this knowledge intake, I'll complete my first script.

Many thanks to you. :)

tico2

2007-11-10 13:52:40

TY man!!! Before I read this, i didn't khnew anything, but now i know something
:D Keep up the good work

DarkEmber

2007-11-11 00:03:28

Not to nag or anything, but I'm on the Bitmap section and you put Picture to String as being under the Script menu, but its under Tools.

Awesome Tut, I'm very interested in SCAR scripting thanks to you :D

Blazinhell

2007-11-11 01:17:23

that pretty much rocks, i havent looked at scar in a year or two and didnt have a clue back then, i have since learned some C++ and with your guide, this is going to be pretty easy to get started, thanks bro

WhoCares357

2007-11-11 15:45:13

From: DarkEmber
Not to nag or anything, but I'm on the Bitmap section and you put Picture to String as being under the Script menu, but its under Tools.

Awesome Tut, I'm very interested in SCAR scripting thanks to you :D


It must have changed since 2.03. If not, then I am sorry for the mistake.

And I personally thank everyone who has commented so far. It makes my time given for the creation of the tutorial very much worthwhile.

mjzr

2007-11-11 18:05:19

wow i like how this is old
but it still helped me understand the most basic parts of scar scripts
now to read more lol

KingNoob

2007-11-16 19:37:31

this is the greatest tut i've read
this is helped me to understand some of the scripts easier.
i'm now starting on my first real script
and its all thanks to you

zennext

2007-11-17 21:28:59

Wow. Amazingly thorough guide. helped me to get the basics of SCAR scripting. Thank you!!!:(h):

-Spartan-

2007-11-19 08:28:24

awesome tutorial, managed to follow you perfectly. well versed and explains the beginning of scripting well. thx :)

carloxjr

2007-11-19 15:18:06

i dint understand But Gj =3:spot:

lnknprkn

2007-11-20 06:14:39

didn't read all of it yet, but i will definitely do so later. great guide :-) very friendly.

thanks!

jacoby6000

2007-11-24 01:01:08

ty but for some reason when i have it click somthing it doesnt actually click on it instead it just tries to walk there plz help

waterrebel

2007-11-24 18:23:39

Very informative, great for beginners, A++

flyingkid101

2007-11-24 21:16:59

Lol this reminds me of qbasic
gotta love old programming languages!
Great Tutorial!! A++

spensel

2007-11-25 16:54:57

This is a very helpful tut
thanks

sinocopa 1

2007-11-26 19:24:23

I love this guid, but i still need some help anyone care to help me over MSN or E-mail! that would be nice

ps: ill pay in RS cash :D! say about 10-200k depends on the help you give!!!

Womble

2007-11-28 17:07:28

very good tutorial, i found it very easy to understand and i now feel alot more confortable with SCAR.

thanks,

Womble.

dr.quantumphysics

2007-11-30 15:43:28

thanks this is a great guide:)

GhostNote

2007-12-01 17:48:14

5 stars for you!

komodo

2007-12-02 15:50:40

Nice man…I understand a lot more now

Frankyfro

2007-12-03 23:53:33

Absolutely brilliant beginners tut, got me started and i can now begin to understand some of the intermediate stuff.

souppy

2007-12-04 14:19:01

Wow, there is alot of work put into this thread for sure.

Pballplayer0

2007-12-04 15:58:08

Hey great tut. The only error i saw was you said that "Ctrl+P" was the color picker under the "How to use" section when its "Ctrl+Alt+P". The same for Run and Pause. I know that most people know that but i just wanted to make sure that newer people would know too. Other than that good job on the tutorial :)

WhoCares357

2007-12-04 16:56:08

From: Pballplayer0
Hey great tut. The only error i saw was you said that "Ctrl+P" was the color picker under the "How to use" section when its "Ctrl+Alt+P". The same for Run and Pause. I know that most people know that but i just wanted to make sure that newer people would know too. Other than that good job on the tutorial :)


Thanks. I'll fix it ASAP.

grey_smurf

2007-12-07 10:47:44

Quite the awesome tutorial. It's been helping me alot with SCAR, Good job.

dragonkitty9

2007-12-07 15:27:41

:) Well done, the thing i liked the best was that I understand scripting that much more; it's cool how much you can learn from something as short as the information given in the reading. Thx. I believe you should cast a vote just to see what the other readers think of your TUT; as they say.

One thing; do you have any other TUT's that I could read?;)

knowmysteeez

2007-12-07 17:19:05

This guide is amazing, you explain everything so nicely. Great job!

dddddd

2007-12-07 18:28:57

thank you for the help as i am currently making my first script atm so this should make it alot easier

hamster

2007-12-07 18:58:22

Thanks mate! this tut really helped me :-)

samsrl

2007-12-08 08:01:18

very very nice guide, helped me massively, thank you very much mate

pk ownage94

2007-12-08 16:57:27

Thanks so Much for this tutorial you've helped me make my first script! check it out, theres a link in my sig.

chewgun

2007-12-09 15:46:48

wow,a very thorough tutorial. You made it very simple to understand.

I'm still a bit fuzzed on color finding,but I'm sure I'll get it soon.

Great work,appreciate it!;)

enig.ma

2007-12-14 23:41:35

Hi I have this problem where I get an image, and i save it as a bitmap, then I go to Tools > Bitmap to String. Then I open my image and then press okay, I get this code,


button := BitmapFromString(136, 35, 'beNrtW8GKXEcM3N9JLoYEQ' +
'vBCEowPjsHJJSSQq///G+wHAlFUlar1Zi972KFZ3uvp1zOjalWppd' +
'6np7fXq319+fv/T5//uf7++9/XanR7Xe/b9Wy3988fP3z8q9tvv/9' +
'Zf6/+eguv67bGaOuR1eqWOq/2y69//PTz86bRgzrDdVE9dV0NZ/jh' +
'x3dXo2mrkxq9dXwEcWkUplZmPw4IMHUnwnS1sjBCoOhgzzVVwK7sW' +
'ZOUVQsFBZHgaCDyMLydQCc49mjWLfkLGbNQwP697+SRNT8Bgdghmt' +
'0KEbydgEOY8OeXVXvZExxo83YQAkJv24/UoYKPTK1mKFx6tReDEUZ' +
'ozPYX9B30AnKoI9ehCxzdbUJEWa79pfv152MjcrtFfdNU6h3EkHa8' +
'+ktZ1TKVChC9W4ad4ECbt1VreYcFMIGCuLRlEIKgF7j+aYlerb7S9' +
'PjEbJnEUKeIMHvaCRdkrWm1Z0FBBcluUva0nLnkvXYEvCYHwRWOa7' +
'Klh5Z6C1wOJKwYTcseYwZ1E/uI6v7EP9ZxiEOI/JWaUKzbrTa44IT' +
'NTlbxraagBRoOMohd/MugzoZ/U1iIXhPiMfSXEHRZLkJroxaTidp3' +
'+i0kKAJloqx6tn7OcaT6lKqzFXHLJ0exnpRLpUfdNkdoisutDQuaI' +
'm95rN2yhfGRJq4jIkgyynUTrWGArcPIaKgOy03NNPguLsRavbw3CB' +
'KV2VjX8k/eodA86jikDg2HihER2nHbMtkzBFRHy+cWcEFQNhvJb/K' +
'yW0XVICtVk2vY2Lg/CHuwE7/A9be+XhuhbimTEEI7NXK2+S1EUPez' +
'wZcsV7+OMjwk01a1KZpqX6gJJ/kgGyJ3oY/Yz+qvWs/irc32TEmej' +
'cFV01+Cy92cGOKCuoNBbPOhLntrxp6QXEmxLlBCqIYuk3HZ5GGQvi' +
'aD3yWuECdv9hSToCAueWNe/TV48qO67Qkb06bHyWiEL1FcP0gOEnB' +
'RDdrnRW0eJnMg4RLERfc1NtZqM6KyoP2Rl+opXBIkTDi+nyrz1lNt' +
'W3ykw13sJ8gIl/IyXAB92y+SoU3nlPXaM57FBa09pV8UGtKXjhbwm' +
'9dbDSLxFb50wh5Zixbn1P56xIYfiEvlXhAX+2XstAhxv/US9Vdcph' +
'0BeocmLSkqUH3pwQQK/nykNSI31BdcyWpAJCK0+URQk77g55K7oYv' +
'heAWl7I97nAyBbVOe38rNMh7DxAv5Sws34dK0hjEYmYuQOl7jp9BO' +
'EHHB245Agl9Yx0dPeUzxQz4ZvQMTKcsgjfylZlAeIwvTJhH7NZC4h' +
'QsZjXL+TXH43TAyJLdSfiMOVMqizM+tgKFx13bMIVtcyDuUbSYL01' +
'IkfsuoBSJSo3VKX4dNfmFdBnW/XNKqyT4nYP2FgNjk3rXpyYFrEoQ' +
'eJUavUeI7oqZORK378bpsSLpDdeQyl34uPkud9i20YQ59j3Ga1Rdy' +
'EE2L7QslOkxjCa3v20TNlIEJmyPMHhCP4dGOjqg1yX+3vm9T04SO7' +
'venraiti9mfaRNWk4n0fIUiO+UbsVhGhf5bBWUbgdtsMAUDaF49D7' +
'OHaTI4ERqqjxId6v7mkEOFWCGHbx1KwbIL4NYhKJvJ0Y0hctFUUMa' +
'SLo5UaTi6Uq6gUSpvqs5Y3c+GnTaVWh3OZyduYRFm6GQLhlskHGhn' +
'2vjTCTHNS1NJel/fV9HXUzdhj0M6a8uRRwNmU1PFJDvdLTfJx/+on' +
'm5TxGiuzm1i2Vrr+9MBAD0GoAW4/JTd76O5SCao83hqi4JtUp98AC' +
'bAkT/IVgFIBabjTMdzehNBVSp7qu9jQW2qhE6BASYPp6hpKhFOuXr' +
'Vmlzq0uBNv08t4FxHDiuHIi461GTr/vuTtFMpU6VkX80MeX5rnIxO' +
'S8wtu9lAbvJQGmlPaLR3BICI3BQa6z7KQscDsar+9jzAVN8/qsZRo' +
'ymHc+QcLfdTfV8jw81hv3DyXI8x976GIrpllf/WRv6B+n4+hnd344' +
'9o5qKk1Y6J4vRU82TzIzREa9PZD8VoAiJv6l9S37fnjR9o9kD4ZgG' +
'rQqGoTQGzPX2xidmmlkv8D9T3KdCyu5UJl5D0OAY/y9OPyvn68+ng' +
'ytKkyEj2bFIwsm0P1Ig3/9KyrLwgLm+vV/f6DjtqfV8=');

But then when I put this back into "String to picture" I get an error saying "Invalid encrypted String", someone help please! :)
Edit: I am using the latest version of scar.


I tried another bitmap, and I got the same result:



mage := BitmapFromString(32, 30, 'beNrtlllPU1EURrk/wQHa4rtR' +
'9IGgEpxiGATBSBxQwJJioVDLUEaxZSggtTKLiA1xwMSExMSf4YuJJ' +
'hJBkBmM/g9X3Xg8tikWlAcTmxXCJXTtc/bZ3703Lu5f+Bg/+OvCEC' +
'bTHoslYV+i5c9K/BQmxO8ym/ZaLCac4LBlup3nbtdd2LpfcybsNpv' +
'jExM3nFBmTUfb3nTxrs8OXV7bFv3fNx5ympVTqHJkd3uu9N1xKLbo' +
'Dy04zCkEOq4NB5w6g/4K8fs8JbEdgVFXecbjzhofcQeHa2FssBpG+' +
'106I703BUrg72kvjc1v9HjzZhfnp2ZnHo/WU0KqSIlIKIT/XmeZ+L' +
'2Nxb/1L6+vza8sJb0IPugr10so9L+wfvqDn4PmUKSHm/tXPq8fevk' +
'E/9iAA78qAXKpYP3ehnzGssGVV1qUWnQpJYaUGetfv4ifI6DEs7EN' +
'G7/oMD8cU0356QrbiTJrmvXqUc1vbDLqrP/wqwn8B56OBIcqUU08a' +
'hQYntaGbOo2utJF7rKfwl/rzHE5zpbbMphkIaKEYTEnkHEiubS2Kv' +
'4G57HmqlSECsy3ajKQKzMrpzOy+IL8ZKc9U4goYfAtwVObhhY5RJp' +
'ZtjLTdkVTzfkwtNtFSM7MzCx8ev32TU9bsfjR0hB/awGt7my5zH1A' +
'waUO/yAQBGaJrDGuWpyNjuachdVlOVb8AZ8VZOWUgN7OQsVAd7Fi2' +
'H9dUiBBkyxLHHS/r/GktJ0SIu9qyWVT/AQkivsBqz6xKn16CdmC7q' +
'fnMjbip8lzS4vvP07vD/azBZlSNahh6CWi+Wk4sRV/b1cJp0m7kib' +
'HDz5/qFIQrUTYFtTtTve7HUc4X1ok/rb646ocYyMpiIYqgZ+9d3sL' +
'mdjcrKSw+aRFzM/0/Bw4bckbKZgc5xTwE65ofnbHnWrIf4OuYo4e4' +
'dAuqu0pwDLoj/glxSrCwGUYrCG2R/zPpyHnyxYYV8pFClXiYLtvDg' +
'aPgHcfptiUCjJO4df3h+2/MCBXt6AdfnEy4v5/duLzDXvWijs=');



Edit #2:
Okay, I downloaded SCAR 2.03, and I did the exact same thing and this time it worked. So either the latest SCAR has a bug in this "Picture to String" or you have to use it in a different way?

Quazark

2007-12-15 08:03:17

I've only read some of this, but it's helping me a LOT, well done for writing this up.

squnky

2007-12-16 22:09:50

great tut, read it all @ once.. lets see what kind of scripts i can make then =D

skooter1000

2007-12-17 23:25:46

Dooooooooood you are like my god. I feel slightly smarter after reading this well organized and neat tutorial. Please continue making them plz….

Dracody

2007-12-18 02:53:36

long , but very explicit i had to re-read a little but its a very well done guide, thanks!

WhoCares357

2007-12-18 16:49:26

To those who are asking about my other tutorials, here are a few of them:

http://www.villavu.com/forum/showthread.php?t=7581
http://www.villavu.com/forum/showthread.php?t=7999
http://www.villavu.com/forum/showthread.php?t=6443
http://www.villavu.com/forum/showthread.php?t=9453

Thanks for all the comments.

xia1295

2007-12-18 18:38:08

One question:

Greeting: String;


You said that for commands that will turn bold, we shouldn't capitalize.
Does it not apply to this?

WhoCares357

2007-12-19 16:42:59

Well, we used it for a specific reason here. We defined the word "Greeting" as a string. That means that we can now store strings (text) in "Greeting".

saystuff: String; would be the same thing. We are just defining something as a string.

If I used it in something like:

procedure String;
begin
end;

it would be wrong and your script wouldn't compile (You would get an error).

The thing about capitalization doesn't matter. I am not even sure why I said that we should not capitalize it.

Greeting: String;
and
Greeting: string;

Both mean the same thing.

haseebcash4u

2007-12-21 23:11:12

Very amazing tutorial i liked this out of the others pretty simple to use and understand

Dusk412

2007-12-22 22:17:32

Thanks it was very helpful except for the includes part which was confusing and very necessary because of all the Mouse stuff so I couldn't really try that out myself yet.

Kold

2007-12-23 03:38:34

Thanks VERY much!

King of Knives

2007-12-23 06:16:46

This brings back memories… I started out by reading this brilliant and 100% covering guide and from there everything went up… Today I'm SRL Member and I make scripts that can run for hours and hours :p :D

Everybody should be encouraged to read this and begin scripting.

Thanks, WhoCares357!

-Knives

snowman frosty

2007-12-23 22:45:14

thx alot this is a great help for people wanting to learn

beezelabus

2007-12-24 02:10:55

Working on a Script myself this Tutorial is extremely Helpful.
Thanks!!!

Scathis

2007-12-24 16:18:50

I just sat here and read it all, and it has given me somewhere to start on this Scar buisness lol, no for me to go do some trialing of my own :P

jakeyboy29

2007-12-24 17:00:49

nice 1

insanomano

2007-12-25 15:09:29

that was a very good tutorial. I understood everything except i did the bitmap thing properly but it would never find the bitmap(i even used FindBitmapIn–and inserted the runescape box size) i made it so it would write in the debug box if it found or didnt but it never did and never clicked on it???????? plz help but thx for the tut helped me with a lot of things :)


~Insanomano~

WhoCares357

2007-12-25 19:20:37

From: insanomano
that was a very good tutorial. I understood everything except i did the bitmap thing properly but it would never find the bitmap(i even used FindBitmapIn–and inserted the runescape box size) i made it so it would write in the debug box if it found or didnt but it never did and never clicked on it???????? plz help but thx for the tut helped me with a lot of things :)


~Insanomano~


Either my bitmap is outdated (if you didn't use your own), the bitmap you used is too large, or there was a bug in the script.

In any case, you should post the script.

blingbling

2007-12-25 23:54:59

um well i thought it was pretty good. goof job! =) um but i'd probably like have to read it 3 or mote times to understand fully and myb by then ill make my own script! thnx alot man:D

blingbling

2007-12-25 23:56:28

um well i thought it was pretty good. good job! =) um but i'd probably like have to read it 3 or more times to understand fully and mayb by then ill make my own script! thnx alot man:D

Hurgymcgurgygurg

2007-12-30 15:31:56

I think I might finally have a chance to actually make some scripts now. Thank you very much. Now, the only thing I found slightly confusing was the bit map area. I originally thought I had to convert it to a JPEG instead. :confused: However, I figured out that Runescape's Existing User Button is already a bitmap…

Still, I could not get it to actually detect the Existing User Button and click it, I figured out I needed to use the FindBitMapIn, but what are the actual dimensions of the Runescape window?

Besides that everything else worked, thank you very much, and here is a quick and little error I found with the bit map section.

In SCAR Divi 3.13, the picture to string button is under the Tools icon, not Script.

Richard

2007-12-31 07:33:59

Yeah, great tutorial!

Does anyone know any good intermediates ones? I think I'm ready for them after this.

MasterSparta

2007-12-31 15:37:59

Excellent job. I will return to this guide very soon!

Kosaki

2008-01-01 10:00:12

Tahnks for this great tuts. Helped me overcome the big differences between scar script and c++.

I look forward to make some bots for RuneScape. My battlefield 2142 hack went to hell when PunkBuster went to v2.xx so I am going to do RuneScape now as i have always loved the game I played years ago. :P

Kasi

2008-01-01 20:36:48

iv read nearly all ur scripts still dont understand

JT MONEY

2008-01-01 20:58:09

WOW! This is the best guide ive found so far, Thank you so much for putting it on here. It was a little hard undertsanding it at the start but i got around…

Thanks again,

Jt money

yurmomsmom9

2008-01-02 00:08:07

thanx :) im gonna work on starting a script now :D
that was a ton of help now and ive read 3 tuts and by far this is the best yet

hey i got a question
when i run with MoveMouseSmooth my test script i made works perfectly
but when i run with MoveMouseSmoothEx theres an error in the debug box that says
Line 10: [Error] (10:1): Invalid number of parameters in script

can anyone help me?

oh and heres my script im using

program Talker;

procedure talk;
begin
Writeln('hello');
Wait(1000+random(600))
Writeln('this is stupid');
Wait(2000+random(200))
MoveMouseSmoothEx(500+random(300)-random(500),500+random(300)-random(100))
end;
begin
talk
end.

MasterSparta

2008-01-02 15:55:55

Excellent tutorial. It helps alot.:)

WhoCares357

2008-01-03 07:02:35

From: yurmomsmom9
thanx :) im gonna work on starting a script now :D
that was a ton of help now and ive read 3 tuts and by far this is the best yet

hey i got a question
when i run with MoveMouseSmooth my test script i made works perfectly
but when i run with MoveMouseSmoothEx theres an error in the debug box that says
Line 10: [Error] (10:1): Invalid number of parameters in script

can anyone help me?

oh and heres my script im using

program Talker;

procedure talk;
begin
Writeln('hello');
Wait(1000+random(600))
Writeln('this is stupid');
Wait(2000+random(200))
MoveMouseSmoothEx(500+random(300)-random(500),500+random(300)-random(100))
end;
begin
talk
end.


MoveMouseSmoothEx has more than just the coords to define. You also have to define the gravity, wait times, etc.

Here's the exact definition:

procedure MoveMouseSmoothEx(x, y: Integer; minsleeptime, maxsleeptime, maxdistance, gravity, forces: Integer);
Simulate humanlike mouse movement with more customizable parameters. By default MinSleepTime = 1; MaxSleepTime = 3; MaxDistance = 45; Gravity = 20; Forces = 10. Minsleeptime and Maxsleeptime limit pause between mouse cursor jumps, MaxDistance is maximal allowed distance between mouse jumps, Gravity is how much mouse tends to reach destination, Forces are like random winds, hand shaking simulation.

I took it directly from the Scar Divi Manual.

ins3

2008-01-04 16:44:34

Wish I saw this earlier, would've saved me hours of trying to work out whats what from my past ASM knowledge xD

gsonic4000

2008-01-05 00:40:53

Great starting point
Thanx a bunch

Rubycore

2008-01-05 22:32:04

Read it on Sythe too..
Awesome tut man, I'm a WhoCares357 tut addict!
Thanks! :D

carbonchain

2008-01-06 14:55:46

Wow, nice tutorial! This was really helpful :)

thekillman5

2008-01-06 15:59:23

im new to any programs like scar and i had no idea how to use it. this is the only tut i have found that helped me, so good work! and the booleans are the hardest thing to understand. :D

Relath

2008-01-09 21:56:01

This is a very good tut for a someone who just started to learn about scar, but by looking at where runescape is headed, sadly I'm not sure if i should still spend time learning about scar. But I think I'll take the chance anyway as seeing how interesting it is to be able to make your own scripts to run programs with various functions and procedures with just one click.

XxXx Toxin XxXx

2008-01-10 21:06:50

Great tutorial for actual new people who are new to scripting.
This has helped me and will continue to help others in the future.

Thanks;):)

westkevin12

2008-01-13 22:34:13

wow thanks alot for this tutorial i finaly understand the basics i've read alot of tuts b4 and really wanted to learn nothing help so i just started looking at other peoples scripts to learn but couldn't quite understand why some things go in some places youre tut helped me alot!!

iSkank[X]

2008-01-16 01:37:47

Great tut. I learned a lot from it. :]

stnrscott2

2008-01-17 02:55:24

This is great. I've been wanting to learn to script, I'll definitely use this tutorial. Thanks!

MasterOfStuff

2008-01-18 16:06:52

The repeat was always unclear in other tuts and I don't think any explained the if,then,and else format at all, or not clearly enough. The best tut I've read so far, especially for a nub like me.

dillbagz

2008-01-27 00:34:22

sums up scripting in one nice little bundle

Pure1993

2008-01-27 08:45:36

Wow, after reading this i already feel like i am ready to make a script! But i guess the saying goes "i know that i don't know, and by doing that i know a lot, and the less i actually know, the more I belive to know", so i have this intresting feeling there will be a lot more reading to do. Special thanks for the procedure explanation, it greatly helped me! :)
I have no clue what this "rep++" is supposed to do of which I constantly hear of in the comments, but I guess it can only be something good, so rep++ for you! :D

blacksonic2

2008-01-28 15:21:07

thanks a ton dude helped a lot

Havanacus

2008-01-28 16:26:57

Thank you for this tutorial… Now that I understand the basics of scripting, maybe I can get a script to run… Then later I can create a script of my own… All thanks a large part to you… Also, In on part of the tutorial, near the end of the middle, you said seconds when you should have said milliseconds…

Sc00by22

2008-02-04 05:53:57

Thanks, Going to read this now

pyroryan

2008-02-07 11:01:38

Great guide, now I have at least some understanding of the different functions of Scar. Now to find an SRL how-to.

diemega

2008-02-08 00:10:35

nice effort..lots of helpful points,cheers mate

nikos

2008-02-09 12:40:23

Great tutorial, keep up the good work. I made an auto talking script after reading this. currently working on a power miner script.

brygge2

2008-02-12 01:11:21

Hi! Great tutorial. I'm new to SCAR and SLR, but thanks to this, i'm already on my way to making a guildminer.
Thanks again!

aciid phreek

2008-02-13 19:42:40

Thankyou so much! Ive been looking for a decent tutorial for the last 6 hours lol… Im trying it out now and will post if I have any problems

Thanks Again

realrocker00

2008-02-15 20:52:54

its nice but its long and you lost me on the Variables and Constants

Griff

2008-02-17 21:29:52

great tut, I might start scripting now I think!


(hope)…

mysticalman

2008-02-19 17:05:41

Really nice tut. one of the better ones ive seen. understandable and clean. keep up the good work.

mcnollend

2008-02-20 19:19:49

nice tut, very detailed

avalance

2008-02-24 08:08:41

Yeah this is a really good one bit long took me some time but nice :)

Lamborgini8

2008-02-24 17:53:53

That was a good tutorial, lots of helpful tips. Though I don't know if it'll work with the new SCAR, I might try to make a script now :)

Hurgymcgurgygurg

2008-02-26 23:12:22

A quick noob question… Sorry…

About deleting JaGex files, I hear people talking about deleting random.dat and uid.dat. I've checked my computer under jagex cache 32, the only thing I've ever found is the random.dat, I've deleted it every day (Of Course) but I have never found the uid.dat, where is it located?

Or is it that just one is used on each computer, i.e. since I have the random.dat I don't have the uid.dat.

HellBoyz

2008-02-26 23:27:54

Please keep in mind uid.dat have been changes to random.dat long time ago… just delete the random.dat will do

mautofiedd

2008-02-28 14:35:40

thanks alot, very educational.

jj147258369

2008-02-28 15:04:51

thanks this helped me so much!

jj147258369

2008-02-28 15:05:51

it boosted my IQ 0.00000000000000009%

aartje

2008-02-28 17:07:52

I give it a try. Other tries to learn scripting failed -.- toooo impatience

Snowflake

2008-03-02 11:30:54

Thank you so much for this tutorial - it was one of the first i read, and i still consider it one of the best i have read!

You made everything very clear and detailed, so many thanks :) !

laurenssie1

2008-03-03 09:11:59

Thanks alot :) Now I understand it and maybe I'll make a script!

laurenssie1

2008-03-03 09:12:59

EDIT: If I wasn't a chicken!

coo too

2008-03-03 15:46:28

I think you should know that because of this tut I love you

nasty

2008-03-04 06:04:39

:D very nice tut tyvm!!

jon_071

2008-03-04 22:34:07

Wow! Thanks alot, I'll have a go at some more tutorials, then hopefully I can make a simple bone burier. Very very helpful.

Jon

Codester93

2008-03-08 22:22:46

I used this tut to make my very own chicken killer and bone burier, it may be outdated, but still good for noobs like me :D
thanx

WhoCares357

2008-03-09 00:41:42

I am considering writing a "Second Edition" in which I update this tutorial to match the new SRL/Scar versions. This, of course, will take some work, but I think I will do it. I am currently working on patching up my "Ample Alcher" script (it was really outdated), but as soon as I finish that up, I will start on furnishing this tutorial.

Once again, I really appreciate all of the comments and support. I never imagined this tutorial would be so popular. I created it because there were no others (at the time) that were truly "beginner tutorials". I am glad to see the variety of beginner tutorials today.

HellBoyz

2008-03-17 00:36:54

Nice… Can't wait for version 2 :p …

mikevskater

2008-03-17 09:06:01

From: WhoCares357
I am considering writing a "Second Edition" in which I update this tutorial to match the new SRL/Scar versions. This, of course, will take some work, but I think I will do it. I am currently working on patching up my "Ample Alcher" script (it was really outdated), but as soon as I finish that up, I will start on furnishing this tutorial.

Once again, I really appreciate all of the comments and support. I never imagined this tutorial would be so popular. I created it because there were no others (at the time) that were truly "beginner tutorials". I am glad to see the variety of beginner tutorials today.

That would be a really good idea, You still have MoveMouseSmooth and ClickMouse in here, i want to reffer this tut to someone but i don't want them to use the two and learn the wrong way… o well but i really like this tut and look forward to ver 2. :spot:

Benson

2008-03-17 22:14:46

i got directed here from a friendly stranger :D and so far im about half done, very very nice information, im finally understanding some things. i can porb ley make an…AUTOTALKER :D:D:D lol


(tries his best to keep spam down to a miniumu…first big posted i've made ever here :D)

WhoCares357

2008-03-18 17:42:33

Had some trouble with my internet this weekend, so I couldn't start the revision. I'll start this weekend (thursday evening :D).

hobbobobbo1

2008-03-20 07:25:08

very good tutorial it did not help me much but im sure it will help otheres

jack_nosp

2008-03-22 01:12:38

nice work but all them fancy names i don't understand

Codester93

2008-03-22 18:07:35

That would be awsome if you came out with a new version. I read through the guide and this guide showed me that this will be more practical then learning the language of computer game making. I started to learn the game language, but i came back here and saw this, and it will help me in my future more bc i want to be a programmer or engineer. And both will need somekind of language similar to this, especially the engineer one. Now im goin to quit my other language im learning and start learning pascal. I hope I will learn more soon and will be able to post some in the free scripts.

Alot of thanks,:) :) :)
Codester (P.S. now im going to try and make my post more gramatically correct….after this one)

rometotalwar

2008-03-27 09:51:11

Every time i try to make a scritp or download it when i play it it allways opens a new tab called SCAR and says theres an error on line 87 and 4 hundred and something.Please help by emailing me a [email]aarondobie555@hotmail.co.uk[/email]

ALil'Hope

2008-03-28 18:21:24

Thanks a lot!

Press Play

2008-03-29 01:21:32

Thankyou soooo much…you helped me understand SCAR!! i thought id never get it…but after i saw this it seems so simple..
..i will hopefully try to make some good scripts to post on the srl-forums:) :D

darknoob

2008-03-29 08:26:13

thanks man, I thougt i would never understand SCAR but after i read this it looks quite simpel.

jvk322

2008-03-30 01:07:58

thank you,
this script helped me alot in understanding how scripting works and how to use it :D

juufkk

2008-03-31 14:51:05

Very good guide! Makes SCAR look easy to learn, atleast for me.

DeSnob

2008-04-01 08:12:34

thx mate ^^ that tutorial really helped me :P i am going to try to make an ess miner, if i can't i just have to read some more tuts =)

sacred_user

2008-04-03 20:28:50

Mann I read this whole thing and i understand Scar much beter. I am not very interested in writing my own scripts but now i will know what people are talking about and i can learn from the scripts that i use since i know most of the basics.

blobmaster31

2008-04-04 02:29:56

does clickmouse work still??

WhoCares357

2008-04-04 02:52:54

From: blobmaster31
does clickmouse work still??


It does, but don't use it on Runescape. It's detectable.

Instead, use the SRL include.


program New;

{.include SRL\SRL.scar}

begin
SetupSRL;
Mouse(200, 200, 0, 0, true);
end.

200, 200 are x and y coords 0, 0 are random x and random y. true is left mouse button.

And yes, you DO need to placed SetupSRL there. It sets the mouse speed.

Gold

2008-04-04 10:25:58

Well, I got this morning checked on Hy's fight cave runner and decided I'd Go back and look to the basics because my WillowSlash3r script Is being a dick.

I read this in like 20 minutes I learned a few new (but as you stated it the tut) old tricks!:spot: anyway great tut I can see your very neat rep++ your helping rid us of leechers and teaching some of us some fundamentals

Jelloman

2008-04-09 19:04:03

THANK YOU VERY MUCH!!! this tut was very helpful and i learned a lot!! +rep!
very well written and clear to understand, now i understand SCAR better, thank you very much!

Dan

2008-04-09 19:09:17

Nice, just got back to runescape cheating from quiting ages ago :P, might try to learn how to script again :D.

splbooth

2008-04-11 18:59:55

Wow… ive read it all… understand it all… tryed it all…

And yet it still seems over my head a bit :) After looking at a few free scripts on this site, and a few others on other sites, I keep seeing errors in scripts where people reply "Download SRL version so N' so with SCAR so N' so"…

Why cant they keep it the same?

Brain

2008-04-12 01:44:58

Well well well.
I've been here for awhile, and I'm ashamed to say that was my first serious tut reading.
And I learned a lot from it, thank you much for your time in writing this!
Really a good one, time to move on though

trav280

2008-04-13 18:52:04

wow, thanks alot, this will be very useful to me.

ozozo

2008-04-14 16:59:55

Thx! Great guide!

wayne1210

2008-04-14 18:56:00

im reading this right now, it's very nice =)

SeanJohn

2008-04-14 18:58:02

Thank You for the tutorial. I already knew some basic programming from a little C++ but this really helped me adjust to scar and it's uses.

jacoby6000

2008-04-14 23:11:55

ok heres what i have so far

program AutoMiner;
{.include SRL\SRL.scar}
Var
x,y: integer;
Const
Username= '';
Password= '';
OreColor = 7044095;
Ore := DTMFromString('78DA633461626078C380028A631D191881340' +
'8FF0702465BA09A7B0C6880118904D2764035F78950F38808352F' +
'09A801B9E7150135964035AF09A801F9FD310135C640352F88B08' +
'B40F8000026DF1073');
begin
if findcolor(x,y,Orecolor,0,0,515,337)then
begin
movemousesmoothEx(x,y +random(5),10,30,500,10,0);
wait(100+random(300));
ClickMouse(x,y,true);
end else
writeln('Could Not find rock');
end;
if findDTM(Ore,x,y,687,436,711,459)then
begin
If findDTM(Ore,x,y,550,208,736,465)then
begin
movemousesmooth(x,y +random(12))
wait(100+random(250))
ClickMouse(x,y,false)
end;
end;
end.

can someone tell me how to make it find text then click on it, and also can someone help me to get the dtm to work?? help is appreciated

Naum

2008-04-15 09:53:07

program AutoMiner;
{.include SRL\SRL.scar}
Var
x,y: integer;
Const
Username= '';
Password= '';
OreColor = 7044095;
Ore := DTMFromString('78DA633461626078C380028A631D191881340' +
'8FF0702465BA09A7B0C6880118904D2764035F78950F38808352F' +
'09A801B9E7150135964035AF09A801F9FD310135C640352F88B08' +
'B40F8000026DF1073');
begin
if findcolor(x,y,Orecolor,0,0,515,337)then
begin
movemousesmoothEx(x,y +random(5),10,30,500,10,0);
wait(100+random(300));
If IsUpText('Text here') then
Mouse(x,y,1,1,true);
end else
writeln('Could Not find rock');
end;
if findDTM(Ore,x,y,687,436,711,459)then
begin
If findDTM(Ore,x,y,550,208,736,465)then
begin
movemousesmooth(x,y +random(12))
wait(100+random(250))
Mouse(x,y,1,1,false)
ChooseOption('rop')
end;
end;
end;
Here you go.

jacoby6000

2008-04-15 18:04:55

THANK YOU THIS HELPS ME SOOOO MUCH. I <3 you forever. lol JK but THANKS!!

Heliabc

2008-04-18 20:17:21

In the procedures section, I can't get the WriteIn command to be used as command. Idk if i'm doin it wrong or what… I'm running SCAR 3.15 btw

leetzonez

2008-04-18 20:56:19

i luv u

WhoCares357

2008-04-19 09:55:53

From: Heliabc
In the procedures section, I can't get the WriteIn command to be used as command. Idk if i'm doin it wrong or what… I'm running SCAR 3.15 btw


Can you give me the code you're trying to run?

Sneakyman

2008-04-19 10:10:14

Thanks for the fish color example, that was what i just needed :D . Now i can go look and make a little script, and learn and learn and learn :)

VikDAkinG

2008-04-19 20:40:19

hey really good guide thanks alot man helped me alot to get started

Jimakos21

2008-04-22 14:25:41

wow the best guide i ve ever seen!

sunny

2008-04-23 02:48:03

From: Heliabc
In the procedures section, I can't get the WriteIn command to be used as command. Idk if i'm doin it wrong or what… I'm running SCAR 3.15 btw


make sure that "Writeln" has a lower cas "L" not a cap "I"

WhoCares357

2008-04-23 07:02:46

From: sunny
make sure that "Writeln" has a lower cas "L" not a cap "I"


:D I put that in the tut, too.

sunny

2008-04-23 07:47:03

From: WhoCares357
:D I put that in the tut, too.


ok just trying to help out :D

martyn279

2008-04-23 09:45:08

thank you :D

x1ras

2008-04-23 18:21:33

awesome, iv printed this off so i can read it on the way to work.

Nava2

2008-05-01 20:14:04

I love all the noobs posting just to get up post count :)

Thanks for the great tut btw. Helped me a lot in my power miner!

Nava2

Alco13

2008-05-04 08:40:01

prty mint tutorial i bet this took you a while to write out :p gj

ryanhoffman5

2008-05-04 10:23:26

thanks a million for this dude, helps tons

smurf2471

2008-05-05 07:54:28

I am a nexus scripter and hopefully that will help me to learn to script with scar :) thanks for the great tutorial

WhoCares357

2008-05-05 18:02:53

I have added this little snippet at the beginning of the tutorial:

!WARNING!
THE COMMANDS USED IN THIS TUTORIAL ARE OUTDATED.
Do not use any of the Mouse (moving or clicking) commands on Runescape. Do not use the SendKeys command either.

The include SRL (made by the generous people on this forum) has created greatly improved commands that are undetectable by Runescape. THE INTERACTIVE COMMANDS USED IN THIS TUTORIAL (mouse movement, mouse clicking, typing) ARE NOW DETECTABLE. DO NOT USE THEM ON RUNESCAPE OR YOU WILL GET BANNED. I made a short tutorial on some of the more common SRL commands. You can find that tutorial Here.

I have not had time to update this tutorial yet, but I really want to do so once school ends. I put this as a warning because I have seen many people use old commands on Runescape that will quickly get them banned. Don't be one of those people. Learn SRL commands after you finish learning from this tutorial.


Please take this into consideration. It certainly doesn't mean that this tutorial is unusable. I created it to teach you how to PROGRAM and not how to cheat in Runescape.

I did spend a few hours working on the tutorial about a month ago, but my old computer crashed and I lost everything. I am now getting ready for exams and such (end of school year :D). I hope to start rewriting the tutorial soon.

Thank you for all of your replies so far. I am glad that my work has helped so many talented people.

PS, yes, I know my syntax structure is horrible during the tutorial xD. I wrote it when I was still a beginner. I had very weird standards back then. I'll update the standards when I rewrite the tutorial.

benjaa

2008-05-05 18:08:01

Incredible tutorial!
TYSM

jacka scar MASTER

2008-05-09 05:35:49

good tutorial

ilyadusoleil

2008-05-18 04:30:32

Wow, Awesome tut

evert230

2008-05-18 04:46:05

One word: NEATNESS.

i'm screwed

DGKbattle

2008-05-18 08:59:43

Takes a long time to read but well worth it

DGKbattle

2008-05-18 09:03:54

if it wasn't for this guide i would still be putting my username/password before the '' because i really didn't understand it

thanks for helping :D

anyone having problems with scripting or using scripts should read this tut

blueguisee

2008-05-23 11:13:58

I'm confused about something in the line
if(FindColor(x,y,FishColor,0,0,600,600) is
0,0, = x,y of the top left corner of the screen
600,600 = x,y of the lower right corner of the screen
is that correct?

WhoCares357

2008-05-23 17:14:07

From: blueguisee
I'm confused about something in the line
if(FindColor(x,y,FishColor,0,0,600,600) is
0,0, = x,y of the top left corner of the screen
600,600 = x,y of the lower right corner of the screen
is that correct?


Yup. That's exactly what it means.

blueguisee

2008-05-23 22:55:08

From: WhoCares357
Yup. That's exactly what it means.

ahhh i see.. Thx

EdsuBR

2008-05-24 12:00:58

Very nice tutorial, it helped me alot.
I just didnt got something right.
in the procedure
MoveMouseSmoothEx(x,y+random(0),20,40,45,25,20);

what does the "20,40,45,25,20" means?
is that the min sleeptime, max sleeptime, max distance, gravity and force thing?

WhoCares357

2008-05-24 13:56:28

From: EdsuBR
Very nice tutorial, it helped me alot.
I just didnt got something right.
in the procedure

what does the "20,40,45,25,20" means?
is that the min sleeptime, max sleeptime, max distance, gravity and force thing?


Yup. It goes in order (as in the description).

FornxXx

2008-05-30 22:09:05

This Tut has givin me the Motivation i was looking for.
BIG MAJOR ++ to you.


Seeing as how you took something Difficult to understand for beginners *Scar*
and nipped it peice by peice. Ill be hoping for more chapters in the future :)

Very Nice!

Im starting on something as we speak because of this Tut and this tut alone.

Thanks alot WCs357 <3


Btw added thread to Favorites ^^

shrubie1

2008-05-31 10:24:39

From: DGKbattle
if it wasn't for this guide i would still be putting my username/password before the '' because i really didn't understand it


From: DGKbattle
thanks for helping :D


From: DGKbattle
anyone having problems with scripting or using scripts should read this tut


TRIPLE POST.
All I can say.

AnonyMouse

2008-05-31 11:10:19

Hey, I've just Joined SRL-forums, and im getting into scripting, this'll help heaps ^.^

a really really long name

2008-06-01 05:00:21

thanks a lot! that alone is almost enough for me to build the script i came to this site for :D

killerk3vin96

2008-06-04 17:39:18

wow dude thanks it really helped me alot you rule!!!!!

destige

2008-06-05 10:26:03

great tutorial!

CK!

2008-06-07 04:29:45

thanks for the tut. maybe i could write a good script eventually

xSaintias

2008-06-30 02:20:09

nice [TUT] helps with even some of the harder parts of scra :D

Ghostman

2008-07-04 02:53:52

Thanks, This helps out alot

alcolol2

2008-07-08 02:42:15

thanks for your help, it is clear and very helpfull.
now i understand it some more.
:spongebob:

rynkrt3

2008-07-09 06:21:57

TY this helped alot

bomberboy

2008-07-25 09:20:14

thanks tis is very helpfull

brent8900

2008-07-31 16:32:50

Thank you this tutorial has helped a lot with my first script

Gabio

2008-08-07 22:45:45

Wow, there are a lot of good tutorials in this forum :),
I'm making an autofighter atm and I've found everything I needed
in these threads, thanks so much.

ditchr

2008-08-18 22:50:43

this is soooo useful! thank you so much

Flame

2008-08-19 02:00:01

Thank you for your Hard Effort , I appreciate ^^

AzulDrake

2008-08-21 07:03:02

WOW, now this is definite an excellant tut. Kudus to you for going out of your way to make it as easy and simple as possible.

666d3v1l666

2008-08-29 02:23:19

This tutorial is awesome!
It helped me really well and got me to make my frist ever script!
An auto talker!
keep up the good work!

Thanks

5o c3nt rulz

2008-09-05 23:57:26

wow! thank you ! this really helped me with scripting!

best tutorial ive read! :)

metalguitarfro

2008-09-07 03:36:55

Thanks, I will try this when I attempt to write my first script.

bloodyhell321

2008-09-22 18:40:43

Thank you so much! Only question is this: What do I use instead of SendKeys and the mouse functions?

Regards,

Bloodyhell321

WhoCares357

2008-09-23 07:05:05

From: bloodyhell321
Thank you so much! Only question is this: What do I use instead of SendKeys and the mouse functions?

Regards,

Bloodyhell321


http://www.villavu.com/forum/showthread.php?t=7999

It's a tutorial I made on just that. Hope it helps you.

edsrules

2008-09-26 17:05:22

this has helped me sooo much. But im still a noob at making scripts lol

chaotikhell

2008-10-09 23:42:35

very well written tut and explains most things in great depth

mynigga

2008-10-14 11:21:09

Thanks for writing the guide! It really helped me to get a basic understanding of SCAR with it's clear and organized information. :)

ridwan23

2008-10-16 13:17:45

This is awesome

Thank you for taking the time to make it

key keeper55

2008-10-16 13:59:58

great tutorial it helped me so much!!
i made a autominer and a autowoodcutter and banker thank u so much!/!

anonymity

2008-10-20 00:35:19

Hey, thanks for spending your time with this.

theo

2008-10-25 06:41:22

Dang! just the thing i needed to know is how to make a mouse move and click…great…. <.> *disappointed*

Cayne

2008-10-30 16:07:05

Excellent tutorial, this really helped me get past that first barrier in using SCAR for the first time.

xxx_Drew

2008-11-04 07:29:17

Thank you for enlightening me.
My abilities are non-existant at the moment, but is it possible to make a theiving script that eats from a stackable food like sweets ? Or one that even steals food when it runs out ? I guess that will be one of my future projects.

Have a nice day.

crazyronpoker

2008-11-20 11:12:43

thanks so much for this , it helped me greatly.

Yoast

2008-11-22 13:29:22

I absolutely loved reading this and would certainly recommend it to anyone :) Really helped me understand the basics!

Riffe

2008-11-22 14:28:50

Can I make what script I want of this?




- Riffe

Jakez27

2008-11-24 13:57:23

Thanks a lot for this!
Really helping me…. just need to learn to use includes properly, and check that other thread you mentioned as this one was out of date…
Still highly recommend reading it for beginners though!
Thanks
Jakez

maksimka

2008-12-20 18:17:31

very nice tutorial. now i know what im acually doing =] thank you very much

ash1205

2008-12-20 18:46:21

Very nice helped me :O

snakeboy756

2008-12-23 22:45:18

Very good guide

Dropsy

2009-01-13 21:42:06

Really good tut! It may be long but its well worth it to read.

Dani Bolton

2009-01-16 16:43:20

Wow :eek: great work this is really going to help me in my new venture into scripting!
Thanks a lot

Dani B
x

ian.

2009-01-17 06:37:44

^^

don't sound to sound spammy like most of these people, but, this guide is what helped me make my guide :D

thanks so much for this :)

Guru Jake

2009-02-22 19:33:00

Very nice guide, if you decide to edit anything can you go back and clarify/ simplify the variable/ constants part… thanks

WhoCares357

2009-02-24 06:55:29

From: Guru Jake
Very nice guide, if you decide to edit anything can you go back and clarify/ simplify the variable/ constants part… thanks


I've actually started rewriting the tutorial 2 times already. The first time my computer died and I lost the hard drive (It had the old type of connector so I couldn't get the files from it). The second time I had to reformat my computer and couldn't back anything up. I didn't feel like starting it again for a long time, but I think I'll give it a try again. This time I'll save it on a flash drive :D.

jameo 30what

2009-03-08 09:30:47

You are the best I actually made a script that you define a number and it guesses it unil it gets it and says Your number is *
Thx

jameo 30what

2009-03-08 09:38:51

Btw how do you get it to tell you how many times it guessed it?
Someting like

//Stuff at start
begin
x:=0
repeat
x:= x+ 1;
//stuff
Until (blah)
writeln ('I guessed' +IntToString(x) +'times')
end.
?

apx900

2009-03-23 06:54:08

+ rep, excellent tut, would recommend to any one who is new to making scar scripts.

Hamsterdan1

2009-03-24 18:34:29

i dont know how to create an srl id
i know that its in some kind of srl stats section but i just cant find it!

longblade777

2009-03-25 01:34:06

thanks this actually really helped me make my own scripts =]

kakashi

2009-04-08 16:21:09

been studying this tutorial so much i got a headache! :P very nice layout of the whole thing and good explanations :> best tut ive seen so far! gj and thanks :>

V3n

2009-06-14 09:21:07

Very helpful intro for people just starting out. Well prepared!

COUGH

2009-06-17 06:53:21

Nice

Crazydictator

2009-07-10 19:02:23

Awesome guide. I suggest reading it, taking a break, and reading it again..=]

edtor

2009-09-14 03:55:16

thanks

Christian S

2011-04-08 04:11:51

The guides good. 9.5/10. xD
It took me some time to read, and yet I read it twice. Just getting into SCAR scripting, so had to make sure I knew everything. Nice guide though mate.