1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Intermediate Guide For SCAR - Deathader

Discussion in 'Code Snippets and Tutorials' started by Anonymous, Dec 21, 2006.

  1. Anonymous

    Anonymous Guest

    Intermediate Guide For SCAR

    You will notice that I have updated this guide. it is now a LOT easier to read. This is what I was doing ALL last night.


    Contents:

    What is Scar about?
    Where Can I download Scar?
    How do I learn to script?
    What are some basic commands to Scar?
    Where can I find Scar Scripts?
    Variables and Constants
    What are Includes?
    What are Procedures? How do I use them?


    Chapter 1:

    What is Scar about?



    SCAR is a scriptable macro program using in the form of Pascal Scripting for automatization of tasks. It can also be used to create simple games and simple tools, teach yourself programming or cheat in most online games. SCAR was initially written as cheat for RuneScape as the very first scriptable Auto-clicker for the game. Nowadays it is used in other games as well including Neopets.



    Chapter 2:

    Where can I Download Scar?



    You can download the latest version of Scar by going to http://www.dylock.net/scar/
    You can either download the .exe version or .zip version, it doesn’t matter which you download. Once you download Scar, open the program and go to File à Download Includes and overwrite all Includes and click Ok- This is so when you use others scripts, you have all the commands downloaded from various Includes.

    Check Chapter 7 for info on Includes!



    Chapter 3:

    How do I learn to script?

    Well, they are various ways of learning how to script, I recommend doing the following:

    • ~ In Scar once you have downloaded it, click Help on the toolbar up the top and click Help once again. This will show you various commands used in Scar for Pascal scripting.

      ~ You could also look at other peoples Scripts at how it’s set-out and familiarize yourself.

      ~ Or simply PM me if you have a specific question.



    Chapter 4:

    What are some basic commands to Scar?


    Some basic commands for learning you can use in your/the script are as follows:



    Movemousesmooth(x, y);
    This will move the mouse smoothly across the screen to the desired co-ordinates.

    MoveMouse(x, y);
    This is the same as the command "Movemousesmooth" but considering it moves the mouse directly there, from wherever your cursor(mouse)
    position is. As Movemousesmooth moves the mouse thus following a line to the co-ordinates.


    Clickmouse(x, y, left);
    This will click the mouse at the desired x and y co-ordinates. If left is true it will left click the mouse if it is false, it will right click the mouse.

    Holdmouse(x, y, left);
    Holds the mouse at the desired x and y Co-ordinates. If left is true will left click hold, if left is false will right click hold.


    Releasemouse(x, y, left);
    This is in relation to the "Holdmouse" command, If will release the mouse click at the desired x and y co-ordinates.
    If left is true then it will release a left click, if left is false will release the right click.



    Writeln('Text');
    The script above would write into the Debug box in Scar ( The white box below scar, kind of like a box to show the results) . Whatever "Text" is changed to it will write into the Debug Box. Make sure you have the 2 ' 's before and after your text.


    Status('Text');
    This will change the status bar to whatever is between the two ' ' s.


    Getmousepos(x, y);
    Gets the cursors position it is currently at. You will have to declare variables for it to save in.


    SendKeys('Text');
    Will send what is in between the ' ' to the active(appeared) client.


    SendKeysSilent('Text');
    Will send whatever is between the ' ' to the client selected with the crosshairs.


    Wait(time);
    Will wait however many Milliseconds you put in the brackets before continuing. The wait is ran in Milliseconds, which means if you put "Wait(1000)" It would wait 1 second. "Wait(3000)" Would wait 3 Seconds. "Wait(500)" Would wait 500 Milliseconds ( Half of 1 second ) etc.


    SendArrowSilent(Number);
    Will send an arrow key depending on the number in-between the brackets to the selected client.
    If there is a "0" in between the brackets it will send the up arrow key, if there is a "1" will send the right arrow key, if
    there is a "2" it will send the down arrow key, if there is a "3" will send the left arrow key.



    I will update this list of Commands in the future.


    Chapter 5:

    Where can I find Scar scripts?



    On Neofriends.net we have a Download Section for only SCAR scripts.


    Chapter 6: Variables and Constants



    Variables:


    A Variable is similar to a bank, it can store numbers/values/figures as Integers and it can store characters, sentences as strings for later use. Before you use any variables you have to make the command to tell Scar that you are putting a variable in.
    So in other words, here is an example:



    Program Variables;


    As a basic rule, the variables x and y will are set aside for the horizontal and vertical co-ordinates (co-ords) of the mouse (x is horizontal y is vertical.)



    Constants:

    A Constant is a variable that never changes, it stays constant throughout the whole script, and all you have to do is set its values, here is an example:


    Program Constants;

    You need to understand about Variables a lot to make successful scripts, so keep practicing until you are 100% sure you can use them and the commands.



    Chapter 7:

    What are Includes?



    Includes are Text files using Pascal saved to produce Commands shortened down in Scar in that text file.
    That’s basically what they are, can’t say it any better.




    Chapter 8:

    What are Procedures? How do I use them?



    Procedures are what scripts are made up of. A procedure is a set of "instructions" that performs a specific task that can be called upon, that and makes your script easy to read, neat and tidy. When writing a procedure there are 2 parts:
    Making the procedure and Calling upon the procedure. Here is a basic example:



    Code (Text):
    1. Procedure Example:
    2. Begin
    3. Writeln(‘You have made a Procedure’);
    4. End;
    5.  
    6. Begin
    7. Example;
    8. End.

    PS. Spell the name of your script only in one word, no commas or punctuations or symbols.

    ~The End~
     
  2. chelsea1

    chelsea1 Level IV

    Joined:
    Nov 26, 2006
    Messages:
    2,538
    Likes Received:
    31
    Location:
    London
    this is an awesome guide and i m just about to try it out

    i would +rep you but i cannot which is a shame as you deserve it
    please expon change this
     
  3. Smelly

    Smelly Level IV

    Joined:
    Dec 1, 2006
    Messages:
    2,197
    Likes Received:
    8
    Location:
    England
    wow, after reading that i actually understand (mostly :p) whats going on.

    might try me one of these!
     
  4. test123

    test123 Level IV

    Joined:
    Nov 3, 2006
    Messages:
    935
    Likes Received:
    0
    Location:
    Australia
    hey

    thanks for the guide man..i learnt pascal recently and this is fairly similar to it so im gonna make some programs with it..already started a marbleman one with the first 10 or so levels completed :D
     
  5. Anonymous

    Anonymous Guest

    Re: hey

    Chelsea1 is allready making a marble men one.. His beats up to level 22 (according to his siggie), But i'm glad to see that some people want to start scripting just because i submitted 4 guides :)
     
  6. gawjus1234

    gawjus1234 Level III

    Joined:
    May 22, 2007
    Messages:
    518
    Likes Received:
    3
    Location:
    Las Vegas
    nice guide. i'll use it to make some scar game trainers. +rep