PDA

View Full Version : Unmatched Beginner's Guide to Scripting Scar



Pages : [1] 2

WhoCares357
12-30-2006, 05:16 AM
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) (http://www.villavu.com/forum/showthread.php?t=7581)

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 (http://www.villavu.com/forum/showthread.php?t=7999).


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’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’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] ---------------------+




+--------------------- [Scar 2.03] ---------------------+


--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 “Color Picker” in the Scar toolbar or just press “Ctrl+Alt+P” 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, “16777215” is the color number.
“(182, 364)” 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 –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’s all for explaining Scar my pupils. Now let’s begin the fun part: scripting.




+--------------------- [Scar 2.03] ---------------------+




+--------------------- [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 “program” 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 “program”) 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 “begin”, the last “end”, 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 “end” 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 “begin” and “end” 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’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’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! “Wait(500)” 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’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’t used unless you tell the program to use it. It is like a part of the script written so that later you don’t have to write out the whole thing again. As in this example, the procedure “Stay” will now replace the need for you to write out “Wait(500)” every time you need it.

Let’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’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 “Write”. This is another command. “Writeln('')” is a command that writes what you put between '' in the Debug Box. By the way, the “l” in “Writeln” is “L”. I got this confused with “I” the first time I learned the command.

Once again, I wrote the procedure “Write” 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 “Write” in the procedure “Stay”. 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 “Write” and placed it before procedure “Stay” so that I could use it in there. If I had written the procedure “Stay” with the procedure “Write” included, and then typed the instructions for procedure “Write”, 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, “Has this guy gone bunkers, what does this have anything to do with colors?” Well, no I’m not crazy, and Scar has everything to do with colors. Scar in itself even has a color picker! (“Ctrl+Alt+P”) 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’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’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 “True” and “False”

First, let’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’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’s look at these one by one.

First there is the integer. Now, if you aren’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 “i”, 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 “i” 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’t worry about it for now.

Alright, now let’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’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 “Greeting” 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’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’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. “If” i is zero, then Scar returns the value that this is true. “Then” if “If” is true (i really is zero), then it does what you tell it after then. However, if the value of “If” 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’t necessarily need “end else”. If you don’t tell it what to do if the value is returned false, it just won’t do anything.

This might be hard to understand, but just don’t worry about it yet if you don’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’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’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’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, “FindColor” 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 “x,y” are just there to fill in the coordinates where Scar finds the color. The “FishColor” is the constant that we have set earlier. Instead of FishColor you could have just wrote the color number. The last part, “0,0,600,600” tells Scar from where, upper left, to where, lower right, to search for this color.

In this way, I transferred the color “FishColor” into the function.

Ok, now once you’ve mastered this, let’s move on. You know how to use constants to transfer colors, now let’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’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 “+random(200)”. 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 “1000miliseconds = 1second”.




<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 “Writeln”. (”l” is “L” not “i”) This function types what you insert between “('')” 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 “Other” section of this tutorial.

Next we have “Wait”. Refer to the above function description if you have not yet.

Finally we have “SendKeys”. 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 “('')” 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, “chr(13)” represents the key “enter”.




<Color>

This is an example:

program FindColorExample1;

var
x,y: Integer;

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


Oh, don’t get scared now. Let’s take this step by step.

This function finds the color that you tell it to find (“293419” in this example) and saves the place where it found the color in “x,y”.

The “x,y” 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 “x,y: Integer;”.

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 “577,7,727,163”. This goes all the way back to the first lesson. This part of the function tells Scar where to look for the color. “577,7” are the coordinates for the top left corner and “727,163” are coordinates for the bottom right corner of the square in which Scar looks for the color.

“FindColor” 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’s take a look at this example.

Let’s say that you want to look for color “242” in “0,0,100,100”. 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.

“MoveMouse” moves the mouse to the coordinates you place between “()”.

Refer to a previous lesson for the “Wait” function.

“ClickMouse” clicks the mouse at the coordinates you place between “()”. The “true” stands for clicking the left mouse button, while if you put “false” 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.

“25+random(2)” will tell Scar to move the mouse anywhere from 25-27 for the coordinate x and “250-random(20)” will tell Scar to move the mouse anywhere from 230-250 for the y coordinate.


Let’s explore some other forms of the function “MoveMouse”.

This is an example:

program MoveMouseExample3;

begin
MoveMouseSmooth(25,250);
end.


This function works the same as “MoveMouse” 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 “MoveMouseSmooth” except that it moves the mouse more humanlike. The last part that starts with “+random” are options for humanlike response. Press F1 in Scar and scroll down to MoveMouseSmoothEx to see the options for this.


Let’s explore a few other forms of the function “ClickMouse”

This is an example:

program ClickMouseExample1;

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


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

Refer to a previous lesson for description of “Wait” function.

“ReleaseMouse” works alongside “HoldMouse” and releases the mouse from being held as clicked. “true” acts the same as in “ClickMose” and “HoldMouse” functions.


Now let’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 “MonsterColor” 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 “FindColor”, 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 “File, Edit, View, etc.”

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.
“Fish” 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’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 “FreeBitmap” 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’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, “FindBitmap” is the function to find the bitmap on the whole screen. This function searches the whole screen. “Fish” in the example is the bitmap name that you want to find. “x,y” 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 “FindBitmap” is “FindBitmapIn”. “FindBitmapIn” is the same as “FindBitmap” 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 “Fish”.



<Other>

This is an example:

program DebugExample1;

begin
ClearDebug;
end.


“ClearDebug” 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.


“IntToStr” takes the integer you put between “()” 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 “Wait” function:

Wait(1000+random(100));


Scar will now wait anywhere from 1000 to 1100 seconds.

This is how to randomize “MoveMouse” 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 “i:=random(10);” then i could be 0 to 9, but it can not be 10.




--Loops/Until--

Have you ever wondered, “How does the script keep going after it’s done something once?”

This is what programmers call “loops”. If someone refers to a loop it means that the program starts from a position where you tell it to start again from. Let’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 “until” and between “()”, you write “i>=” 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. “Includes” is a way to use these procedures in other scripts so you don’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’re creating or the “Includes” 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 “.include “.

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 WhoCares_357@yahoo.com 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
01-01-2007, 05:51 AM
thx for this script! it really helped me out! very cleanly written and explains things well. nice job!

WhoCares357
01-01-2007, 06:03 PM
Thank You.

japman
01-03-2007, 04:01 PM
this was a great help to me thank you

Shot_j00
01-06-2007, 05:44 PM
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
01-06-2007, 10:26 PM
awesome tut i read it all in one sitting. i understand scar that much more!

WhoCares357
01-07-2007, 02:44 AM
Thanks for feedback guys. I fixed a few errors in the script examples.

Wanted
01-19-2007, 04:07 AM
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
01-25-2007, 09:41 AM
Very nice, well structured and very informative.

10/10, keep up the nice work

-Mad Cow

WT-Fakawi
01-25-2007, 10:44 AM
stickyfied.

d3hm3d
01-26-2007, 01:44 PM
ty for this i managed to build my first script its in rs non srl scripts section!!!!

d3hm3d
01-26-2007, 01:50 PM
is there any srl tutorials???
http://www.fenjer.com/adnan/SRL/21/0.5/learning%20to%20script.png (http://www.fenjer.com/adnan/SRL/)

WhoCares357
01-26-2007, 10:33 PM
Idk, I would like to look at one myself. If you find one, please pm me.

Pentti
01-27-2007, 08:52 AM
I really like this tutoial, very easy to understand for people who are learning scar scriptin. Good work.

Bam Bam
01-27-2007, 08:56 PM
Wow, this is big! It needs chapters :S

WhoCares357
01-29-2007, 03:28 AM
Thanks for all the feedback guys. I made this guide for the public, and I am glad that the majority appreciate it.

Mjordan
01-29-2007, 07:50 PM
hey thanks man this helped me tons!

b4d1
01-30-2007, 09:40 PM
ty its very helpful

thiefmn6092
01-31-2007, 02:54 AM
Great Tutorial! you++

wstephen4
02-01-2007, 10:57 PM
Thanks for the information, I will hopefully try to use it to a good macro (is that an oxymoron?)

WhoCares357
02-01-2007, 11:52 PM
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
02-03-2007, 06:01 AM
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
02-03-2007, 06:57 AM
Glad I could help.

Mithril Fish
02-03-2007, 02:55 PM
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
02-03-2007, 03:51 PM
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
02-03-2007, 04:28 PM
Man this is awesome! Thanks man! 10/10!

haxal
02-05-2007, 12:46 AM
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
02-05-2007, 04:01 AM
ohh forget i just re instal all and start scripting =)

Hamish
02-05-2007, 03:28 PM
Wow,This is great the only bit I dont understand is "Variables And Constants"

WhoCares357
02-05-2007, 11:01 PM
What's you msn? I'll help you a bit with that.

Dunceiam
02-09-2007, 04:49 AM
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
02-09-2007, 04:57 AM
Dankness did you not hide this url from google, or are those morons from inside the cheating community?

WT-Fakawi
02-09-2007, 07:16 AM
banned both of 'm.

Sh33pzer
02-09-2007, 06:07 PM
this is awesome thankyou. i am new and this will help alot ty :(h):

WhoCares357
02-09-2007, 10:17 PM
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
02-09-2007, 10:21 PM
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
02-12-2007, 11:46 PM
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
02-18-2007, 07:34 AM
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
02-18-2007, 12:05 PM
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
02-19-2007, 07:27 AM
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
02-23-2007, 02:10 AM
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
02-23-2007, 03:44 AM
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
02-23-2007, 08:52 PM
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
02-23-2007, 09:49 PM
very nicely done... will try and make something up when i get a bit of time.

thank you very much

WhoCares357
02-23-2007, 10:30 PM
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.


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
02-24-2007, 09:20 PM
thanks for the awsome tutorial, its helped me out alot, :)

srl89
02-27-2007, 02:30 AM
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
02-27-2007, 07:16 PM
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
02-27-2007, 10:09 PM
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
02-27-2007, 10:14 PM
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
02-27-2007, 10:24 PM
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
02-27-2007, 11:03 PM
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
02-27-2007, 11:43 PM
andrey0ll@yahoo.com

It's msn not yahoo.

Macro manning
02-28-2007, 03:24 AM
It was heplful thanks.

qweqwe
03-01-2007, 08:39 AM
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
03-01-2007, 11:58 AM
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
03-05-2007, 05:43 AM
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
03-08-2007, 01:27 AM
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
03-09-2007, 04:40 PM
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
03-10-2007, 04:01 PM
.

Smartzkid
03-10-2007, 04:03 PM
Wow. This forum has been invaded by adbots.

SonOfSheep
03-10-2007, 05:43 PM
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
03-12-2007, 01:58 PM
Wow. This forum has been invaded by adbots.

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

psycomunky
03-17-2007, 02:35 AM
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
03-17-2007, 04:10 AM
You need to download SRL...

-Dunceiam

skullbr00d
03-17-2007, 02:01 PM
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
03-17-2007, 02:41 PM
Glad it helped.

n3ss3s
03-20-2007, 05:55 PM
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
03-20-2007, 09:09 PM
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
03-23-2007, 08:17 AM
I've read the whole of it. Thank u very much for writing everything out. :)

Ashur2Good
03-26-2007, 12:23 PM
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
03-27-2007, 12:01 AM
^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
04-06-2007, 04:00 AM
wow. thanks, i can really use this

wobbii
04-09-2007, 07:32 PM
nice tut man, helped me out lots, im learning as i go. ill go check out your new tut soon and comment

Zorlin
04-10-2007, 07:04 AM
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
04-10-2007, 09:19 AM
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
04-10-2007, 10:27 PM
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
04-11-2007, 11:17 PM
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
04-12-2007, 01:50 AM
Thanks man, really helped me with my scripts.

soupnatizzle
04-16-2007, 06:08 AM
great stuff bud.

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

:) thanks a bunch

MylesMadness
04-17-2007, 02:59 PM
This was a great [tut]. I might get working on a auto now.

archerdv
04-18-2007, 03:22 PM
whoa thanks you this is exactly what i was looking for. you are great!

jahiti
04-23-2007, 07:45 PM
Thanks from this but now i have to go sleep im tired and clock is 22.45 :)

NewToAutoing
04-23-2007, 09:52 PM
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
04-23-2007, 11:45 PM
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
04-24-2007, 01:35 AM
Thanks for the correction, guys. Will fix right away.

slayerkiller13
04-24-2007, 06:44 PM
nice guide tyvm was my first guide that i learn about scar scripting from :D

blue steel
04-25-2007, 03:49 PM
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
04-26-2007, 01:23 AM
Oh yeah, i will most defienatly start Scripting now. And thanks to this guide things will go 25x Easier, Thx bro. =)


Woot

Dunceiam
04-29-2007, 02:19 AM
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
04-29-2007, 04:24 PM
its so detailed i got half way through then needed to take a break.
Thanks alot.

Maxine
05-05-2007, 08:35 PM
now im a bit less noobie in scripting:)
thanks!!

Tazzie 02
05-06-2007, 08:41 AM
Thanx!
Helped me heaps. Went from knowing nothing 2 something!

Tazzie

Inf456
05-09-2007, 12:30 AM
Very nice tut. 10/10

Robbiej
05-12-2007, 07:37 PM
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
05-12-2007, 07:52 PM
Try have scar to the side and RuneScape in the background.

Robbiej
05-12-2007, 07:54 PM
My firefox minimizes...

BTW: i forgot to say... Great tut!

EDIT: Problem solved

muffinman177
05-20-2007, 04:27 PM
This really helped me... thx:)

venomhead
05-21-2007, 10:23 PM
Thank you, very nice tut. Clean and well written. Im going to try to make yet another autospammer!

Shave Ice
05-22-2007, 01:16 AM
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
05-22-2007, 10:25 AM
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
05-22-2007, 03:07 PM
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
05-23-2007, 09:12 AM
nice tut man, helped alot!

wogboy12
05-23-2007, 09:43 AM
thx very nice

evilwalrus
05-26-2007, 07:14 PM
thank you that was very helpful

salada man
05-29-2007, 03:53 AM
Wow mate. Your a bloody legend! Cheers:)

newb cheater
06-01-2007, 08:37 AM
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
06-02-2007, 07:52 PM
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



http://www.fenjer.com/adnan/SRL/21/15/Learning%20How%20To%20Script.png (http://www.fenjer.com/adnan/SRL/)

WhoCares357
06-02-2007, 11:48 PM
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
06-04-2007, 06:33 PM
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
06-04-2007, 10:03 PM
Search in the Free Scripts section.

farfen
06-05-2007, 02:46 AM
thank you so much i cant wait till i finish my first script

Tim0suprem0
06-05-2007, 08:32 PM
Thanks a bunch!:D Made a lot of things very clear i.e. made me want to pursue learning to script!

muffinman177
06-06-2007, 07:31 PM
After learning everything on this tut are we supposed to move on to Intermediate?

WhoCares357
06-06-2007, 10:18 PM
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
06-08-2007, 12:36 AM
Okay, thanks.

bro of mist
06-16-2007, 02:00 AM
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
06-16-2007, 08:02 AM
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
06-22-2007, 09:34 PM
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
06-22-2007, 11:13 PM
Lol - Hey dude - I read this tut on your freewebs site.

WhoCares357
06-23-2007, 01:49 PM
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
06-24-2007, 01:28 AM
Thank You this helped ALOT!

Giga
06-27-2007, 11:49 AM
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
06-28-2007, 09:43 PM
thanks for the tutorial i understood it good. im that much closer to scripting now :)

Here
06-28-2007, 09:55 PM
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
06-29-2007, 06:19 AM
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
06-30-2007, 01:29 PM
Thank you, this helped me refresh my memory, i haven't used scar in about a yr + 1/2 thanks, awesome tut :)

Sinfulend
07-01-2007, 07:20 PM
ty this taught mealotabout scripting it is very well put together and easy to understand

tdawg165
07-07-2007, 05:32 AM
Very nice... this is one of the best tuts i have read so far....
Tyvm!:D

yamaha317
07-11-2007, 09:53 PM
thanks a ton dude this helped me on my first steps to become a programmer =)

JWM
07-13-2007, 02:24 PM
hey thanks that really help but the only thing i didnt get was variables.
thanks allot,

jwm.:)

mogwairn
07-14-2007, 11:22 AM
thanks very much for this, hopefully il be writing my own scripts in no time :)

thunar
07-16-2007, 05:14 PM
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
07-17-2007, 02:51 AM
I posted the tut in more than one place: http://sythe.org/showthread.php?t=148839

Buzzy
07-17-2007, 10:40 AM
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
07-17-2007, 07:38 PM
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
07-18-2007, 12:27 AM
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
07-20-2007, 07:24 PM
wow good tut

lamatime
07-24-2007, 12:32 AM
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
07-26-2007, 09:06 AM
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
07-28-2007, 01:10 AM
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
07-31-2007, 11:21 PM
great tut, thx

mynameisjoe
08-06-2007, 02:08 PM
Excellent Tut!! This helped me a lot!

P1nky
08-07-2007, 05:13 AM
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
08-07-2007, 11:32 AM
Very nice Tut! Informative, descriptive, and easy to understand. :D

m4geab0rtz
08-07-2007, 10:44 PM
Very helpful. Thanks =)

BabeMagnet
08-08-2007, 01:13 AM
how do u put it all together?

shadowpwner
08-08-2007, 04:13 AM
very nice, helped me alot.

warrockownz
08-08-2007, 08:20 AM
wow ty i came up with at least 20 scripts because i learnt :P .. sorry there not for rs

hangman72091
08-13-2007, 10:28 PM
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
08-15-2007, 06:56 PM
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
08-19-2007, 07:31 PM
its a great tut
good for beginners like me :)

valesar
08-21-2007, 05:08 AM
Awesome Tutorial, helped me a ton. Now I just hope i can get good at the more advanced stuff.

I B X R
08-22-2007, 05:56 AM
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
08-25-2007, 01:17 AM
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
08-31-2007, 02:31 AM
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
09-01-2007, 12:39 AM
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
09-01-2007, 05:28 PM
Ty dude that was very helpful!!!!!!

pureskull123
09-01-2007, 10:36 PM
why does my pc detect a trojan on scar??? great tut though

gothicly2
09-03-2007, 12:24 AM
Very nice tut, really liked it, learned some stuff! Now to start coding and build an army!

rdk
09-03-2007, 04:09 AM
very detailed! im starting to get the hang of scripting :D tyvm!

Macchew5
09-03-2007, 04:42 AM
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
09-03-2007, 04:49 AM
Wow, excellent tutorial. Took forever to read, but i'm glad I did. Thanks!

lordofdapoop
09-03-2007, 07:24 AM
Great tutorial!

munchkinruss
09-03-2007, 08:33 AM
thank you =D

viece
09-03-2007, 12:57 PM
Thanks, ive been looking for this. It helped me out alot =)

strex
09-03-2007, 01:51 PM
Thanks alot mate :) you helped me alot.

faster789
09-03-2007, 02:26 PM
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
09-03-2007, 05:26 PM
very very nice tut man. I just started learning to script a couple days ago and this really helped out thxs. :D

DA_bossman132
09-03-2007, 05:48 PM
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
09-03-2007, 05:52 PM
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
09-03-2007, 06:59 PM
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
09-03-2007, 09:32 PM
nice guide, first one i read though :P looks impressive comparing to any guide (not just scripting guides)

Eacis
09-03-2007, 10:10 PM
W00t tnx

pathway27
09-04-2007, 01:23 PM
Thanks learned a lot!

sapetto
09-04-2007, 02:14 PM
This tutorial helped me a lot! I recommend it to every beginner

campross.04
09-04-2007, 02:15 PM
hey just a thanx this tut has helped me with my scripts alot be posting my first script soon ya :D

sparkles
09-04-2007, 03:43 PM
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
09-04-2007, 11:06 PM
very nice tutorial im now working on my first script

cptn
09-05-2007, 03:37 PM
Thanks for the guilde :cool: now i can start scripting my own script ;}

mattar
09-07-2007, 08:25 AM
amazingly detailed.. gr8 job.. such in depth tutorial tht makes it seem like scripting is a piece of cake

purexas
09-07-2007, 07:31 PM
that rly helped ^^ :duh:

Genesis
09-07-2007, 09:19 PM
Amazing tutorial, I'm learning a lot from it.

kornthebldgd
09-07-2007, 10:30 PM
Thanks so much man this is going to help me out alot.
Korn

picklemansus
09-09-2007, 03:55 AM
Click on tools and picture to string

Not Script

xxtrem3
09-09-2007, 09:53 AM
Hey, can anyone help me out with antiban ?
I need it for my power cutter .

Czepa
09-09-2007, 12:49 PM
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:

procedure CheckVersion;
begin if version=<3 then
begin Writeln('Version is out of date')
end;
end;
// rest of script

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?

procedure CheckVersion;
begin if version=<3 then
begin Writeln('Version is out of date')
end;
// rest of script

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
09-09-2007, 10:42 PM
awesome:)i readed it carefully and learnt something at all.Wish a day i'll make a script..:pthanx

114 boo
09-10-2007, 08:55 AM
this tut ownz

WhoCares357
09-10-2007, 11:42 PM
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:

procedure CheckVersion;
begin if version=<3 then
begin Writeln('Version is out of date')
end;
end;
// rest of script

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?

procedure CheckVersion;
begin if version=<3 then
begin Writeln('Version is out of date')
end;
// rest of script

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.

Zyt3x
09-11-2007, 02:20 PM
(* And *) is Comment to..

Example:
Copy/Paste this into scar.

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

Juitar1
09-13-2007, 04:15 AM
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
09-13-2007, 11:02 AM
O rly nice guid thanks

masterBB
09-13-2007, 08:15 PM
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
09-14-2007, 12:04 PM
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
09-14-2007, 04:09 PM
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
09-14-2007, 05:50 PM
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
09-14-2007, 08:04 PM
Tysm!!!

qasim11
09-15-2007, 08:11 AM
woah i get it now ! this is soo helpful ( must have taken u ages to write this tut :D )

Qasim

masterBB
09-15-2007, 09:56 AM
can anyone post me a good working bitmap image from a bone in the chaos temple??

I really need it..

good tut anyway

Aser
09-16-2007, 05:22 AM
That tut can be classified in one word 'sweet'

Thank you for using your precious time to teach us.

BuuB
09-16-2007, 12:21 PM
nice guide.

kertkert
09-20-2007, 06:33 PM
Nice tutorial! It helps A LOT if you havent scripted in SCAR before. Rep +

NineBit808
09-21-2007, 10:34 PM
i read this a couple days ago and it has helped tonnes thats alot man. keep it up

michaels
09-21-2007, 10:37 PM
WOah, that was a very thorough script explanation.

Well done. I rate it(y)

wazul
09-23-2007, 12:46 AM
thanks:D

Nikize
09-24-2007, 06:54 AM
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
09-25-2007, 12:31 AM
such a detailed tut, u have cleared up sooo many questions i had
TYVM :D

cris2
09-26-2007, 03:32 PM
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
09-27-2007, 02:56 AM
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
09-27-2007, 09:02 AM
Just good for learning basics of scar...

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

Acel92
09-27-2007, 06:46 PM
Ty for a very nice, detailed begginner guide!! 10/10
Going to make my first script: autosmither

blankblankblank
09-28-2007, 01:23 AM
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
09-28-2007, 03:35 AM
thanks for this tutorial its so awesome!

Kryptospridium
09-28-2007, 09:31 AM
Oh no!! to much learning! brain...attempting to...leave skull!!
Now, seriously, very good! Easy to understand, lots of examples, heaps good!

Belt
09-29-2007, 01:53 AM
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
09-29-2007, 04:35 PM
thank you very much for this. this will help out a lot

§hãttêrëd Rèƒlé¢tîøñ
09-29-2007, 08:19 PM
Helped a TON! This is going to greatly help me in the long run. Thank you so much.

blr
09-30-2007, 06:15 AM
I love you, this tutorial has really helped me. I just created my very first script :D

PeteJohn
09-30-2007, 02:41 PM
Thanks for the tutorial, I been loooking for a good beginners tutorial for a long time, thanks

Sk8boardinggit
09-30-2007, 03:58 PM
Dude. Ty so much. I read this and it helped me learn alot about scripting. Ty!

shadowkawn
10-02-2007, 11:59 PM
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
10-04-2007, 03:24 AM
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
10-04-2007, 08:23 PM
Thanks a lot for the tutorial. I'm somewhat catching on to how this works.

Ersatz
10-05-2007, 06:26 AM
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
10-05-2007, 12:41 PM
extremely useful, thanks !

davidwang95
10-10-2007, 07:28 PM
helped a lot:D

parkkicks
10-12-2007, 06:32 AM
great job! i hope to see some intermidate and advanced tuts from you!

schoony
10-13-2007, 03:51 PM
Thanks!!!

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

Rawr_Cabbage
10-14-2007, 09:49 PM
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
10-14-2007, 09:57 PM
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
10-15-2007, 06:11 AM
Absolutely awesome.

Definitely going to script now.

=]

:stirthepot:

mo59827
10-15-2007, 06:17 AM
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
10-16-2007, 03:56 AM
Wow thanks a lot :)

Sweden
10-16-2007, 09:26 PM
Hey, that was a nice guide, it learnt me alot! Thanks :)

harm133
10-18-2007, 05:00 PM
Roflz =o pretty easy if you read this ^^

kuumalaukaus
10-19-2007, 09:16 PM
Great guide. :)

Drone1000
10-20-2007, 10:53 AM
wow! Really nice guide!

M3talhe4d
10-21-2007, 06:29 PM
This was a fantastic read, I have a learned alot, thanks

ZaSz
10-21-2007, 07:09 PM
Wow thanks!

warlord0522
10-21-2007, 08:36 PM
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
10-22-2007, 09:28 PM
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
10-22-2007, 10:44 PM
Is it possible to script SCAR in 3d?

silenttt
10-24-2007, 12:02 AM
Nice tut. Someone should make some good video tutorials on this language.

WhoCares357
10-25-2007, 12:45 AM
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
10-25-2007, 07:23 AM
@_@ wooooah...
geez ~ ty
helps me understand scar alot ! woot !!

LEMON118
10-25-2007, 10:08 AM
Thank You, that was brilliant, I will be sure to use this :D

Tepear
10-27-2007, 05:24 PM
I read it from top to bottom. It really really helped me understand the basics and
how things work together.

bth8
10-28-2007, 05:06 AM
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
10-29-2007, 11:02 AM
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 ;).