PDA

View Full Version : UnRivaled Guide To Scripting



pwnaz0r
03-03-2007, 06:36 PM
UNRIVALED GUIDE TO SCRIPTING

If you Like this Tut then plz rep me :D


Pwnaz0r - Pwnaz0r@hotmail.com


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]
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.


[LIST]
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'




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.
http://img267.imageshack.us/img267/4079/firstscarscreenha8.png (http://imageshack.us)


Now Lets Put Some Spaces Like This (Does not have to be exact). We are doing this to add room for our scripting :).
http://img459.imageshack.us/img459/8388/spacesea4.png (http://imageshack.us)

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.
http://img513.imageshack.us/img513/2997/98968129me6.png (http://imageshack.us)

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".

http://img338.imageshack.us/img338/975/83914644oj1.png (http://imageshack.us)

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.

http://img407.imageshack.us/img407/1922/93107852qu1.png (http://imageshack.us)



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

http://img410.imageshack.us/img410/8937/82193080gv9.png (http://imageshack.us)









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.


http://img255.imageshack.us/img255/6856/newscriptni9.png (http://imageshack.us)-Clicking this will result In a blank script.
http://img443.imageshack.us/img443/2769/newscriptqr9.png (http://imageshack.us)- This will Open An existing script.
http://img443.imageshack.us/img443/4280/newscriptxd0.png (http://imageshack.us)- This will Open any script from the web(only ones on Kaitneiks(Outdated)).
http://img45.imageshack.us/img45/2600/newscriptau5.png (http://imageshack.us)-- Will Save A Script.
http://img253.imageshack.us/img253/1116/newscripthf3.png (http://imageshack.us)-- Will Cut Text
http://img168.imageshack.us/img168/7389/newscriptyq9.png (http://imageshack.us)-- Will Copy Text
http://img254.imageshack.us/img254/5253/newscriptot8.png (http://imageshack.us)--Paste
http://img171.imageshack.us/img171/1938/newscriptny7.png (http://imageshack.us)--Will Search The Script
http://img259.imageshack.us/img259/2012/newscriptoi6.png (http://imageshack.us)--Will Play the script
http://img259.imageshack.us/img259/4443/newscriptqr7.png (http://imageshack.us)--Pauses Script
http://img261.imageshack.us/img261/3762/newscriptnc1.png (http://imageshack.us)--Stop
http://img162.imageshack.us/img162/6299/newscriptyf9.png (http://imageshack.us)--Step Into
http://img162.imageshack.us/img162/9857/newscriptxq6.png (http://imageshack.us)--Step Over
http://img19.imageshack.us/img19/9082/newscripthc7.png (http://imageshack.us)--Color Picker
http://img337.imageshack.us/img337/3356/newscriptiy0.png (http://imageshack.us)--CLears The Debug Box
http://img154.imageshack.us/img154/5462/newscriptzb7.png (http://imageshack.us)--Turns Report Box On Or Off
http://img154.imageshack.us/img154/224/newscriptgx5.png (http://imageshack.us)-_Drag These CrossHairs to Select Client














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.




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))th en


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

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.












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
http://img258.imageshack.us/img258/5715/badscripting1lb1.png (http://imageshack.us)

GOOD SCRIPTING STANDARDS
http://img265.imageshack.us/img265/864/goodscripting1kw4.png (http://imageshack.us)

OR MY PERSONAL SCRIPTING STANDARDS
http://img340.imageshack.us/img340/9236/goodscripting2ll5.png (http://imageshack.us)


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.









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.

http://img141.imageshack.us/img141/430/examplezn4.png (http://imageshack.us)


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

http://img339.imageshack.us/img339/7579/examplest5.png (http://imageshack.us)


** 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

http://img337.imageshack.us/img337/8262/exampleqs2.png (http://imageshack.us)

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

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.

http://img147.imageshack.us/img147/2947/doijb3.png (http://imageshack.us)















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).

http://img187.imageshack.us/img187/8805/dtmwu4.png (http://imageshack.us)

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;


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










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.


Go To Script --> PictureToStr
Now Click Open
Select Your File
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


http://img20.imageshack.us/img20/5126/radialwalk1rq6.png (http://imageshack.us)


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.

http://img178.imageshack.us/img178/7295/radialwalk1we4.png (http://imageshack.us)

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

http://img88.imageshack.us/img88/328/radialwalk1uc0.png (http://imageshack.us)



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!!


It works amazingly. Here is kinda a mini tutorial on it.

While In SCAR, Go TO Open
Click on Includes in The " Main Menu " of SCAR(where you downloaded srl)
go to includes --> SRL --> scripts --> Yakman's RadialWalk Helper
Open it
Press Play
Make sure you are logged in to RS
Move The Window Over to The Side, Out Of the way of the minimap
Press "CAPTURE FROM CLIENT" on the right hand side
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.

http://img237.imageshack.us/img237/4541/radialwalk2zp6.png (http://imageshack.us)

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!!












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



AntiBan
Undetectable
Higly Accurate


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.





[CENTER]
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
03-03-2007, 09:05 PM
UBERPEDIA!!
http://www.villavu.com/forum/showthread.php?t=6644

pwnaz0r
03-03-2007, 09:54 PM
Ok you can post now, about halfway done.

Gwallunit
03-03-2007, 09:54 PM
Great tut

*permission to post*

Rep+ for u

first tut that actually helped me

WhoCares357
03-03-2007, 10:52 PM
I like all the pics. Nice job.

pwnaz0r
03-03-2007, 11:06 PM
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
03-03-2007, 11:55 PM
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
03-04-2007, 12:05 AM
Damn... that covered almost everything! By the way, why don't you suggest RadialRoadWalk?

pwnaz0r
03-04-2007, 12:08 AM
I just like to Make My Own Procedures and im not done yet :) It will include EVERYTHING

Pwnt by Pwnt
03-04-2007, 12:25 AM
: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
03-04-2007, 12:27 AM
Alright I'll Add that

Pwnt by Pwnt
03-04-2007, 12:38 AM
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
03-04-2007, 12:41 AM
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
03-04-2007, 01:56 AM
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
03-04-2007, 01:59 AM
Thnx :p

Pwnt by Pwnt
03-04-2007, 01:59 AM
ok i fixed it :)

pwnaz0r
03-04-2007, 02:01 AM
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
03-04-2007, 02:04 AM
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
03-04-2007, 02:10 AM
Hopefully , he will release it soon

Gwallunit
03-04-2007, 02:25 AM
great script i learnt a lot !!!!

I am a lot more confident at scripting now

rep +++

Best tut on Srl

pwnaz0r
03-04-2007, 02:43 AM
:) ty

Buckleyindahouse
03-04-2007, 04:16 AM
Nice Job Guys, This will help all those people who do not know how to script start scripting.

pwnaz0r
03-04-2007, 04:35 AM
Alright Good Anything I can Add?

JAD
03-04-2007, 06:28 AM
Edited...

pwnaz0r
03-04-2007, 07:07 AM
NOTE TO ALL * If you like the Tut or think it should have something added SAY SO *

RudeBoiAlex
03-04-2007, 06:49 PM
Ive got a bitmap i need it to right click it then click on drop Hows i do it?

pwnaz0r
03-04-2007, 07:29 PM
Ok im updating majorly now check back in maybe 30 miuntes

JAD
03-04-2007, 10:26 PM
Pwn, but something on AntiBan up there

pwnaz0r
03-05-2007, 07:29 PM
Edited Alot :D
uber

Gwallunit
03-05-2007, 08:26 PM
Nice tut mate

Maybe add some SRL Functions to the tut ?

:)

XcanadamanX
03-05-2007, 11:43 PM
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
03-06-2007, 12:27 AM
Sry lol :D I just like to make my own :D

syberium
03-06-2007, 02:59 AM
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
03-06-2007, 08:37 PM
: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
03-07-2007, 01:31 AM
: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
03-09-2007, 01:52 AM
Updated again

Pwnt by Pwnt
03-09-2007, 06:36 PM
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
03-09-2007, 07:35 PM
: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
03-10-2007, 12:15 AM
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
03-10-2007, 01:04 AM
thx dude i learned about bitmaps but what they are used for????

pwnaz0r
03-10-2007, 01:45 AM
Um I will add that

SonOfSheep
03-10-2007, 02:07 AM
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
03-10-2007, 02:18 AM
:) alrighty then . Sry was a little disoriented when i wrote that i guess :D

SonOfSheep
03-10-2007, 03:36 AM
:) 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
03-10-2007, 05:50 PM
hey i found a mistake... under the antirandoms part in the understanding thingy it says MakCompass('N'); but it should be MakeCompass('N');

pwnaz0r
03-10-2007, 07:16 PM
Alright :D tyvm

Avaphi
03-11-2007, 01:50 AM
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
03-11-2007, 09:50 AM
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
03-20-2007, 09:34 PM
Dang son! 900 views woot :p sry nyways i should be updating tonight.

pwnaz0r
03-24-2007, 11:20 PM
:D tyvm anyways im updating alot so hopefully it will be done tonight.

oliver1205
03-25-2007, 10:04 AM
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
04-03-2007, 04:30 AM
Comeon Guys! I need feedback on what to put!!

PS 1000+ views ;)

RudeBoiAlex
04-03-2007, 06:51 PM
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
04-03-2007, 07:01 PM
Alright will do when i get home :D

RudeBoiAlex
04-03-2007, 07:40 PM
ty :)

pwnaz0r
04-03-2007, 10:20 PM
updating ;)

RudeBoiAlex
04-04-2007, 03:52 PM
wootage

pwnaz0r
04-09-2007, 06:10 PM
wootage indeed. yet this is a very hard subject...

stampede10343
04-25-2007, 11:01 AM
The most helpful tut ever! great job!:)

BeaconofBacon
05-03-2007, 06:27 PM
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
05-07-2007, 03:02 PM
Nice tut, well detailed, I'll be hopefully makin my first rs script in about 1-2 months :spongebob:

Inf456
05-14-2007, 11:47 PM
NICE! I will be making my first script during the summer sometime =]

skibby
05-21-2007, 11:26 AM
Excellent job

Freddy1990
05-21-2007, 02:36 PM
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
05-21-2007, 02:39 PM
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
05-21-2007, 04:14 PM
// Problem fixed


Nice tut :)

muffinman177
05-27-2007, 06:11 PM
IT helped me alot:) ty

pwnaz0r
06-11-2007, 07:12 AM
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
06-12-2007, 10:45 AM
Nice guide.

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

Life's Shadow
06-12-2007, 11:58 AM
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
06-13-2007, 07:17 AM
=]

Tim0suprem0
06-16-2007, 05:32 PM
Wow both you and JAD have helped me soo much in learning to script. Thank you! :spot:

takemu
06-18-2007, 05:32 PM
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
06-19-2007, 04:33 AM
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
06-27-2007, 02:24 PM
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
07-09-2007, 10:08 AM
grammar



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.


nice tut neway helped me alot seriously

pwnaz0r
07-11-2007, 08:25 PM
kewl :D

r4mis
07-29-2007, 02:52 AM
can u make new gude plz scar 3.11 just came out plz

HyperSecret
07-30-2007, 11:03 PM
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
08-04-2007, 10:36 PM
Thnx for the feedback ;). I dn about the auto-coloring part ha. I may add it

mynameisjoe
08-06-2007, 02:12 PM
Thanks a lot for the lesson on RadialWalk and fixing errors. This Tut covers a whole lot of stuff!

qwerty8475
08-07-2007, 03:49 AM
thanks dude helped a lot :spot:

pwnaz0r
08-17-2007, 08:49 PM
Your Welcome ;). Im probably going to add more to another guide now ;).

Dangerous Garden Tools
08-27-2007, 04:16 PM
mini radial walk guide is awesome.

Pwnt by Pwnt
08-27-2007, 05:34 PM
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
08-27-2007, 10:15 PM
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
08-28-2007, 12:49 AM
Great Tutorial.
The radial walk helped me a lot.

Pwnt by Pwnt
08-28-2007, 10:32 AM
=\ 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-]
09-03-2007, 07:42 PM
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!!:http://img511.imageshack.us/img511/5537/07sep03163457mx6.jpg

optikal
10-01-2007, 12:06 PM
exellent tutorial this is so in depth i printed it out and it is too thick to staple together !!! lol

Thank you

optikal
10-01-2007, 12:21 PM
Double post sorry

li_HAM1
10-02-2007, 11:52 PM
thankyou shows how all differnt parts of script fit in:(h):

daw_guy
10-06-2007, 07:24 PM
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
10-17-2007, 03:31 AM
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
10-22-2007, 09:39 PM
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
10-22-2007, 09:50 PM
Well thank you. It really makes me feel good when some one thinks my tutorials are so good :D

phinoxrobo
10-23-2007, 08:58 AM
i really like this TUT althought i really dont understand alot of it lol

mark9510
10-27-2007, 10:18 PM
this is really helping me with my script

robedino230
10-28-2007, 07:05 PM
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
11-07-2007, 11:08 PM
you have to declare X

CheetahNub
11-09-2007, 11:49 PM
ofmg u had some spare time? :D:D:D

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

Xhalo
11-10-2007, 06:39 PM
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
11-12-2007, 06:08 PM
Very nice!
this is another tut that will go into my sig:)
+++rep!

big boy6
11-17-2007, 10:40 PM
great job man:)

rune_h4ck3r
11-29-2007, 08:25 PM
That was very helpful to me.:) Thank you for the tutorial:spot:

Edit: I gave u rep for this :D

xinez
11-30-2007, 07:36 AM
amazing guide!!! 10/10

Rs-Gp-4U
12-05-2007, 07:12 PM
When i use my auto talker it types into the debug how i make it type into rs?

ooples
12-19-2007, 03:43 AM
where wer u whin i started scripting

undrin
12-19-2007, 06:09 PM
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
12-21-2007, 05:22 AM
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
12-21-2007, 05:25 AM
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
12-24-2007, 05:18 PM
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
12-24-2007, 05:31 PM
Amazing, simply amazing.... so detailed you don't need any previous scripting knowledge what so ever! Great TUT!

Daniel
12-25-2007, 02:02 AM
/puts in sig.

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

Dervish
12-27-2007, 05:57 PM
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
04-11-2008, 01:06 AM
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
04-12-2008, 03:36 AM
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
11-01-2008, 09:13 PM
great job on the tut pwnaz0r! rep++

pwnaz0r
11-02-2008, 02:15 AM
Haha, I see this tutorial is still "in style" like a year and a half later :)

Dervish
11-08-2008, 11:00 PM
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.