Page 1 of 3 123 LastLast
Results 1 to 25 of 64

Thread: Tutorial for the "Beginner Scripter". With video aid.

  1. #1
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Tutorial for the "Beginner Scripter". With video aid.

    If anyone wants to, you can look at the intermediate tutorial being made at: http://www.villavu.com/forum/showthread.php?t=32490

    About 50% complete contains:

    *More types such as the Extended type.
    *Math, some operators.
    *More keywords.
    *More about functions and procedures.
    *More Color Finding techniques.
    *Bitmaps.
    *DTMs.
    *Including.
    *Scripting for runescape.
    *Using SRL effectively. - Text handling, chat box, global constants.
    *Intermediate level looping.
    *Intermediate level logic. -Fail safes ect..
    *Anti-Randoms, Anti-Ban.
    *Constructing an SRL script.
    *Using SRL Stats.
    *More math, radians/ degrees ect..
    *Map walking.
    *Dynamic DTMs (DDTMs)
    *Types.
    *Arrays.
    *Introduction to forms.
    *More standards.

    Now for the beginners tutorial:

    ________________________________________________

    Hello and welcome to my tutorial for the beginner scripter! Here I will be teaching you the basics and foundations you will need to create your very own SCAR scripts! First off make sure that you have completed the SCAR and SRL setup and I'd also recommend but not at all necessary setting up and running scripts. First a little about what SCAR is and what scripts are, SCAR - "Shite Compared to Auto Rune" is a macroing program originally designed by Kaitnieks and now continued by Freddy1990, the program is designed to Macro (Automatically do tasks!) of course, what makes SCAR so unique and amazing is it's ability to run scripts! A script a basically a big ol' instruction book for SCAR to use to do its tasks. But scripts have to be made! People who make scripts are called scripters, at the end of this tutorial you will be a scripter! (A beginner one atleast ) Now being a scripter does come with some pride, we tend to use grammar, well, because that's just part of being a good scripter! You code clean and you write cleanly! It will set everyone to have a good impression of you and you will seem more professional, this way you can build reputation and respect, using proper grammar also helps you code, using the right typing techniques and styles also help you be a better script, just keep that in mind Another thing to keep in mind is, you may become a little bored during some parts of the tutorial, please bear with me! I will try and make this enjoyable as possible and easy to understand by using animated .gifs and examples, you will thank me and yourself if you really read this tutorial, try and have fun you'll learn better and have a better experience that way! Oh and one last thing, this is somewhat of a hands on approach! To most effectively learn you should open up your SCAR and try doing things yourself so you can get a feel for it. Now with out further ado, let's begin learning how to make scripts, and become a scar scripter!

    Let's start off with the basic template that loaded when you opened up SCAR,

    SCAR Code:
    program New;
    begin
    end.

    This is called the default script, you can change this simply by changing that and going File -> save as default, then everytime you load up SCAR it will load the default script!

    You will notice that program, begin, and end are all bolded, we call these keywords! keywords should always always always always always always always, always be lowercase! Let's learn what these keywords are.

    program - This key word doesn't serve much of a purpose, it's there mainly to just name your program, you could just as easily remove it and your script would run fine, but I just leave it in there anyways. program should always be at the top of your script (unless you want to put instructions above that I'll explain that later) and to name your program you can use numbers and letters with no spaces and I usually capitalize the first letter of every word and then follow with a semi-colon, here is an example, program MyScript; program FirstScript; here is an example of a BAD program name that will give you errors, program My Script;

    begin - Tied with end , begin is the most used keyword! begin simply signifies the begging of something, in this case it is the begging of your script!

    end - Tied with begin , end is the most used keyword! end simple signifies the ending of something, in this case it is the end of your script, but the very last end in a script is very special it is followed by a period '.' to signify the end of the script, so it will appear as end. every other end you see will be followed by a semicolon as such end; except for in rare cases which we will get into later!

    To check for errors with out running the script we can compile it. Compiling is to see if your script will run, basically what it should say is 'check for errors' because compiling is something else completely different, anyways for SCAR lingo we are going to say compile (SCAR can't produce .EXEs!) if we compiled successfully it should say successfully compiled then we can go ahead and click the green arrow to run it (you do not have to compile to run), note: To stop push the red square, short keys are 'CTRL+Alt+R' for run, 'CTRL +Alt + S' for stop, and 'Ctrl + F9' for compile, if your short keys don't work, close all SCARs and open 1 SCAR.



    Next we are going to learn some simple commands, also called functions and procedures that are built right into SCAR. First we are going learn the WriteLn command! WriteLn is very simple, to use it simply place your text in, WriteLn('Here!'); and it will appear in the debug box! Here is a Hello World example script:

    SCAR Code:
    program HelloWorld;
    begin
      WriteLn('Hello World!');
    end.



    But the debug sometimes is full of junk! We can clean up our debug box by clicking the eraser on the toolbar or by calling another command called ClearDeBug; very easy to use!

    SCAR Code:
    program HelloWorld;
    begin
      ClearDeBug;
      WriteLn('Hello World!');
    end.

    Now lets learn Wait and Sleep!, Wait and Sleep make SCAR wait around for a certain amount of time, what's the difference between wait and sleep? Wait is like waiting for a phone call, and sleep is like falling a sleep and waking up from a phone call! Now don't let my analogy scare you, this is the easiest command ever in SCAR. To use wait thing of mili-seconds, 1 second is 1000 mili-seconds, 2 seconds is 2000 mili-seconds, 10 seconds would be 10000 mili-seconds, or you can really accurate and use something crazy like 42 mili-seconds or 59563 mili-seconds. Now how do you know when to use Wait and not Sleep, or when to use Sleep and not Wait? Well that's easy! If it's more than 10000 mili-seconds (10 seconds) then use Sleep! otherwise if it is less than 10000 mili-seconds (10 seconds) then use Wait! Here is a simple example of waiting and sleeping.

    This will wait for 4 seconds.

    SCAR Code:
    program WaitSome;
    begin
      Wait(4000);
    end.

    This will sleep for 11 seconds.

    SCAR Code:
    program SleepSome;
    begin
      Sleep(11000);
    end.

    The last command we are going to learn for now is the Random function, Random. Let's say, instead of waiting exactly 2 seconds everytime, we want to wait 2 seconds plus some random time (this is used to help lessen Runescape detectability ) here is your example:

    SCAR Code:
    program WaitPlusRandomExample;
    begin
      Wait(2000 + Random(1001));
    end.

    Since the random function starts at 0 we will need to add 1 to it to make it the value, for instance 10 would be 11 ect.. this example script will wait 2 seconds plus a random number of mili-seconds between 0 and 1000 mili-seconds.

    The same can be done if we want to wait randomly less time.

    SCAR Code:
    program WaitMinusRandomExample;
    begin
      Wait(2000 - Random(1001));
    end.

    We'll get back to learning more commands (procedures and functions) later.

    I'm going to teach you a few concepts now, the first and one of the most commonly used is the coordinate system! Commonly referred to as X & Y when graphing in math. The first thing we can use it for is finding, well, a coordinate! a specific point or location! an example of a coordinate would be (2, 5) with 2 being the X and 5 being the Y.



    This is very useful because your computer screen is made out of pixels!

    Little boxes all over your screen that if you zoomed way in would look like this:
    ---------------------------------------------------------------------------------------


    see how the words appear to be blocky and are composed of tiny little squares call pixels, well each of those pixels can be used as coordinates! Here is what 15, 8 would look like on that.



    Unfortunately we all have different size computer screens with different resolutions! Fortunately we have something call Crosshairs! Cross hairs are used to specify a client! That way we can use just the client for our coordinate system and no matter what computer you are on, if you specify the client the coordinates will be the same!

    This is taken from my setting up and running scripts tutorial:



    Coordinates are used to find an exact point on your screen!

    Now how is it that they are useful? Well I'm going to show you, but I'm going to need to introduce a concept called variables, a variable is something that can change depending on the situation, now in SCAR we use them to temporally store data! For now we are going to store X and Y as integer values (numbers!) all we need to do is declare them:

    SCAR Code:
    program XYExample;

    var
      X, Y: Integer;

    begin
    end.

    As you can see, var is a keyword and it's used it to declare variables! Now what is the point of this? Well now we are going to learn a new command called MoveMouse! This command is a very simple command that will move the mouse lighting fast in a straight line (DO NOT USE FOR RUNESCAPE IS DECTABLE) we are justing going to use it now for an example. Now your mouse only knows how to do one thing with the mouse, move it to a coordinate! So in order to tell the mouse to move somewhere we must give it an exact coordinate! Now it is possible to just put in actual numbers for the command input such as:

    SCAR Code:
    program MouseExample;
    begin
      MoveMouse(100, 100);
    end.

    But let's say, when we are writing the script, we do not yet know what the exact coordinate is! This is a dilemma since we can only tell the mouse to move to an exact point! So we are going to have to use our X and Y variables!

    SCAR Code:
    program MouseExample;

    var
      X, Y: Integer;

    begin
      MoveMouse(X, Y);
    end.

    Now without touching the X and Y they are by default set to 0! Well we don't want to move our mouse to 0, 0, what ever we are looking for is probably isn't there!

    So we are now going to assign the variables:

    SCAR Code:
    program MouseExample;

    var
      X, Y: Integer;

    begin
      X := 100;
      Y := 100;
      MoveMouse(X, Y);
    end.

    Now X and Y are storing 100, this is somewhat pointless because you could just put 100 directly into the command, but let's say we want to move the mouse to a color! Well I'm going to introduce the FindColor Command! The point of this command is that you can't just simply tell your mouse "Alright mouse, move to red color" No! Your mouse only understands coordinates! so we need to use FindColor to Find the coordinates of the color so we can give them to the mouse using variables!

    To use find color we are going to need to use the Eyedropper to find our color first of all, and for this example let's get the color of the red stop button!



    Now we have the color to use in our FindColor command

    SCAR Code:
    program MouseExample;

    var
      X, Y: Integer;

    begin
      FindColor(X, Y, 7241966
      MoveMouse(X, Y);
    end.

    but we need to finish the rest of our input for the command!

    I am going to need to introduce another concept that is based off the coordinate system, it has no name but it basically is 'How to make a box!' Now the box we are going to find is going to be the box we are going to search for the color in. So all we need to do is find X1, Y1, X2, and Y2. For this click the mouse to the left, above, to the right, and below to form the edges of the box.

    But wait, we need to specify the correct client first!
    ----------------------------------------------------------------------------------------------


    Now to make the box to search for the color in



    Here is a rough picture of what the box would look like:



    Now to get the X1, Y1, X2, Y2 out



    8 is our X1, 0 is our Y1, 120 is our X2, and 22 is our Y2. Note: Some times these are referred to as XS, YS, XE, YE.

    Now we need to put these numbers into our FindColor command!

    SCAR Code:
    program MouseExample;

    var
      X, Y: Integer;

    begin
      FindColor(X, Y, 7241966, 8, 0, 120, 22);
      MoveMouse(X, Y);
    end.

    Press run! It should move the mouse over to the stop button!

    Now I'm going to introduce another concept! The concept of Logic!

    To start off, let us say that for some reason SCAR fails to find the stop button color! Well then we would be left with 0, 0 for our X and Y, we don't want to move the mouse there! So were are going to learn 2 new keywords if and then!

    if - This keyword is used just like if you were asking a question! if (this)...

    then - This keyword is used for an response to a question, well if (this) then do (this)

    Let's apply these to our FindColor script:

    SCAR Code:
    program MouseExample;

    var
      X, Y: Integer;

    begin
      if (FindColor(X, Y, 7241966, 8, 0, 120, 22)) then
        MoveMouse(X, Y);
    end.

    Now if for some reason we fail to find the color we won't move the mouse to the stop button! Now let's learn another keyword, else

    else - Used after an if then statement to specify what to do if the statement isn't true.

    Let's apply this to our color finding script:

    SCAR Code:
    program MouseExample;

    var
      X, Y: Integer;

    begin
      if (FindColor(X, Y, 7241966, 8, 0, 120, 22)) then
        MoveMouse(X, Y)
      else
        WriteLn('We could not find the color!');
    end.

    Well to test this, let's make the color function fail by specifying a wrong client, take your crosshairs and drag it to a random client.

    Now run the script.

    SCAR Code:
    Successfully compiled
    We could not find the color!
    Successfully executed

    Should appear in your debug window, now do you see how WriteLn can be useful?

    Ok so what if we want to click the mouse? This mouse command is called ClickMouse (DO NOT USE FOR RUNESCAPE!) it can right or left click. So lets make it left click the stop button after finding it and moving the mouse to it. But, ah! We can't use more than one thing with out adding a begin and end; clause, so add a begin and end; clause as shown below.

    SCAR Code:
    program MouseExample;

    var
      X, Y: Integer;

    begin
      if (FindColor(X, Y, 7241966, 8, 0, 120, 22)) then
      begin
        MoveMouse(X, Y);
        ClickMouse(X, Y, True);
      end
      else
        WriteLn('We could not find the color!');
    end.

    if we wanted to right click, we would use False instead of True.

    Let's drift away from the harder stuff for a second. Let us say that we needed to write a note but didn't want it to be compiled and part of the script run, there are two ways we can do this. The first way is to place // before what you say to make the rest of that line green commented notes, or you can specify a {} tags which can be a part of a line or even multiple lines!

    SCAR Code:
    {I can put instructions and stuff here it won't affect the script
    look you can even use multiple lines with these brackets!}


    program New;

    begin
    end.

    SCAR Code:
    program New; //Look I can type over here
    begin //But I need to use // on every line
    end.

    I only use {} brackets if I need to do multiple lines or need to use another part of that line after the comments, otherwise I just use //'s.

    Now let's take a look at constants! Guess what, it's another nifty keyword.

    const - A keyword that stands for constant, it's used to set constant variables in your script, they are virtually the exact same as variables except can only be set once before the script runs!

    Here is an example on how to use a const with our stop button script:

    SCAR Code:
    program MouseExample;

    const
      StopButtonColor = 7241966;

    var
      X, Y: Integer;

    begin
      if (FindColor(X, Y, StopButtonColor, 8, 0, 120, 22)) then
      begin
        MoveMouse(X, Y);
        ClickMouse(X, Y, True);
      end
      else
        WriteLn('We could not find the color!');
    end.

    notice how the stop button color was moved to the top under the const declaration and how the color in the FindColor command was replaced with the words StopButtonColor, this way the script user can easily access and change the variable once and it will change every single instance in the entire script! Constants can be very handy and are usually used for script settings.

    Let's learn another command, SendKeys, a simple command that is used to type keys (DO NOT USE FOR RUNESCAPE!) very simple to use, similar to WriteLn but uses keys instead of the debug box.

    SCAR Code:
    program BasicSendKeys;
    begin
      SendKeys('Text to type here');
    end.

    *Random hint, if you open SCAR and press F1 it will open the user manual, also another random hint: if you press control + space it will give you a list of everything!

    Ok now, I'm going to talk more about variables. There are 3 main types of variables. The first type which you have already used is an Integer, and Integer deals with numeric number values in base 10, in other words Integers are numbers, like you used in the FindColorScript and in Wait and Sleep. Integers are blue in SCAR's syntax color coding. The second type of variable is a string, now, for some reason string is a bolded keyword keep it lowercase! Strings are used for text, like you used in WriteLn and SendKeys, strings are pink in SCAR's syntax and must be between 'these' when being used to indicate that they are infact strings. The third main type of variable is a Boolean, pronounced Bool-EE-UN, Booleans are basically the Yes or No type of answer, a Boolean is either True or False, something is, something isn't.

    I will outline the three main types of variables more here.

    Integers - Used for numbers.

    * Displayed in blue text i.e. 100
    * They must be whole number values, negative or positive.
    * Examples: 100, -54, 3, 1, 0, I, X, Y.
    * They are declared as such:
    SCAR Code:
    const
      SomeNumberConsant = 100;

    var
      I: Integer;

    Strings - Used for text (words).
    * Displayed in pink text. i.e. 'Hello World!'
    * string is a keyword, keep it lower case!
    * Examples: 'Text', 'Words', 'Hello World!', S.
    * They are declared as such:
    SCAR Code:
    const
      SomeText = 'Hello world!';

    var
      S: string;

    Booleans - Used for "Yes" or "No" True, False, Is, Isn't type of data.
    * Displayed as normal words in SCAR (black text).
    * An example is True, False, B.
    * Declared as such:
    SCAR Code:
    const
      UseAntiBan = True;

    var
      B: Boolean;

    Using SCAR's syntax and code hints!

    Well if you open any SCAR manual (Press F1), look at the ctrl+space list, or even a code hint (Note: to enable code hints go to Tools -> Options -> Scripting settings -> Use Codehints -> Ok.) it will give you a syntax to look at to explain what to input. Let's take a look at some of the commands we have already learned:

    procedure WriteLn(S: string);
    procedure Wait(MS: Integer);
    procedure Sleep(MS: Integer);
    function Random(Range: Integer): Integer;
    function FindColor(var X, Y: Integer; Color, XS, YS, XE, YE: Integer): Boolean;
    procedure SendKeys(S: string);

    functions and procedures are subroutines, mini-scripts inside your script to do certain I will teach you how to make your own later. The difference between a function and a procedure is that a procedure simply runs a task, function runs a task and returns information! For instance, compare Wait and Random, you just tell wait to wait for a certain amount of time, with random you are actually getting some information back from the process to use, same with FindColor, the : Boolean; means you can use the entire function as a True or False value that you could use if (This) then... now back to the inputting.

    You will notice, the syntax will indicate what type of information to input for an input.

    WriteLn(S: string);

    You know that you need to have a string value for the input, so you need to put something in that is has the value of a string, whether it be a variable or an actual string such as 'Hello World!'. You could also do

    SCAR Code:
    var
      S: string;

    begin
      S := 'Hello World!';
      WriteLn(S);
    end.

    Same thing with the wait command, you know that

    Wait(MS: Integer);

    it's asking for an integer input, so you need to put in a number.

    Let's take a look at FindColor now:

    function FindColor(var X, Y: Integer; Color, XS, YS, XE, YE: Integer): Boolean;

    Well if you look you see the keyword var in front of the X and Y telling you that it has to be a variable and not just a plain data type.

    Here is correct input:

    FindColor(X, Y

    here is incorrect input:

    FindColor(100, 100

    but this only applies if the keyword var is used.

    The rest of the inputs are all indicated as Integer values so you can use a variable or a plain data type such as 100, 100, 100 ect..

    You should now be able to look at any syntax code hints and be able to input atleast the correct type of information for each input.

    More logic!

    I briefly explained if and then. Now I'm going to teach you the keywords and, or, xor, and not.

    and - Keyword used to check if all Booleans in a statement are True.

    or - Keyword used to check if atleast one Boolean in a statement are True.

    xor - Keyword used to check if ONE Boolean is True and all others are False, this means if one is true but the other isn't!

    not - Keyword used to check if something is False (not true).

    Using them!

    SCAR Code:
    begin
      if ((1 = 1) and (2 = 2)) then
        WriteLn('True!');
      else
        WriteLn('False!');
    end;

    It will return True because both 1 equals 1 and 2 equals 2.

    SCAR Code:
    begin
      if ((1 = 1) and (2 = 1)) then
        WriteLn('True!');
      else
        WriteLn('False');
    end;

    It will return False because 1 = 1, but 2 does not equal 1.

    SCAR Code:
    begin
      if ((1 = 1) or (2 = 1)) then
        WriteLn('True!');
      else
        WriteLn('False');
    end;

    It will return True because even though 2 doesn't = 1, 1 = 1.

    SCAR Code:
    begin
      if ((1 = 2) or (2 = 1)) then
        WriteLn('True!');
      else
        WriteLn('False');
    end;

    It will return False because 1 does not equal 2 and 2 does not equal 1!

    SCAR Code:
    begin
      if ((1 = 1) xor (2 = 2)) then
        WriteLn('True!');
      else
        WriteLn('False');
    end;

    It will return False because Both statments are True!

    SCAR Code:
    begin
      if ((1 = 1) xor (2 = 1)) then
        WriteLn('True!');
      else
        WriteLn('False');
    end;

    It will return True because one statement True and the other Statement is not true!

    SCAR Code:
    begin
      if (not (1 = 1)) then
        WriteLn('True!');
      else
        WriteLn('False');
    end;

    It will return False because 1 = 1 which is True so "not True".

    SCAR Code:
    begin
      if (not (1 = 2)) then
        WriteLn('True!');
      else
        WriteLn('False');
    end;

    It will return True because 2 = 1 is false and "not false" is True!

    Combining them!

    Well there's so many combinations that I'm not going to show them all otherwise you'd be here for hours! But heres a few just for you to get the idea:

    SCAR Code:
    begin
      if (not ((1 = 1) and (2 = 2))) then
        WriteLn('True!');
      else
        WriteLn('False!');
    end;

    It will return False because 1 = 1 and 2 =2 is true and not true is false.

    That's all you get :-P

    functions and procedures!

    Alright functions and procedures as you already know are sub routines, they perform a selected task. What's the purpose of this? Well it makes our script more understandable to read, also it keeps you from rewriting the same code all the time, and when you have an error you simply fix it one time and it effects all of the uses.

    Here is a basic procedure template:

    SCAR Code:
    program New;

    procedure SaySomething;
    begin
      WriteLn('something!');
    end;

    begin
      SaySomething;
    end;

    well that is pretty simple, maybe too simple, let's add some parameters to make the procedure more scalable:

    SCAR Code:
    program New;

    procedure SaySomething(Say: string);
    begin
      WriteLn(Say);
    end;

    begin
      SaySomething('Cool, now we can input it here like we did with the other commands!');
    end;

    Cool, now we are learning how the functions actually work as well as how to make them

    Next lets try making a simple function

    SCAR Code:
    program New;

    function TodaysWeather: string;
    begin
      Result := 'Sunny';
    end;

    begin
      WriteLn(TodaysWeather);
    end;

    Result is referring to the output of the function, so it returns a string for WriteLn to use.

    Lets make a little bit more complicated function using our stop button pushing script:

    SCAR Code:
    program MouseExample;

    function PushStopButton: Boolean;
    var
      X, Y: Integer;
    begin
      Result := FindColor(X, Y, 7241966, 8, 0, 120, 22);
      if (Result) then
      begin
        MoveMouse(X, Y);
        ClickMouse(X, Y, True);
      end;
    end;

    begin
      if (not (PushStopButton)) then
        WriteLn('We could not find the color!');
    end.

    You can see, I assigned the Boolean Result to whether or not the color was found, then I basically said if (FoundColor) then begin... and at the bottom I used some logic to write out whether or not it worked. You see, you need to combine all of your skills to make a script.

    We'll come back to this more in intermediate tutorials, let's learn some more keywords now. repeat and until. These keywords are used for looping! For now we are only going to make some basic loops!

    SCAR Code:
    program BasicLoop;

    begin
      repeat
        WriteLn('Hi!');
      until (False);
    end.

    repeat will signify the beginning of the thing to be looped, until will signify when to end, let me try and explain this more, False will repeat forever because False will never be True (can't get anymore simple than that) so if you did until (True) it wouldn't repeat at all because you've already told your loop until (now). We could however do something like until (WeHaveRepeated37times) but I want to show you a little conversion first.

    Converting variables to other variables!

    Here are some new function commands we are going to learn

    IntToStr(I: Integer): string;

    Change an integer into a string.

    StrToInt(S: string): Integer;

    Change a string into an integer.

    StrToIntDef(S: string, Def: Integer): Integer;

    Now let's say we try and convert Hello into an integer, it's not going to work because Hello isn't a number, in StrToInt your script would crash but in StrToIntDef it would return the default setting in case of failure.

    BoolToStr(B: Boolean): string;

    Boolean to string, True/False to 'True'/'False'

    StrToBool(S: string): Boolean;

    string to Boolean, 'True'/'False to True/ False

    StrToBoolDef(S: string, Def: Boolean): Boolean;

    incase of failure, see StrToIntDef.

    Now I'm going to do something that's a little tricky to get back to my looping point and combine my conversions:

    SCAR Code:
    program LoopAndConversionExample;

    var
      I: Integer;
     
    begin
      ClearDeBug;
      repeat
        I := I + 1;
        WriteLn('Hello world!');
        WriteLn('Note: you have said "Hello World!" ' + IntToStr(I) + ' time(s).');
        Wait(100);
      until (I >= 100);
    end.

    Run this script, it will say Hello world exactly 100 times! Note >= means greater than or = to.

    There is one last thing I want to get at before wrapping up this tutorial, and that is Scripting Standards!

    The very most important rule with scripting standards above all is consistency! If you're going to do something against the standard way of coding do it the same way every time! This is called style

    Now for the basics of scripting standards:

    I will start off with indenting!

    below is an example of how to indent correctly:

    SCAR Code:
    begin
      begin
        begin
          begin
            //code
          end;
        end;
      end;
    end;

    Two spaces below every key word that is displayed.

    I'm a bit lazy to explain everything, but for reference look at this small example script!

    SCAR Code:
    program New;

    function Something: Boolean;
    begin
      Result := True;
    end;

    procedure SomethingElse;
    var
      X, Y: Integer;
    begin
      if (Something) then
        WriteLn('Ah! Ok!');
      FindColor(X, Y, 255, 0, 0, 800, 600);
    end;

    begin
      begin
        begin
          begin
            begin
              WriteLn('Lol.');
            end;
          end;
        end;
      end;
    end.

    Notice every single detail, capitalization line spacing, commas, spaces between things, EVERYTHING.

    WRITE YOUR SCRIPTS NEATLY!!!!!!!!!!!!

    And most importantly, PRACTICE PRACTICE PRACTICE PRACTICE! That is the only way you will ever learn to be a good scripter, for now I'm very tired of typing and explaining, peace out. While your at it, check out this Bitmap and DTM tutorial by WhoCares357 - http://www.villavu.com/forum/showthread.php?t=9453

    I'm going to be writing my own bitmap tutorial, intermediate tutorial, form tutorial, Script for Runescape (Using SRL) tutorial, and advanced tutorials similar to this one with video aid and pictures and such until next time...

    That's it, you're now a beginner scripter, remember, practice is key.

    -IceFire908

    Edit:

    If anyone wants to, you can look at the intermediate tutorial being made at: http://www.villavu.com/forum/showthread.php?t=32490

    About 50% complete contains:

    *More types such as the Extended type.
    *Math, some operators.
    *More keywords.
    *More about functions and procedures.
    *More Color Finding techniques.
    *Bitmaps.
    *DTMs.
    *Including.
    *Scripting for runescape.
    *Using SRL effectively. - Text handling, chat box, global constants.
    *Intermediate level looping.
    *Intermediate level logic. -Fail safes ect..
    *Anti-Randoms, Anti-Ban.
    *Constructing an SRL script.
    *Using SRL Stats.
    *More math, radians/ degrees ect..
    *Map walking.
    *Dynamic DTMs (DDTMs)
    *Types.
    *Arrays.
    *Introduction to forms.
    *More standards.

  2. #2
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    WOW, nice job!

    gj IceFire!
    Co Founder of https://www.tagcandy.com

  3. #3
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    yet another good tut! wish i had this when i was learning

    (vid) =D

  4. #4
    Join Date
    Dec 2006
    Location
    SC
    Posts
    692
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Very nice tutorial. I liked the extra pngs .

    You got two mistakes, though:
    SCAR Code:
    WriteLn('False);
    end;

    Other than that, good job.

  5. #5
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by WhoCares357 View Post
    Very nice tutorial. I liked the extra pngs .

    You got two mistakes, though:
    SCAR Code:
    WriteLn('False);
    end;

    Other than that, good job.
    Lol, I just noticed that, fixed.

    Ty

    Ha, that reminds me, not to long ago I was learning off your tutorial :-P

  6. #6
    Join Date
    Dec 2006
    Location
    UK!!
    Posts
    910
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow thats a huge tut nice one Ice

    ~Spaz

  7. #7
    Join Date
    Dec 2007
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    learned everything, and only read it once thanks

  8. #8
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    Quote Originally Posted by Datakovis View Post
    learned everything, and only read it once thanks
    oh really must be a fast learner now show us 1 of your script(make)

    ive seen you post everywhere i think you just getting posts up

    bad bad

  9. #9
    Join Date
    Dec 2007
    Location
    Vancouver
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks very much!

  10. #10
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Kold View Post
    Thanks very much!
    N/p

    Working on intermediate now.

  11. #11
    Join Date
    Dec 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great job!, most of the guides ive been to teach me the basics and its alittle hard to understand, but with this one it was super easy because you lead people through it with the short videos. Thanks a bunch!

  12. #12
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice one...This should automatically give you TUT writer cup^^

    I can't understand how is possible to not understand it...
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  13. #13
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I got my basics learned in 6-7 hours.
    I spent my day on that
    Now Negaal is teaching me more.
    His from Estonia, too.
    And keep up the good work!!!
    I'll rep you for that one.
    Eerik.
    (only some things are a bit bannable )

  14. #14
    Join Date
    Feb 2008
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The video aid helped more then reading

  15. #15
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If anyone wants to, you can look at the intermediate tutorial being made at: http://forum.scar-scripts.com/home/s...-scripter.html

    About 50% complete contains:

    *More types such as the Extended type.
    *Math, some operators.
    *More keywords.
    *More about functions and procedures.
    *More Color Finding techniques.
    *Bitmaps.
    *DTMs.
    *Including.
    *Scripting for runescape.
    *Using SRL effectively. - Text handling, chat box, global constants.
    *Intermediate level looping.
    *Intermediate level logic. -Fail safes ect..
    *Anti-Randoms, Anti-Ban.
    *Constructing an SRL script.
    *Using SRL Stats.
    *More math, radians/ degrees ect..
    *Map walking.
    *Dynamic DTMs (DDTMs)
    *Types.
    *Arrays.
    *Introduction to forms.
    *More standards.

  16. #16
    Join Date
    Mar 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    WOW congrats u managed to do what 12 years worth of teachers couldnt... and thats teach me something thx ALOT

  17. #17
    Join Date
    Aug 2007
    Location
    In Your Front Door!
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If this was the First Tutorial I had read of scar, I would of probably gotten it alot faster
    This is for Jagex!

    My Public Scripts
    Simple AutoTalker
    Face Maker

  18. #18
    Join Date
    Nov 2007
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    excellent really helped me in my develops of first script,cheers

  19. #19
    Join Date
    Feb 2008
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    excellent guide, very detailed and extremely helpful.
    the visual aids really help in the understanding.

  20. #20
    Join Date
    Feb 2008
    Location
    At my PC, where else?
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow, this is really helpful. I was looking at some other beginner's guides, but I got stumped a little by the Procedures, and why the coordinates were all messed up (well, compared to a real coordinate plane of which we learned in school...).
    Now I can move on to whatever comes next.

  21. #21
    Join Date
    Jan 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i spent 3 hours to read and understand every word
    u dont how much that helped me
    ur awesome
    thx

  22. #22
    Join Date
    Dec 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    really good tut and the video aid is awesome

  23. #23
    Join Date
    Nov 2007
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow very helpful for me.
    I want to learn and this helping my a lot!
    Thanks

  24. #24
    Join Date
    Feb 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Fantastic tutorial! Finally someone explains all that stuff that other tutorials don't. Thanks much!

  25. #25
    Join Date
    Jul 2007
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow.. That was intresting..

    1. I click Link not knowing a thing about scar scripting.
    2. I come out knowing how to right my own If And Else ect and How to do all this text thing... ( not that it has anything to do wif Rs but cool..)
    3. now im posting this to say

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Tutorial for the "Intermediate Scripter" with video aid.
    By Wanted in forum Outdated Tutorials
    Replies: 50
    Last Post: 10-14-2012, 04:26 PM
  2. Detailed tutorial about "hacking wep key"?
    By darky in forum General
    Replies: 12
    Last Post: 10-19-2007, 01:26 AM
  3. Replies: 3
    Last Post: 04-19-2007, 03:44 AM
  4. "The Mouse and the Lamb" video
    By swordguy99 in forum Misc. Links and Programs
    Replies: 0
    Last Post: 12-23-2006, 05:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •