SRL Archive - OSR Intermediate Scripting Tutorials

UnRivaled Guide To Scripting


pwnaz0r

2007-03-03 13:36:06


UNRIVALED GUIDE TO SCRIPTING

[H]If you Like this Tut then plz rep me :D[/H]


Pwnaz0r - [email]Pwnaz0r@hotmail.com[/email]


Description
This IS Under Progress but you are now allowed to post.
I will be covering every aspect of scar we can think of.
Always Looking For New Things to Add so Just Post Here :)


TABLE OF CONTENTS

[LEFT]
    [LEFT]
  • Begginers
    • The Basics
    • Understanding SCAR
    • Your First Script
    • Those Annoying Errors
    • Finding Color
    • AntiBan
    • Building Proggies
    • Scripting Standards
    • Functions - Creating And Understanding
    • Developing And Maintaining A SCAR Script
  • Intermediate
    • DTMS
    • BitMaps
    • Arrays
    • Radial Walking – Highly Needed :p
    • Some Advanced Procedures
    • Making Your Own functions
  • Advanced
    • Some Components
    • Making Custom Var Types
    • Forms

    Begginers
    The Basics

    Ok Well The Basics Are Very Simple Yet At the same time Complex. To Understand the Idea of these "Objects" instantly, you must be open minded. So while you're reading this guide, anything is possible atm. Try to grasp the basic Concept of this chapter. It is not hard but you must be "Open Minded" if you have never scripted before.

    CONSTANTS AND VARIABLES
    Ok Now Take Heart. If you have never scripted, this will be confusing. It is not hard at all but because your brain has never seen this before, it may take you awhile to understand. Now there are two types "Objects in SCAR". Constants and Variables. These are simply Names for Storing Information. Now the difference between the two is that a constant DOES NOT CHANGE THROUGHOUT THE SCRIPT. A Variable CAN CHANGE THROUGHOUT THE SCRIPT. Ok Now so if you don't get that read it again.Most of you probably take some kind of math with variables, trying to find the missing number. All a variable is, is a number that can change.

    For Example

    a constant would be like


    Number = 1;

    From that point on in the script, the Word "Number" would store the number one and it would never change. This is useful for Usernames and passwords, while logging in.



    A Variable However can change.
    Most people have trouble with variables as the can't grasp the concept so just be open minded. This would be an example of a variable


    banks : integer;

    Ok now don't worry about the

    : integer;
    Just yet. All you need to see is the banks. This word stores the amount of times you have banked. Hopefully You have grasped this concept but if you haven't, I'm always on msn as said earlier(pwnaz0r@hotmail.com) or try JAD (runescapeMacro@hotmail.com)

    now

    Declaring Constants and Variables
    Alright well , think of SCAR As a car. When you want the car to go, you press the gas. When you want it to stop, the brakes , etc. But it also has the engine you know nothing about(or you don't know about yet :D). Well in SCAR, You have to state or "Declare" the constants and variables. All you are doing is setting the value of the variable/constant. The only way I can explain is by showing you.

    This is what you would do to "Declare" a constant. Most people like to do this right under the program line. This is what you do.


    const
    Name = 'Clay';

    Now lets break this down. I Put "Const" because I want it to Label "Name" as a constant. Then i set the Value of "Name" as a Set of our letters called a string. The only reason i have the

    ' '
    around My name is because thats what tells SCAR it is a string. Anyway we will learn that later. Now, On to declaring a variable.


    var
    Banked : integer;

    ok now this is where we learn about the

    : integer;

    While using SCAR There are four types of variables. Remeber to be open minded here.
    [LEFT]
    • Integer - Probably the most common, Is Used For Regular Numbers - Examples : 1, 34 , 3354
    • Extended - These are numbers that are not whole - Examples 6.4, -35, 5.553
    • Boolean - This can result True or False - Examples : True, False
    • Strings : This was mentioned earlier, a strip of characters - Examples: 'Clay', 'McDonalds', ' Greg'
    [/LEFT]

    Deeper Explaination
    Ok Now If You understand the types above then skip this section. This is where alot of people seem to have some trouble. It is not all that hard to understand these. Basically, we will use the examples of talking to a person to understand them. Ok now an integer is like your teacher asking you " What is 1 + 1 ?". You would answer 2 unless you're dumb :D. That would be an integer, because it is in fact a whole number. It is not negative and does not have a decimal. Now an extended would be be more like your teacher asking you " What is 7.4 + 6.3 ?". If you add these up you get 13.7 which does have a decimal so it would have to be extended. Boolean is a true/false question on a test. An example would be your teacher asking you " Is Pwnaz0r Awesome?". You would undoubtedly say "True". Lastly, The string would be like your teacher asking you to read from a book(kind of). This variable is usually the easiest. Anyways, the example would be you reading the text " Jack and Jill Went Up The Hill".

    Alright Now i think you may understand Constants and Variables by now. If you do, pat yourself on the back. It wont get any harder than that :D. If you don't understand, Message Me on MSN (At the top) or JAD (Also at the top).

    Now, we will move on to what we call "Procedures". Procedures are like instructions. They tell scar what to do. So we are going to Move on the making your first Script.

    YOUR FIRST SCRIPT
    ok, lets open our SCAR. You should get this.



    Now Lets Put Some Spaces Like This (Does not have to be exact). We are doing this to add room for our scripting :).


    Now we are going to declare a constant. Most Scripters put it under the program line so lets put it there. Type


    const
    Name = '(INSERT NAME HERE)';

    So it should look like this.


    Now The basic Command For writing a line in the Box At the bottom left(the DebugBox) is called Writeln. (WRITELN - some people say WRITEIN it has an L not an I). so lets make a procedure named "Talk".



    Ok now let me explain everything.
    Now the line

    Procedure Talk
    Says that the folowing is a procedure;

    The line

    begin
    Tells SCAR what to start doing in the Procedure "Talk.

    The Line

    Writeln(' Hi My Name Is ' + Name);
    Tells Scar To Write " Hi My Name Is " and then your name. You kinda haveta remember how this is done.

    The Line

    end;
    Tells SCAR that this is the end of the instructions for the procedure "Talk".


    Now Add The Word "Talk" To The MainLoop. (MAIN LOOP- Tells SCAR In What order to do things). So in the end, this is what your script should look like.





    Ok Now Press Play. If you don't know where play is, keep reading below. This should be what your SCAR program looks like after you have pressed play











    UnderStanding SCAR
    BONUS CHAPTER
    Well I Did not list this chapter in the table of contents because i want you to learn everything only if you read the entire release. Here Are Some Explainations of SCAR. [LEFT] -Clicking this will result In a blank script. - This will Open An existing script. - This will Open any script from the web(only ones on Kaitneiks(Outdated)). – Will Save A Script. – Will Cut Text – Will Copy Text –Paste –Will Search The Script –Will Play the script –Pauses Script –Stop –Step Into –Step Over –Color Picker –CLears The Debug Box –Turns Report Box On Or Off -_Drag These CrossHairs to Select Client [/LEFT] Those Annoying Errors This Is Taken From JAD's Guide and Modified But I do Have permission to use it and this is half his tutorial Since he is an Uber Bro So Im just going to copy, paste, and modify. [LEFT] ERROR 1 : Close round expected in script. Pwnaz0r : Well This Means that You haven't put enough parenthesis around the fucntion that you called. EX.

    If(FindBitMap(~~~~~) then
    I didnt fill in the parameter but see? There are to Parenthesis in the front and one in the back. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JAD :Solution: Count your parenthesis on the line which the error occurs. for example: if (FindColorSpiralTolerance(x, y, RockColor, 0, 0, 249, 179, Tol) then see whats wrong with that? you have 2 ( ('s but only 1 ) to close it. you'd need to put 2 at the end of that like this: if (FindColorSpiralTolerance(x, y, RockColor, 0, 0, 249, 179, Tol)) then ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ERROR 2 : Include file C:Program FilesSCAR 2.03includesSRL/SRL.scar does not exist.
    Pwnaz0r
    : You did not include the file right or the file does not exists. You can fix this by always making sure the file exists and your sources are right.

    {.include srl/srl.scar}
    JAD : Solution: this is the biggest error of all time. all you need to do for this is read the tutorial for installing SRL in the Install SRL forum. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ERROR 3 : Semicolon (';') expected in script Pwnaz0r : This is very common when first beggining to script. All you have to do is put a semcolon at the end of the line stated.

    var
    InSane : boolean;//See the semicolon?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JAD :Solution: this used to happen to me A LOT when i didn't put a ";" after my variables. just remember to do so. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ERROR 4 : Unknown identifier (A WORD HERE) in script Pwnaz0r : Etheir you messed up in typing or the procedure/function/variables/constant does not exist. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JAD : Solution: this means that you did either did not type something write, you called a procedure that does not exist, you called for a variable that does not exist or you did no include an include, and call for it to setup at end of script (example if you needed to setup SRL in the main loop you need SetupSRL; in script and the include after program name) so if this happens just check what either what variable you used, usually you just spelled it wrong above where you declared it. check spelling of it. check procedure name and check name of procedure you called for. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ERROR 5 : Duplicate Identifier in script
    Pwnaz0r
    : You have named two things the same name in script or they are already used in an include. Just change the name of the function/procedure/variable/constant ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JAD : Solution: to fix this i used x for an example. lets say you used i as your variable, then you made a procedure/function called i. this would not work because i is already used as a variable in the script, so you cannot name that as a procedure. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error 6: Identifier expected in script. Pwnaz0r : Something Is messed up with begins and ends. Count them and make sure they are right throughout the script. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JAD : Solution: count your begins and ends in your script, and make sure for each begin, you have an "end;" also make sure for each repeat you have an until. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ERROR 7 : 'BEGIN' expected in script. Pwnaz0r : check to make sure you have a begging at the begging of all procedures, and mainloop. Also, sometimes, when you state vars before a begin in an procedure/function, you forgot to put var in front of it.

    procedure Example;
    kfjf : integer;
    begin
    See How it doesnt say var? This is how you would fix it.

    Procedure Example;
    var
    kfjf L integer;
    begin
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JAD : solution : make sure you have a begin at the beginning of your procedure. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error 8: Invalid number of parameters in script Pwnaz0r : You Have not filled in the correct parameters for the script.

    If(FindColorTolerance(x,y,65336,1,1,100,100))then
    This is a common one. People forgit to include the tolerance at the end.

    If(FindColorTolerance(x,y,65336,1,1,100,100,15))then
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JAD : this is ussually caused if you put too many numbers, parenthesis and things like that in script. if you put MMouse(x,y,0,0,0,) it would probably say invalid number of parameters. so just check whats needed in the command, and if theres anything extra thats not needed. [/LEFT] Finding Color Ok Now there are various Ways To Find Color. Two Main Categories Though. With Tolerance and Without. Tolerance is just like finding a color similar to it. The higher the tolerance, the more different the color can be. MOST COMMON COLOR FINDING PROCEDURES
    • FindColor
    • FindColorTolerance
    • FindColorSpiral
    • FindColorSpiralTolerance
    All do pretty much the same thing. Now All you have to do it pick a color for it to find. Use the color picker(Icon listed above in Understanding Scar) and pick a color. I cannot Show you how to do this because the screen is frozen and you can't take a screen shot but this is what should show up in the debug box after you have picked a color.

    Color Picked: 16777215 at (243, 139)
    That is just an example. 16777215 would be th color and (243, 139) are the coordinates. Now all you have to do is add that to a procedure.

    procedure GoToColor;
    begin
    If(FindColor(x,y, 16777215 , 0 , 0 , 100 , 100))then
    begin
    Writeln('Found The Color');
    end;
    end;
    Not very hard eh? Anyways, Colors are a really easy way to find things in scar. ANTI BAN Well this Is A Big Topic. Making your own antiban is crucial to your script. Now , you can make it simple at first, but more complex later. I think for begginers at least 8 lines(including begin and end) is good in an antiban procedure. Now here are some of the most commonly used antiban procedures.

    procedure RotateEvery(mins: Integer);


    procedure RandomChatEvery(mins: Integer);



    procedure RandomRClickEvery(mins: Integer);


    procedure LeaveScreenEvery(mins: Integer);


    procedure HoverSkill(Skill: String; Click: Boolean);


    procedure PickUpMouseEvery(mins: Integer);



    procedure AntiBan;


    Anyways, Make Your antiban procedure any name you like and put some of those in there :). Call it when you want to antiban :). Building Proggies Ok well progress reports are not hard. Here is the basic SRL Multiplayer Progress report.

    procedure PlayerStats;
    var
    Active: string;
    i : Integer;
    begin
    Writeln('****************************************************');
    Writeln(' Name : '+ Players[CurrentPlayer].Name);
    Writeln(' Number : '+ IntToStr(CurrentPlayer));
    Writeln(' Worked : '+ IntToStr (Players[CurrentPlayer].Worked)+' minutes.');
    Writeln(' Banked : '+ IntToStr (Players[CurrentPlayer].Banked) + ' loads.');
    Writeln(' Location: '+ Players[CurrentPlayer].loc);
    Writeln(' Level : '+ IntToStr(Players[CurrentPlayer].Integer1));
    Writeln('****************************************************');
    for i := 0 to HowManyPlayers - 1 do
    begin
    if(Players[i].Active = True)then
    Active := 'True'
    else
    Active := 'False';
    Writeln (IntToStr(i) + ' : '+Players[i].Name + ' = ' + Active + '. - Lvl: '+IntToStr(Players[i].Integer1)+
    '. - B :'+IntToStr (Players[i].Banked)+' times.'+
    ' - '+IntToStr (Players[i].Worked)+' mins.'+' - Loc: '+Players[i].loc);
    end;
    Writeln('*****************************************************');
    end;
    I would modify that to your likeing or change Chars/Design :) Scripting Standards Scripting Standards are one of the things good scripters use to keep their scripts neat + organized. Some scripters make their own scripting standards after awhile but there is a, what you could call, "Universal Scripting Standards Code".Basically it consists of double spacing after each begin and backspacing twice between each end. Here are some examples of Bad Scripting standards. BAD SCRIPTING STANDARDS GOOD SCRIPTING STANDARDS OR MY PERSONAL SCRIPTING STANDARDS See How the First Looks Messy And And Jumbled Up But the Latter 2 Look Neat and tidy? Anyways At the Bottom, I have attached A personal Script Standardizer. All you do is download it, open your script in it, and look at the drop down menus until you see something like "Standardize all" Functions - Creating And Understanding Ok now functions are like procedures that give you results. they can be any of the 4 types listed in vars section. Like if you wanted to see if SCAR finds a color it would be listed like this.

    function DidWeFindColor : boolean;//Boolean because it results true or false;
    begin
    result := false;// read below
    If(FindColor(x,y,(YourColor),1,1,100,100))then result := true
    end;
    Ok, now see how I put result := false at the beggining? Well it will stay false unless it finds the color. So its kinda easier. Then you may use that like this.

    If(DidWeFindColor= true)then
    begin
    Writeln(' We Found Color!'):
    End;
    You can also make other functions but you will learn they are very easy as you move along. If you don't understand how to make them now then dnt try it now. You will understand eventually. [LEFT]Maintaining And Developing A Script I DID TAKE THIS FROM MY OTHER TUTORIAL FOUND HERE http://www.villavu.com/forum/showthread.php?t=6300 How To Organize and Develop A SRL/Scar Based Script Through Neatness To Get it Done Faster/ Better ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Index
    • I. Getting Started
    • II. Using Basic Tools
    • III. Scripting Standards
    • IV. Making An Outline
    • V. Orgranizing The MainLoop
    • VI. Publishing A Script
    • VII. Conculsion
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Chapter One Getting Started Ok, Youre probably reading this tutorial because your scripting is messy, you have trouble finding things, or your just plain bored. This tutorial will go into an explainaton on how I like to keep my scripts organized / make an outline so I don't forget things, don't loose things, etc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Chapter Two Using Basic Tools Well For this Tutorial all you really need are 4 things. - A Computer - - Notepad(Or any other writing Program - - Scar - - Knowledge Of Scripting - I am going to go ahead and get you to do the follow things - Create A folder on the desktops named " My Scripts " or something similar to that - - Open Up Scar - - Open Up Your Writing Program - My Example Will Be A PowerChopper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Chapter Three Scripting Standards Well Scripting Standards are the way us scripters keep our scripting LOOK AT THE BOTTOM OF THE PAGE FOR A STANDARDIZER GOTTEN FROM HEY321 or ~~~~~~~~~~~~~~~~~~~~~~~~ http://www.villavu.com/forum/showthread.php?t=5195?t=6042 http://www.villavu.com/forum/showthread.php?t=3293?t=3997 http://www.villavu.com/forum/showthread.php?t=4676?t=5496 ^^^^^^^^^^^^^^^^^^^^^ Go To These Tutorials If you don't understand Scripting Standards. Some scripters have their own standards that they create. In my opinion, if its neat, its good enough for me. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Chapter Four Making An Outline Ok well this is where we really start the tutorial. So you have everything ready and you understand scripting standards. To start your outline, you need to know what you want to make. So at the top of your writing program, put your title/idea in Bold.



After that, Make your basic Outline. This FORCES you to know what you want to do with the script



** NOTE ** notice how I use " * " to make personal notes for myself

This Tells you Exactly What to do with the Script. Now, You begin a detailed version of Your outline. Like So



^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Red Dots = I like To put special Symbols when indicating a custom procedure
Black Line = See How I fill in the X when its done?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Chapter Five Organizing The Mainloop

Now you have to Organize your mainloop. I don't really know how to explain this as each scripter has his/her own style but, this is how I would organize mine.


[/Left]













Intermediate








DTMS
Ok Well I Love DTMs. They Are a Scripters Best Friend. They are very easy to make and almost infalliable. To get to the DTM Maker, Do these steps.

  • Select RS Window
  • Go to Tools –> DTM Editor…

THE KEY!! ONLY MOVE THE MOUSE OVER THE OUTLINE COLOR 65336!! THIS IS WHAT IS CALLED A STATIC COLOR. IT DOES NOT CHANGE!!!

Now every point you click in the picture is recorded. A DTM(Deformable Template Module) checks for colors and their distances between them. But colors change in rs. Thats why you only choose the color 65336. Here is a picture of a Basic DTM Being Made.

Make The DTM, (See all the colors in the top right? they are all 65336).



Go To File –> Save

Save It Where You can find it and let it have a good name.

then go to

Test –> FindDTM

at the top of you screen(its a drop down menu)

Go to your DTM.

If it doesnt find your DTM, then make a new one , else great job!

Now go to File, DTMToText and close the screen. The DTM Will be in the DebugBox.

[LEFT]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MAIN SRL RELATED FUNCTIONS


FindDTM(DTM, x,y, x1, y1, x2, y2) // Finds A DTM in the Specified params. records Position at the vars you specify.

FindDtmIn(var FX, FY: Integer; DTM, X1, Y1, X2, Y2: Integer) // Basically Same thing as above.

//To Click A DTM just say something like

If(FindDTMIn(x,y,(DTM Name Here),X1, Y1, X2, Y2)) then
begin
Mouse(x,y,0,0,true);
end;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[/LEFT]









BitMaps
BitMaps Are also a highly effective way to find things. They are like a picture. Actually they are a picture. I personally think Bitmaps Are inaccurate and would rather use advanced color finding or DTM's but i will explain anyway.

Well All A BitMap Is, Is a picture So first we need to take a screen shot.
Press the Button "Print Screen". It should be somewhere directly above the arrow keys but maybe higher. This will take a screen Shot of the screen. Now. Go to Paint(or any other picture editing program) and go to Edit –> Paste.
Now Use the cropping tool to cut the image down to its lowest size.(Use The Magnifier if needed). Make The BackGround Black then save. Now open back up SCAR.

  1. Go To Script –> PictureToStr
  2. Now Click Open
  3. Select Your File
  4. Press OK


Now you have the BitMap String in your debug. State that in your script and you can use any BitMap Function for it.










Arrays

Ok now Arrays are basically a series of variables.

How to Declare them

If you know the length of the array, then you can say it like this.

var
ColorArray : array [0..5] of integer;
ExtArray : array [0..2] of extended;
BoolArray : Array [0..10] of boolean;
stringarray : array [5..8] of string;

If You don't(like if your adding colors as you go) then it should be stated like this

Var
ColorArray : array of integer;

Some functions for arrays:


GetArrayLength((ArrayName));

This will get the current length of the array.


SetArrayLength((ArrayName),ArrayLenght));

This is useful for updating arrays as you go. So an example of an updating array would be


procedure UpDateArray;
var
I : integer;
ColorArray : array of integer;
begin
If(FindColor(x,y,98347,1,1,100,100))then
begin
I := GetArrayLength(ColorArray);
SetArrayLength(ColorArray, I + 1);// I + 1 so it will be 1 higher than the
// previous array length.
Colorarray[I + 1] := GetColor(x,y);
end;
end;









RADIALWALKING

Ah yes, the all famous radialwalking. The enigma that most srl members do not understand. It will be explained fully and completely here.

Radialwalking is the best form of walking in my opinion. What Radiawalk Basically does is search for a color on the mini map. Now the MiniMap is a circle, no?. There are 360 degrees in an angle. What Radialwalk does is search
between the angles you specify for a color and picks the farthest color from the center. Now Lets Explain The Command and how it works by use of pictures…


RadialWalk(Color,StartRadial,EndRadial,Radius,ModX, ModY);

Ok Now
COLOR = The color your searching for.
StartRadial = The radius to start at.
EndRadial = The radius to end at.
Radius = How Many Pixels from the center?
ModX = random x
ModY = random y





Imagine this is the minimap. Those Are The Angles roughly that the mini map is composed of.
Now if you wanted to search for a white color from 0 to 90, you would make your radiawalk like this


RadialWalk( {WhiteColor} , 0, 90, 70, 0 , 0);

It would search the color in this area.



starting from 0 to 90. Like so.
(SRY for the bad picture, I got it straight from YakMan's RadialWalker Aid.)





If it finds the color White, it Will Click it and exit.


Using RadialRoadWalk is useful yet I prefer to do it like so :D


procedure ClickRoad;
var
tmpRoad : integer;
begin
tmpRoad := FindRoadColor;
RadialWalk(tmpRoad,~~~~~~);
end;

USING YAKMANS RADIWALK HELPER
HIGHLY SUGGESTED!!
[LEFT]
It works amazingly. Here is kinda a mini tutorial on it.
  1. While In SCAR, Go TO Open
  2. Click on Includes in The " Main Menu " of SCAR(where you downloaded srl)
  3. go to includes –> SRL –> scripts –> Yakman's RadialWalk Helper
  4. Open it
  5. Press Play
  6. Make sure you are logged in to RS
  7. Move The Window Over to The Side, Out Of the way of the minimap
  8. Press "CAPTURE FROM CLIENT" on the right hand side
  9. It Should Take A Picture Of The MiniMap

Now Move The Mouse Over the Mini Map TO The Starting Radial And Click Like so. The Line should stick there.



Only Use The "Radial" not "Radial2" unless you plan on over lapping(not really recommended).
Fill in the Boxes with Radius , Start Radius and End Radius and hit "Show Path". It Should show you how it will search. If you like it , hit "Stop" and hit "Print Procedure". Then Close the box.

Now Look in the debug Box. It has your command already made out!!
[/LEFT]











Advanced Procedures
Ok now Advanced Procedures are very useful in scripting. I Like to think of Advanced Procedures Having the folowing :

    [LEFT]
  • AntiBan
  • Undetectable
  • Higly Accurate[/LEFT]

They Are Kind Of "Spur Of The Moment" Ideas. The folowing would be an example.


procedure findrock;
begin
If(FindColorSpiral(x,y,color,x1,y1,x2,y2))then
begin
If(FindColorSprial(x,y,color2,x+15, Y+15, x -15, y - 15))then
begin
Writeln('Found');
end;
end;
end;


EDIT:

Ok Well Many People do not understand this so let me go through this procedure where you can. Ok, When you call the first FindColor Spiral,it stores the position of the color at x,y correct?. Well when you call the second FindColorSpiral, the box it creates wil be with 15 pixels of the first color found. Hopefully that will clear things up for you ;).
Basically What this will do is find a color on th main screen. If it finds the second color within a box of the first color, it will write found see?. Base commands on other commands results as so and add failsafes and your good to go. :)








Making Your Own Functions
Well Making your own functions is what intermediate-advanced scripters do.
To Make the functions you want, you need to understand the 4 types of vars. Now Lets say you wanted to make an AxeHead Finder. You would make an outline (Maintaining and Developing a script Above). And get at it. I would suggest using DTMs Or advanced procedures(above) to get a Axe Head Finder Done. Take into consideration all things that happen durring runtime of the procedure. For instance, The Axe Head often lands under the white dots of people on the minimap, and is usually covered by a person. So if it doesnt find it on the first try, make sure it radialwalks (or any other form of minimap walking) to a white dot.






ADVANCED
YEAH, These are gunna make your head hurt unless your good :D






Some Components

Well As You Probably Know, Many Components/Classes were imported from Delphi.
These are listed in the SCAR manual. Here are some basic definitions.

TGroupBox - The TGroupBox component represents a standard group box, used to group related controls on a form.

TLabel - Use TLabel to add text or a bitmap that the user can’t edit to a form.

TEdit - Use a TEdit object to put a standard edit control on a form.

TMemo - Use TMemo to put a standard multiline edit control on a form.

TComboBox - A TComboBox component is an edit box with a scrollable drop-down list attached to it.

TButton - Use TButton to put a standard push button on a form.

TCheckBox - A TCheckBox component presents an option for the user.

TRadioButton - Use TRadioButton to add a radio button to a form.

TListBox - Use TListBox to display a scrollable list of items that users can select, add, or delete.

TScrollBar - Use TScrollBar to add a free-standing scroll bar to a form.

TImage - Use TImage to display a graphical image on a form.

TPanel - Use TPanel to put an empty panel on a form.

TTimer - TTimer is used to simplify calling the system timer functions.

TForm - form (window) component.

TApplication - TApplication encapsulates a windowed application.

TMenuItem - Use TMenuItem to specify the appearance and behavior of an item in a menu.

TMenu - Use TMenu as a base class when defining a component that represents a collection of menu items.

TMainMenu - Use TMainMenu to provide the main menu for a form.

TPopupMenu - Use TPopupMenu to define the pop-up menu that appears when the user clicks on a control with the right mouse button.

TCanvas - Use TCanvas as a drawing surface for objects that draw an image of themselves.


Now that is straight from the SCAR Manual. Some Of these components Uses will be listed here:
  • TGroupBox - Used In Forms, Used To Organize
  • TLabel - Form Component that the user cant edit.
  • TImage - In My Opinion, the best Picture Component For Forms.
  • TRadioButton - Radio Button
  • TCheckBox - Check Box
  • TButton - a button
  • TCanvas - Obviously The Canvas of the Forms.

Again that was a very simple list. Now The main reason i made this section was to Discuss the TPoint component so from here on out, thats what its gunna do. TPoint Is Basically, in simple terms, a collective var type that has 2 SubVars. X and Y.

Example Using These:

procedure GetPos;
var
MyPoint : TPoint;
xx, yy : integer;
begin
GetMouse(xx,yy);
MyPoint.X := xx;
MyPoint.Y := yy;
end;

All that procedure does is store the Position of X and Y to the TPoint. I Used TPoint quite alot in my UberAlcher(not finished yet). There is also TPointArray Which Is Good For Storing Positions.


procedure MakeATPointArray;
var
ThePoints : TPointArray;
XX : integer;
YY : integer;
I : extended;
begin
I := -1;
GetMousePos(XX,YY);
repeat
XX := XX + 1;
YY := YY + 1;
I :+ I + 1;
SetArrayLength(ThePoints, I)l
ThePoints[I].X := XX;
ThePoints[I].Y := YY;
until(i = 25);
end;

That procedure doesnt really do anything useful just an example :D











Making Custom Var Types
Well As Seen Above, TPoint is a var type. But did you know you can create your own? This is what the player array is composed of. To declare a new var type, Just add it before your first procedure in script. "Type" is the word used to declare a new var type. The Example should explain everything.

THIS WAS TAKEN FROM MY UBER ALCHER


Type
AntiBannage = record
TalkingRatio : integer;
MovingRatio : integer;
MisClickRatio : integer;
StatsBoxRatio : integer;
end;

and i used it in this way.


procedure AntiBanLand;
var
AntiBanN : AntiBannage;
begin

ABR := 5;

//--------------------------

AntiBanN.TalkingRatio := 1 + random(ABR * 10);
AntiBanN.MovingRatio := 1 + random(ABR * 5);
AntiBanN.MisClickRatio := 1 + random(50);

//--------------------------
Case AntiBanN.TalkingRatio of
1 : begin
end;
end;

//--------------------------

Case AntiBanN.MovingRatio of
1 : begin
SleepAndMoveMouse(1500+random(3000));
ReportVars[1] := ReportVars[1] + 1;
end;
4 : begin
SleepAndMoveMouse(1000+random(2000));
ReportVars[1] := ReportVars[1] + 1;
end;
8 : begin
PickUpMouse;
ReportVars[1] := ReportVars[1] + 1;
end;
10 : begin
AlmostLogOut;
ReportVars[1] := ReportVars[1] + 1;
end;
end;

//--------------------------

Case AntiBanN.MisClickRatio of
1 : begin
GameTab(6);
GameTab(7);
ReportVars[1] := ReportVars[1] + 1;
end;
end;

//--------------------------

HoverEvery(15 + random(10),'Magic');
end;



That is for antiban. Anyways This is a very easy thing to do, I just thought I may want to put it under Advanced because in my opinion, you really shouldn't use it unless you are advanced :D.















Forms
Ah Yes, Forms. They are quite an enigma for even an the best of scripters. But they are actually quite simple. I think that the form creator is a great tool for creating for but only for the basic structure. I have edited a form that greatly exceeds the form makers abilities because the formmaker does not include all form components. However, I will be discussing how to manually create a form and how to create one via form maker.

STANDARD FORM PROCEDURES
Ok well lets go ahead and get this out of the way. These are always to be put after your main InIt procedure.

procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;


USING FORM EDITOR
Well The Form Editor Leaves out Many Components But here it is anyway.

To Get To The Form Editor :
  • Open SCAR
  • Go To Tools –> FormEditor…

Now You Should Get 3 Boxes.(frmDesign),(frmDesigner),(Object Inspector).


Ok Now In the Forum Designer, You can choose from a variety of options.
These Are Not Hard. All you do it click the button on the frm Designer and then click where you want it on the frm Design. (You can edit the size of the form but adjusting the frm Design window. If you can't do this very simple thing of designing a basic form, see other tuts about it and come back. This only goes into detail, explaining how forms work.

Now This Is my Example Form;


frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 696;
frmDesign.Height := 480;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := True;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 498;
Label1.Top := 278;
Label1.Width := 32;
Label1.Height := 13;
Label1.Caption := 'Label1';
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.Left := 296;
Button1.Top := 189;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Button1';
Button1.TabOrder := 8;
CheckBox1 := TCheckBox.Create(frmDesign);
CheckBox1.Parent := frmDesign;
CheckBox1.Left := 48;
CheckBox1.Top := 46;
CheckBox1.Width := 97;
CheckBox1.Height := 17;
CheckBox1.Caption := 'CheckBox1';
CheckBox1.TabOrder := 9;
GroupBox1 := TGroupBox.Create(frmDesign);
GroupBox1.Parent := frmDesign;
GroupBox1.Left := 34;
GroupBox1.Top := 215;
GroupBox1.Width := 185;
GroupBox1.Height := 105;
GroupBox1.Caption := 'GroupBox1';
GroupBox1.TabOrder := 10;
Memo1 := TMemo.Create(frmDesign);
Memo1.Parent := frmDesign;
Memo1.Left := 323;
Memo1.Top := 44;
Memo1.Width := 185;
Memo1.Height := 89;
Memo1.Lines.Add('Memo1');
Memo1.TabOrder := 11;

Not Anything Special, Just has many components Form Creator gives you.
Now, Lets just break down one form add-in.


Memo1 := TMemo.Create(frmDesign);
Memo1.Parent := frmDesign;
Memo1.Left := 323;
Memo1.Top := 44;
Memo1.Width := 185;
Memo1.Height := 89;
Memo1.Lines.Add('Memo1');
Memo1.TabOrder := 11;

Ok Now the first line.

Memo1 := TMemo.Create(frmDesign);
Creates A TMemo called Memo1 in (frmDesign).<– frmDesign is the default name of you form.

The Second Line,

Memo1.Parent := frmDesign;
Tells SCAR that Memo1 will be placed in frmDesign(in other words, no in a group box, etc).

Lines 3-7

Memo1.Left := 323;
Memo1.Top := 44;
Memo1.Width := 185;
Memo1.Height := 89;
Tell Scar the Parameters For Memo1

Line 8

Memo1.Lines.Add('Memo1');
Is Specific Command For a TMemo. All Components have their own commands because thats what makes them different components.

What I like to do when editing my form manually is split up the sections so here is my example .


frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 696;
frmDesign.Height := 480;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := True;
frmDesign.PixelsPerInch := 96;

//------------------

Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 498;
Label1.Top := 278;
Label1.Width := 32;
Label1.Height := 13;
Label1.Caption := 'Label1';

//------------------

Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.Left := 296;
Button1.Top := 189;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Button1';
Button1.TabOrder := 8;

//------------------

CheckBox1 := TCheckBox.Create(frmDesign);
CheckBox1.Parent := frmDesign;
CheckBox1.Left := 48;
CheckBox1.Top := 46;
CheckBox1.Width := 97;
CheckBox1.Height := 17;
CheckBox1.Caption := 'CheckBox1';
CheckBox1.TabOrder := 9;

//------------------

GroupBox1 := TGroupBox.Create(frmDesign);
GroupBox1.Parent := frmDesign;
GroupBox1.Left := 34;
GroupBox1.Top := 215;
GroupBox1.Width := 185;
GroupBox1.Height := 105;
GroupBox1.Caption := 'GroupBox1';
GroupBox1.TabOrder := 10;

//------------------

Memo1 := TMemo.Create(frmDesign);
Memo1.Parent := frmDesign;
Memo1.Left := 323;
Memo1.Top := 44;
Memo1.Width := 185;
Memo1.Height := 89;
Memo1.Lines.Add('Memo1');
Memo1.TabOrder := 11;






JAD

2007-03-03 16:05:30

UBERPEDIA!!
http://www.villavu.com/forum/showthread.php?t=6644

pwnaz0r

2007-03-03 16:54:49

Ok you can post now, about halfway done.

Gwallunit

2007-03-03 16:54:59

Great tut

*permission to post*

Rep+ for u

first tut that actually helped me

WhoCares357

2007-03-03 17:52:00

I like all the pics. Nice job.

pwnaz0r

2007-03-03 18:06:24

Tyvm :) btw this is also JAD's tutorial. He will be adding The UberPedia of SCAR When he gets around to it.

Pwnt by Pwnt

2007-03-03 18:55:17

hey pwnaz0r! well its pretty good except the making ur own functions thing… but im starting to figure that out right now… but ill probably figure it out when u put the next thing on

bullzeye95

2007-03-03 19:05:57

Damn… that covered almost everything! By the way, why don't you suggest RadialRoadWalk?

pwnaz0r

2007-03-03 19:08:28

I just like to Make My Own Procedures and im not done yet :) It will include EVERYTHING

Pwnt by Pwnt

2007-03-03 19:25:12

:eek: ok i figured out how to get DTM's and i got one for logs. So where do i put it and how do i make it click on it?? thanks!

pwnaz0r

2007-03-03 19:27:45

Alright I'll Add that

Pwnt by Pwnt

2007-03-03 19:38:36

ok and like its for dropping so would it be like this?

procedure Drop;
begin
repeat
if(FindDTM(Logs,x,y,0,0,700,700)) then
MMouse(x,y,0,0);
wait(100+random(10));
Mouse(x,y,0,0,false);
ChooseOption('rop');
end;

??

pwnaz0r

2007-03-03 19:41:02

From: Pwnt by Pwnt
ok and like its for dropping so would it be like this?

procedure Drop;
begin
repeat
if(FindDTM(Logs,x,y,0,0,700,700)) then
MMouse(x,y,0,0);
wait(100+random(10));
Mouse(x,y,0,0,false);
ChooseOption('rop');
end;

??



procedure Drop;
begin
repeat
if(FindDTM(Logs,x,y,0,0,700,700)) then
begin
MMouse(x,y,0,0);
wait(100+random(10));
Mouse(x,y,0,0,false);
ChooseOption('rop');
end;
until not (FindDTM(Logs,x,y,0,0,700,700))
end;

Ejjman

2007-03-03 20:56:23

procedure findrock;
begin
If(FindColorSpiral(x,y,color,x1,y1,x2,y2))then
begin
If(FindColorSprial(x,y,color2,x+15, Y+15, x -15, y - 15))then
begin
Writeln('Found')l;
end;
end;
end;


Error after writeln, thers an l. Its at the beginning of the advanced procs. :)

pwnaz0r

2007-03-03 20:59:15

Thnx :p

Pwnt by Pwnt

2007-03-03 20:59:51

ok i fixed it :)

pwnaz0r

2007-03-03 21:01:14

Ok kewl and could you edit your Sig to by Pwnaz0r and JAD or by UberBro Procductions? I dnt wanna leave JAD out here

StK Squenc

2007-03-03 21:04:33

STICKY!!!!!!!!!!!

Great tut. It deserves to be sticked…This will defently help me make my scripts =). Great job JAD and Pwnz0r. Can't wait for the UberPedia :)

pwnaz0r

2007-03-03 21:10:20

Hopefully , he will release it soon

Gwallunit

2007-03-03 21:25:23

great script i learnt a lot !!!!

I am a lot more confident at scripting now

rep +++

Best tut on Srl

pwnaz0r

2007-03-03 21:43:04

:) ty

Buckleyindahouse

2007-03-03 23:16:44

Nice Job Guys, This will help all those people who do not know how to script start scripting.

pwnaz0r

2007-03-03 23:35:22

Alright Good Anything I can Add?

JAD

2007-03-04 01:28:33

Edited…

pwnaz0r

2007-03-04 02:07:07

NOTE TO ALL * If you like the Tut or think it should have something added SAY SO *

RudeBoiAlex

2007-03-04 13:49:55

Ive got a bitmap i need it to right click it then click on drop Hows i do it?

pwnaz0r

2007-03-04 14:29:02

Ok im updating majorly now check back in maybe 30 miuntes

JAD

2007-03-04 17:26:44

Pwn, but something on AntiBan up there

pwnaz0r

2007-03-05 14:29:28

Edited Alot :D
[wiki]uber[/wiki]

Gwallunit

2007-03-05 15:26:55

Nice tut mate

Maybe add some SRL Functions to the tut ?

:)

XcanadamanX

2007-03-05 18:43:37


I DO NOT Suggest Using RadialRoadWalk;


ummm…why? RRW is a powerful walking tool. if your walking a road this is the BEST thing to use. RRW updates the roadcolor so You Don't Have To. for finding objects RW is the best to use.

anyway…good job other than what i said. just kinda pissed me off though…^^

edit: vv lol my logged in is 666…just noticed that.

pwnaz0r

2007-03-05 19:27:13

Sry lol :D I just like to make my own :D

syberium

2007-03-05 21:59:54

wow very nice tut, best ive seen. i would add something on autocolor, also on FindObjArea like functions where it searches in a box. most ppl dont understand those. But wow this is a very thorough tut, not only will it help newbs but it helps more advanced people to!

pwnaz0r

2007-03-06 15:37:30

:D it was intended in that way. I will add all of that when i am ungrounded. I currently check onthe status of this forum at school every once and awhile. Nyways pm me ideas so i dnt have to search this forum.

Pwnt by Pwnt

2007-03-06 20:31:39

:P hi again pwnaz0r, well for my Ub3r Ch0pp3r V3(it will be V4 when i get this figured out) needs axe head finding and EntFinding idk if it was in there somewhere but i need help :( well whenever u can read this can u help? or anyone help? thx every1 :) (you can post it on my Ub3r Ch0pp3r V3 cuz i check that more)

pwnaz0r

2007-03-08 20:52:31

Updated again

Pwnt by Pwnt

2007-03-09 13:36:59

Hey pwnaz0r! ive been helping rudeboialex with his scripts and im proud to say that i actually know that they work better now because of this tut! so i wanted to rep u so i think u just like say rep+ or something so if that worked your welcome lol expect a FIRE RUNECRAFTER! from rudeboialex and me! ( its gonna pwn thanks to u :spot:)

pwnaz0r

2007-03-09 14:35:02

:D lol nyways i will be on today but not over spring break. Ill talk you then :D.

PS adding a bunch of sections to the tut

monopolyman

2007-03-09 19:15:35

Great Tut Thanks Pwnaz0r. As one said, it is the best tut i have found, thanks :). I haven't read it all but i'll get to it later on i wanna marco some :). Rep you up also lol.

macromacro123

2007-03-09 20:04:26

thx dude i learned about bitmaps but what they are used for????

pwnaz0r

2007-03-09 20:45:09

Um I will add that

SonOfSheep

2007-03-09 21:07:56

Nice tutorial. Even though i know quite a bit about scar already, i still learned some new stuff!

I just wanted to point out that in your picture for radial road walking it shows 0, 90, 180, 260 but it should be 270. This could screw some people up. Also when you are talking about variables, integers can be negative. Integers are defined as the set of all whole numbers, negative numbers, and zero. Scar doesn't have UInt's.

pwnaz0r

2007-03-09 21:18:11

:) alrighty then . Sry was a little disoriented when i wrote that i guess :D

SonOfSheep

2007-03-09 22:36:10

From: pwnaz0r
:) alrighty then . Sry was a little disoriented when i wrote that i guess :D


lol yah :spot: <——— omg that thing rules how come i never noticed it before

Pwnt by Pwnt

2007-03-10 12:50:23

hey i found a mistake… under the antirandoms part in the understanding thingy it says MakCompass('N'); but it should be MakeCompass('N');

pwnaz0r

2007-03-10 14:16:23

Alright :D tyvm

Avaphi

2007-03-10 20:50:48

Uber bro's nice job on this guide. I am infact directing one of my RL friends to this guide because I want him to start scripting :)

Pinqvin

2007-03-11 05:50:50

Nice tutorial indeed. Hope you finish those autocoloring parts in the near future. That's still a grey area to me (along with a few other advanced things :S )

pwnaz0r

2007-03-20 17:34:10

Dang son! 900 views woot :p sry nyways i should be updating tonight.

pwnaz0r

2007-03-24 19:20:51

:D tyvm anyways im updating alot so hopefully it will be done tonight.

oliver1205

2007-03-25 06:04:10

dont get me wrong this is a awesome tut, but i have a suggestion. In the things like anti ban and proggys, you dont really explain them. this maybe cause your not done yet. If it is, forget this comment.

awesome tut though, now i no how to radieal walk!

pwnaz0r

2007-04-03 00:30:04

Comeon Guys! I need feedback on what to put!!

PS 1000+ views ;)

RudeBoiAlex

2007-04-03 14:51:57

can u plz add the autocolor and make sure it covers more than just for example 1 ore make it do like 3 but make the 2nd 3rd not mined as much

pwnaz0r

2007-04-03 15:01:50

Alright will do when i get home :D

RudeBoiAlex

2007-04-03 15:40:59

ty :)

pwnaz0r

2007-04-03 18:20:02

updating ;)

RudeBoiAlex

2007-04-04 11:52:16

wootage

pwnaz0r

2007-04-09 14:10:45

wootage indeed. yet this is a very hard subject…

stampede10343

2007-04-25 07:01:51

The most helpful tut ever! great job!:)

BeaconofBacon

2007-05-03 14:27:40

Very nice, thanks alot. Love the detail you go in…Not many tuts have that. Much appreciated, and I hope to see more. :D

codx1

2007-05-07 11:02:08

Nice tut, well detailed, I'll be hopefully makin my first rs script in about 1-2 months :spongebob:

Inf456

2007-05-14 19:47:08

NICE! I will be making my first script during the summer sometime =]

skibby

2007-05-21 07:26:20

Excellent job

Freddy1990

2007-05-21 10:36:07

Wow, I haden't noticed this thread before, /me is impressed!
Excellent tutorial, I don't think I've seen many tutorials quite as big as this one :)

JAD

2007-05-21 10:39:22

Thanks a lot guys! Glad to hear it, and I'm sure pwnaz0r would too if he hadn't gotten grounded for bad grades :p

Robbiej

2007-05-21 12:14:26

// Problem fixed


Nice tut :)

muffinman177

2007-05-27 14:11:27

IT helped me alot:) ty

pwnaz0r

2007-06-11 03:12:12

Well i have been gone for a few months now and just dropped in to say hi. I see that my tut is well liked =]. Anyways I probably don't remember most of the things i posted in this tut so i probably wont be making any more additions.(I was hoping to see it stickied when i came back =[

BobboHobbo

2007-06-12 06:45:27

Nice guide.

But please change the font its so big and ugly and annoying to read.

Life's Shadow

2007-06-12 07:58:19

I've just read a lot of TUT's, like seriously just read a heap and I'd also read quite a few from other forums previous to coming to this one and urs was definately one of the best/most helpful tyvm, gonna go write a script now :D

pwnaz0r

2007-06-13 03:17:07

=]

Tim0suprem0

2007-06-16 13:32:20

Wow both you and JAD have helped me soo much in learning to script. Thank you! :spot:

takemu

2007-06-18 13:32:45

cool

program New;
{.include SRL/SRL.scar}

const
Name = 'Color';

procedure GoToColor;
begin
if(FindColor(x,y, 340302, 0, 0, 100, 100))then
begin
Writeln('Found The' + Name);
end else
Writeln('Did Not Find ' + Name);
end;

begin
SetupSRL;
ActivateClient;
GoToColor;
end.

and that's only from the first 5 minutes of reading! thanks a lot

pickpocket68

2007-06-19 00:33:03

nice tut, its helped me out so much. still trying to figure how to input my DTMs though, do i just copy/paste what i get in debug into the script or what? thanks for the tut!

pwnaz0r

2007-06-27 10:24:36

Well i heard it quoted that JAD and i have helped many people learn to script. JAD and I used to be a team kinda when i was into scripting =]. I havent talked to him in a while. JAD if you see this send me an email and ill give you my aim/myspace and we can talk(that actually goes for anyone i know on here or anyone else for that matter =]).

m4g3owns

2007-07-09 06:08:05

grammar


ERROR 7 : 'BEGIN' expected in script.

Pwnaz0r : check to make sure you have a [u]begging at the begging[/u] of all procedures, and mainloop. Also, sometimes, when you state vars before a begin in an procedure/function, you forgot to put var in front of it.


nice tut neway helped me alot seriously

pwnaz0r

2007-07-11 16:25:40

kewl :D

r4mis

2007-07-28 22:52:55

can u make new gude plz scar 3.11 just came out plz

HyperSecret

2007-07-30 19:03:03

helps me out always…keep coming back to the tut whenever i need help, besides when i decided today that i was autocoloring but this tut doesnt have it, but GREAT tut nonetheless

pwnaz0r

2007-08-04 18:36:34

Thnx for the feedback ;). I dn about the auto-coloring part ha. I may add it

mynameisjoe

2007-08-06 10:12:39

Thanks a lot for the lesson on RadialWalk and fixing errors. This Tut covers a whole lot of stuff!

qwerty8475

2007-08-06 23:49:53

thanks dude helped a lot :spot:

pwnaz0r

2007-08-17 16:49:53

Your Welcome ;). Im probably going to add more to another guide now ;).

Dangerous Garden Tools

2007-08-27 12:16:46

mini radial walk guide is awesome.

Pwnt by Pwnt

2007-08-27 13:34:49

O_o I think this is outdated ( player array anyway ) and also :D im gonna start scripting again :) thanks for the tut to remind me how O_o

pwnaz0r

2007-08-27 18:15:01

From: Pwnt by Pwnt
O_o I think this is outdated ( player array anyway ) and also :D im gonna start scripting again :) thanks for the tut to remind me how O_o


KK Will update

Wilio

2007-08-27 20:49:15

Great Tutorial.
The radial walk helped me a lot.

Pwnt by Pwnt

2007-08-28 06:32:54

=\ this might sound kinda… weird… but you should probably fix the circle that only has 350 degrees ;) ( you did 0 90 180 260 :p ) and take the pics again, but with the new SCAR looks, just so they know that they are usin the right program

[-jesus-]

2007-09-03 15:42:20

Nice Tut Pwnaz0r & Jad :D. & How do ppl have trouble w/ Radial Walk? That is simple for me, it's all the small things that give me trouble ;).

Edit: AH!! HAx0r!!:

optikal

2007-10-01 08:06:04

exellent tutorial this is so in depth i printed it out and it is too thick to staple together !!! lol

Thank you

optikal

2007-10-01 08:21:20

Double post sorry

li_HAM1

2007-10-02 19:52:07

thankyou shows how all differnt parts of script fit in:(h):

daw_guy

2007-10-06 15:24:18

w00t i made my first script.
all it does is display a message 10 times but i did it thanks to this tut.
TY so much.

guardian3083

2007-10-16 23:31:41

Right, this guide was… sorta helpful, but since no one seems t obe willing to give me any direct assistance, I've bene having to rely on guides to learn to script. NONE of the guides or tutorials show me how to add a function… err.. well, I know how to set a color, like, i select one item from the editor, selct the point/points I need, or save as bitmap. But how do i call my script to actually use that? How do I get the script to seek out the item, click it, and perform the function? Also, how would I go about adding AntiBan, or another include? I understand that your tutorial is not complete, but could you offer any assistance?

Also, I followed your explanations for adding "procedure" etc, but you don't explain how to do anything RS related, you only cover WriteLn… Will this be made clearer later on?

tckaile

2007-10-22 17:39:27

Amazing. Simply amazing. I read this tut earlier and congrats man on what I would prolly have to say is close to the best tut on here. You cover the basics in begginers to more advanced users. You can't get too much more detailed than that. Congrats again and tyvm for the tut.

pwnaz0r

2007-10-22 17:50:11

Well thank you. It really makes me feel good when some one thinks my tutorials are so good :D

phinoxrobo

2007-10-23 04:58:52

i really like this TUT althought i really dont understand alot of it lol

mark9510

2007-10-27 18:18:10

this is really helping me with my script

robedino230

2007-10-28 15:05:16

ok I am at the very beginning at FindColor until there i understand the findcolor i understand too.
but when i'm about to execute my "script" it says: "Line 5: [Error] (5:14): Unknown identifier 'x' in script"

program New;

procedure GoToColor;
begin
If(FindColor(x,y, 16777215 , 0 , 0 , 100 , 100))then
begin
Writeln('Found The Color');
end;
end;

pwnaz0r

2007-11-07 18:08:29

you have to declare X

CheetahNub

2007-11-09 18:49:56

ofmg u had some spare time? :D:D:D

But where's the "how to add multiplayer" :(

Xhalo

2007-11-10 13:39:19

Wow Thank you thank you. I was wondering why I was having trouble with unexpected errors. You are the best and now I can continue trying to make my first script. Rep +

RedDemon815

2007-11-12 13:08:52

Very nice!
this is another tut that will go into my sig:)
+++rep!

big boy6

2007-11-17 17:40:21

great job man:)

rune_h4ck3r

2007-11-29 15:25:56

That was very helpful to me.:) Thank you for the tutorial:spot:

Edit: I gave u rep for this :D

xinez

2007-11-30 02:36:55

amazing guide!!! 10/10

Rs-Gp-4U

2007-12-05 14:12:31

When i use my auto talker it types into the debug how i make it type into rs?

ooples

2007-12-18 22:43:07

where wer u whin i started scripting

undrin

2007-12-19 13:09:42

Great Tut Dude! I got alot from this.

But am i stupid or what i cant find the Yakman's RadialWalk Helper.
Can u explane clearly where is it? (Ps mabe i cant undersand how because im not good at English ;) )

Daniel

2007-12-21 00:22:57

I always love pwnaz0r's tutorials because he describes everything so well that even a 3 year old could understand (lol).

No offence JAD, but your tutorials don't give enough information. Like that UBERPEDIA version, all it has is just scar tags with a function inside them.

Daniel

2007-12-21 00:25:53

From: Rs-Gp-4U
When i use my auto talker it types into the debug how i make it type into rs?


Use the TypeSend function and not the Writeln function. Example:

TypeSend('Text goes in between the ''');
.

EDIT: Sorry for double posting, didn't realise i posted before.

pwnaz0r

2007-12-24 12:18:07

From: IP-Drowner
I always love pwnaz0r's tutorials because he describes everything so well that even a 3 year old could understand (lol).

No offence JAD, but your tutorials don't give enough information. Like that UBERPEDIA version, all it has is just scar tags with a function inside them.


/puts in sig.

yukarg

2007-12-24 12:31:23

Amazing, simply amazing…. so detailed you don't need any previous scripting knowledge what so ever! Great TUT!

Daniel

2007-12-24 21:02:55

From: pwnaz0r
/puts in sig.


Lol, i see you read my comments :) Well i am only telling the truth!

Dervish

2007-12-27 12:57:03

Eh i didn't get the part with color finders … gr8 tut however :D with it's help i made my first auto :D

Nava2

2008-04-10 21:06:32

Thanks for a great guide, thorough.

I added you on msn, I need some help :( and you said to ask? :)

Thanks again for the guide;

Nava2

King of the Nites

2008-04-11 23:36:37

I am actually glad you bumped this thread because it is a great TUt and i think it should be stickified because this can help out anyone!

dweg

2008-11-01 17:13:33

great job on the tut pwnaz0r! rep++

pwnaz0r

2008-11-01 22:15:53

Haha, I see this tutorial is still "in style" like a year and a half later :)

Dervish

2008-11-08 18:00:12

This might count as gravedigging… :s.

YOU're A G - O - D SERIOUSLY.

This should be stickified :S Its much better than Bebe's tutorial or anything.
You even cover intermediate and advanced stuff !

Rep ++ 4 j00… Souljaboy is in the hoooouuwww….

I loved this guide and I keep on reffering to it when i'm not sure about something. :)

Wow… Only one word : W-O-W.

Amazing.