PDA

View Full Version : Scar Basics - (Old Tutorial).



XxKanexX
04-12-2006, 03:30 PM
-------------------------------------------------------------------------------------------
GUESS WHAT! I found nearly everyone of my tutorials on Flaxpicker :). Since i posted them there a while ago. So now, I'll post the ones that might help. They are a little pathetic now since i wrote them when i was only just learning.. But, i hope others learn. :)
-------------------------------------------------------------------------------------------


( Entirely Written By Xx Kane xX)
Here are some basic commands if you couldnt be bothered reading the scar tutorial (You can also go to Scar>Help>Help. This will open a Website) Then use the post below.

[INDEX:]
Index
Picking X, Y + Colors
Mouse
Typing
Wait
Colors
Procedures
Until
Integers+Strings
Includes
Scar 2.2 Help
{Hint} - New Topics Are Royal Blue, Scripts Are Deep Sky Blue.
Help In That Topic Is Normal.



[Picking X, Y: Click on the Color Picker in scar]
The screen should freeze. Then move your cursor to where you want
your mouse or whatever your using x, y to go to. Click the left mouse.
The screen should now resume.Down the bottom of scar it should
say: 'Color Picked: COLOR at (X, Y)' , The X And Y Are 3 Numbers
Normally, but can reach to 4.Make sure if your selecting the X, Y of
a game you use the crosshairs on the game first. Otherwise the x, y
Numbers will not work and will still run but will just use the screen
instead of that client.]

[MOUSE:]
movemouse(x, y) //Moves the mouse to the spot in the brackets,
To choose the x, y use the Color Picker.

movemousesmooth(x, y) //Does the same as movemouse, But the cursor
will smoothly move across the screen, as Movemouse moves it directly
there.

clickmouse(x, y, true) //This will click where the x, y is with the
left mouse. Change true to false for the right mouse.

holdmouse(x, y, true) //Holds the left mouse click.

releasemouse(x, y, true) //Releases the left click if its on hold.

[TYPING:]

sendkeys('Text'); //Will send Text to whatever your in.

sendkeyssilent('Text'); //Will send Text to the selected Text box,
sendkeys sends to whatever Text box you are in or scar.

writeln('Text'); //Writes Text in the scar box Below.

[WAIT:]

wait(Millisecond) // Change millisecond to how many Milli seconds you
want it to wait before the next command/script -
Examples:

wait(1) = Waits 1 Milli second
wait(3000) = Waits 3 Seconds.

[COLORS:]

Colors can be spelt in the English language , "Colors" or "Colours" -
Scar will ONLY recognize "Colors" - Where i am (Australia), We mostly
spell it here "Colours", so now i have gotten used to "Colors". It
will become regular and click in your mind.

if(findcolor(x, y, color, xs, ys, xe, ye)) then
movemouse(x, y);//This will, if
the color you have put in is found, move the mouse to that
spot. //x, y Is before the color so that it means that that
color is now named x, y.

NOTE: Before Begin you will need to put:
var
X, Y :Integer

[PROCEDURES:]

Procedures are basically a script thats cut into sections.
Example of a procedure script:

Procedure New1;
begin
movemouse(x, y);
end;

Procedure New2;
var
x, y :Integer
begin
if(findcolor(x, y, color, xs, ys, xe, ye))then
movemouse(x, y)
end;

Procedure New3;
begin
sendkeyssilent('Hello');
end;

begin
New1;
New2;
New3;
end.

This will play New1, New2, And New3. as you can see a Procedure ends
in end; not end. After your procedures are finished make sure at
the bottom you add, this is where you add end. with a full stop.:

Begin
Procedure;
Procedure;
etc..
end.

If you want a certain Procedure to repeat,(Using Procedure 1; In The
Example) then this is what you would do at the bottom:

Begin
repeat
Procedure 1;
until(false); //Scroll Down To The "Until" Information To See How You
Can Configure Until. Procedure 2; //If there is another procedure, if
not just put after until end.
etc..
end.

[UNTIL:]

Until is used when 'repeat' is used. example:

begin
repeat
writeln('Repeating !');
until(false)
end.

This will repeat 'Repeating !' In the scar box down the bottom.
In the brackets if you want it to completely keep repeating you put
in false. If you want it to stop after a color is found this is what
you would do:

until(findcolor(x, y, color, xs, ys, xe, ye))

You can also put getcolor and other things in there. This is just
basics.

[Integers+Strings:]
Integers are a number without a decimal, Strings are words that can
be used. Example, before 'begin' you would put this:

varBla :String; //Change 'Bla' to whatever you want, How its used below
a, b, c :Integer; //Can only be letters.

Using an Integer in a script:

var
a :Integer;
begin
a := 2
writeln(inttostr(a)); //Change a to whatever your Integer is. Int-To-Str Stands For Integer To String.
(a, b, c - z)
end.

The script above will write 2 in the scar text box. If you want it to
send to another text box change line 5 to: sendkeyssilent(inttostr(a));
//Select the textbox you want it to send to with the crosshairs, More
about sendkeys above in post.

You can also make a random number with an Integer script, Example:

var
a :Integer;
begin
repeat
a :=random(100) //Change 100 to whatever random number you want
it between (0 - //Number)
writeln(inttostr(a));
until(false)
end.

A Quick little plus calculator ( This script will plus A, B and C
together. You can change the numbers after a, b and c to what you
want. Also you can change writeln to sendkeyssilent after selecting
the text box using the Crosshairs.:

var
a, b, c :Integer;
begin
a :=2
b :=2
c :=2
writeln(inttostr(A+B+C)) //You can change the '+' to '*' to times it.
more information below.
end.

Calc Information:
You can change the '+' To any of these:
* = Times
/ = Divide (With this one, lets say where diving 2 and 4, the answer
is 2, You would put the 4 in a and the 2 in b.. like so:

var
a, b, c :Integer;
begin
a :=4
b :=2
c :=2
writeln(inttostr(A/B))
end.
You dont always have to have a b and c. It can range from any Integer.

Strings:

Here is a basic string script that will write it in the scar textbox

var
moo :String; //Chhange moo to whatever you want.
begin
moo :='MooMoo'; //Change MooMoo to whatever you want to type
writeln(moo); //If you changed the string 'moo' to your own thing,
replace 'moo' in the writeln brackets to your string name.
end.

[INCLUDES:]
Includes are VERY useful if you dont know how to write commands,
example: If you didnt know how to make runescape click the
inventory box you would use the include (I dont know what one :S)..
You can download the Includes through scar:
Scar 2.2>File>Download Includes
Read the includes to find what command you can use..
If you are using an include put this:
{.include include.txt}
after Program/Procedure Name; and before the begin/Integers/Strings of a script, Example of the Includes Test script supplied in the scar Test folder:

program IncludeTest;
{.include include.txt}
var f: Integer;
begin
//WriteInt is declared in include.txt
WriteInt(3);
for f:= 1 to 10 do
WriteInt(f);
Writeln('a');
end.

This will include include.txt, Since WriteInt isnt a proper command
include.txt Tells it that WriteInt is really Writeln. Simple Enough!
:p

[Scar 2.2 Help:]
1.Downloading Includes: SCAR 2.2>File>Download Includes
2.News And Updates will be shown in the scar text box down the bottom
when loaded.
3.The Color picker can pick X, Y and the color of an object. More
information all the way up the top.
4.Crosshairs, clicks the crosshairs and hold the click, then select
the client you want it to recognize at use the script on.
5.Click the play button to Play the script, Stop button to stop the
script and Pause button to Pause the script.
6. While in a script if you cant get into SCAR 2.2 or other versions
and stop the script use the hotkeys (automatically set when installed)
CTRL+ALT+S <-- This will stop any running script. CTRL+ALT+R <--This
Will Run A Script If Not Already Running. if your hotkeys seem to stop
working then to change them go to SCAR 2.2>Tools>Redefine Hotkeys.
7. To make scar forget the client window you selected with the
crosshairs click on (when in scar) SCAR 2.2>Client>Forget Specified
Window.
8. To go to scar forums through scar:
Scar 2.2>Help>Scar Forums
- Help file:
Scar 2.2>Help>Help
- Scar Homepage:
Scar 2.2>Help>Scar Homepage
etc.



Help/Questions - Pm Meh..

pwnaz0r
03-09-2007, 01:29 AM
God I hate noobs. Kane if you can delete this noobs post so it will be out of your tut. nice tut overall but get that crap out of here. We don't want your freaking sites noob! Go advertise elsewhere. Most people here are 13 FGS!

JAD
03-10-2007, 02:38 PM
all these fricken nooby link spammers..Mods please delete :p pretty good tut though kane.

HarryJames
03-23-2007, 10:20 PM
God I hate noobs. Kane if you can delete this noobs post so it will be out of your tut. nice tut overall but get that crap out of here. We don't want your freaking sites noob! Go advertise elsewhere. Most people here are 13 FGS!



ime 12 :)

R a N c H
05-19-2007, 03:27 AM
Yeah great tut, will help me and alot of others lol.


P.s - You noobs that post links are wrecking the forums. There is no need for it here.

fert
11-01-2007, 11:21 PM
great tutorial that will definitly help me get a script out there

wafyl
11-05-2007, 09:55 PM
Thanks, this really helped!