I - Intro.
Ok, I'm going to teach you how to make your first script. Many people think that making a script is hard, I can't sugar coat it, If your a learner
it is. But never fear becuase in this tutorial i will teach you how to make your very own, spectacular, ownage, pwnage, amazing, astonishing,
astounding, fabulous, fantastic, fantastical, incredible, marvelous, miraculous, phenomenal, prodigious, stupendous, unbelievable, wonderful,
wondrous,acceptable ,admirable, adorable ,amiable ,chaste ,comfortable ,convenient, and very very sexy - Auto Login!!!
II - Explanation?
So WTF!!! is an auto login, well autologin is my name for a script which will click on specified buttons and type in your 'User' and 'Pass' and
Literally log you in.
Why do you need something to log you in,
1) Saves Time.
2) Impresses your parents.
3) Makes you feel good.
4) First Script Made
III - Beginning Parts.
1)Ok so now we will begin, First Open Up scar:
2) Then Open Up the RuneScape window:
^ HeHe ^
3) Then Drag the crosshair on the bar onto the runescape window:
^^^^ Note: These 3 steps are called 'specifying the client' (for future reference) ^^^^
Ok now we've specified the client , We can Begin;
Making the script:
So we start of with something like this:
Ok now put some spaces between the lines:
SCAR Code:
program New;
{.include srl/srl.scar}
begin
end.
Thats How we start any script we want to make.
Spaces here will help you save time instead of spacing the lines later.
Why add the because if you don’t you will die!!!!
j/k you need it because it has most of the things that you have to use e.g Mouse and TypeSend.
Ok Now what we need to do is declare a Procedure which will click on Existing User button, So we can start it like this:
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
end;
begin
end.
As you can see here i've made a procedure called it ClickOnExistingUserButton, origonal,no?
Ok now what we need to do is pick the co-ords (coordinates) of the button Existing User
This is roughly what our Rs Screen looks like to S.C.A.R.
Rough Drawing
The ' - ' is where the co-ords of the button is so having a look at the origonal welcome screen:
^((note end cords aren't (700,700) they are (765,503)))^
You can see that the rough drawing is similar to the real screen.
So going back to picking our co-ords....
Drag S.C.A.R down so you can only see the color picker.
Now click the thingy in the red box (color picker) and move it on the Existing User Button , then click again to get the co-ords
Then Drag Up Scar and you'll see the co-ords in the debug box .
Now the first bit says
SCAR Code:
Color Picked: 5918541 at (426, 277)
.
Ignore the first part, thats the color, we're only interested in part.
IV - Start To Put it together.
Ok Now there are two main ways to make it click in SCAR and SRL (excluding GetMousePos) one of them is:
Number 1= ^ What this does is you put your co-ords in the 'x, y' part and it left clicks it. (426, 277) are your x, y co-ords. ^
Ever Remember in Maths lessons when the explination of coordinates were 'along the corridor and up the stairs' (in england)
Well
x:= Along the corridor (426)
y:= Up the Stairs (277)
(x,y) in this case is equal to (426, 277) where the existing user button is.
SO what does True do?
True will tell it to click left or not? Left key on the mouse and right key:
SO if it was False it would _____ click;
Acceptable answers: 'side','right' click.
You got it
Number 2= ^ this is based upon the same priciples as clickmouse' (x,y := 426, 277). But the thing which makes this much much better and efficient to
use is that it has randomness in it ^
So whats randomness?
Well its located here (in bold)
Mouse(x,y,1,1, true)
On the screen there are loads of pixels (426, 277) means 426 pixels along 277 pixels up.( 'along the corridor and up the stairs')
what mouse cleverly does is that if you set it as 1,1 then it will change the values by adding or subtracting 1 from each co-ord.
SO the values could be (426, 277),(427,277),(427,276) ,(426,276) and (425,277) e.t.c. You can see it will randomly add or subtract 1 pixel.
SO if it was 1,0 it would subtract/add on 1 from the x co-ord. E.t.c.
And you know what True does . If you don't, see the men in white coats.
You can never get banned for using Mouse ( unless your dumb enough to use co-ord clicking for walking with no randomness )
So which procedure will you use for clicking.
A) Mouse; ( Use this one hint hint!!!!!);
B) ClickMouse; (Dont use this!!!!!!!!!! hint hint!!!);
You will use the procedure _____ ;
Acceptable Answers:= 'A', 'Mouse';
If you said clickmouse you got 10% (Because i feel sorry for you )
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++
Ok we're using Mouse.
So back to our Amazing (Put Wizzup? to shame!! Script).
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000))
WriteLn('Clicked Existing User Button')
end;
begin
end.
Ok so we now know it's going to click on the button co-ords, with 1 pixel randomness +/- on the x,y co-ords.
What WriteLn('') does is it writes something in the debug box.
Debug Box:= The place where (after we had selected the co-ords of the Existing User Button) the
SCAR Code:
Color Picked: 5918541 at (562,
480)
thing appered in.
So it WriteLn('Clicked Existing User Button') would make this happen:
What wait does is it Basically Waits in miliseconds. So 1000 would be 1 second so on. What Random(2000) does it that it waits between
0 and 2 secs.
When you click it it takes some time for the next screen to appear, also it stops you from getting banned .
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++
So, Ok, we've got this far..
This is what we have:
So we just need our Amazing Ownage script to send our username and pass;
SO we can use two procedures in SCAR + SRL to type for us:
Number 1=
SCAR Code:
SendKeys('Thing you want to type Here')
^ What this does is type the text between the ' ' ^ It does it really quickly and just does the whole sentence.
e.g.
Normal Person: hello h... (Take 1 second)
Send Keys: hellohowareyoudoingilikescarscriptingyayayayayayay ayayay (Takes 1/10 of a second)
This is bad because Jagex can detect this very easily.
BUT
Never fear.....
SCAR Code:
TypeSend('Thing you want to type Here')
Is Here!!!
^ What this does is it types it humanly ^ This is undetectable (Very Good!!!)
e.g.
Normal Person: hello how (Takes 1 second)
Send Keys: hello how (Takes 1 second)
Very good,no? And once more there are random waits between each word it types.
SO we declare another procedure;
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000))
WriteLn('Clicked Existing User Button')
end;
Procedure TypeInUserandPass;
Begin
end;
begin
end.
SO if you want someone else to use it you put:
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000))
WriteLn('Clicked Existing User Button')
end;
Procedure TypeInUserandPass;
Begin
TypeSend('UsernameHere') // username here!
end;
begin
end.
Ok thats what we have, so it will type the username of the dude, who is using it, in a human fashion. That will mean he won't get banned YaY!
Now we need to make it go to the password section of the screen. By doing that we press 'Enter';
Enter in S.CA.R is Chr(13); but TypeSend is really cool because it also presses enter after it types something.
TypeSend- Types and presses enter, exciting, no?
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000))
WriteLn('Clicked Existing User Button')
end;
Procedure TypeInUserandPass;
Begin
TypeSend('UsernameHere') // username here!
wait(1000+Random(200))
TypeSend('Password here')
end;
begin
end.
^ Ok now it enters are password in safely without any detectability, meaning your chance of being banned is minimum! ^
Ok so now time for the real part:
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000))
WriteLn('Clicked Existing User Button')
end;
Procedure TypeInUserandPass;
Begin
TypeSend('UsernameHere') // username here!
wait(1000+Random(200))
TypeSend('Password here')
end;
Procedure CompleteLogin;
Begin
end;
begin
end.
Ok I've made a new procedure called CompleteLogin What this does is it completes the login. So you have something like this up to now:
SO you ask why's the typing line on the username side once we've typed in the password???
Because TypeSend presses enter after it has typed something .
Ok so we've got this far, now we need it to click the login button.
SO we get the color Picker and like we did with the existing user button you put it over the login button.
Look in the debug box you should get something like this:
SCAR Code:
Color Picked: 4471610 at (299, 316)
We're only interested in the (299, 316) part.
SO we want to make it click the co-ord, we have to use Mouse not ClickMouse.
Our script should look like this
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000))
WriteLn('Clicked Existing User Button')
end;
Procedure TypeInUserandPass;
Begin
TypeSend('UsernameHere') // username here!
wait(1000+Random(200))
TypeSend('Password here')
end;
Procedure CompleteLogin;
Begin
Mouse(299, 316,1,1,true)
WriteLn('Clicked Login Button')
end;
begin
end.
SO it's clicked the login button now it needs to wait until the confirmation screen appears, so we can make it wait until it appears. Take approx
5 seconds. So lets add 2 secs random wait :
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000))
WriteLn('Clicked Existing User Button')
end;
Procedure TypeInUserandPass;
Begin
TypeSend('UsernameHere') // username here!
wait(1000+Random(200))
TypeSend('Password here')
end;
Procedure CompleteLogin;
Begin
Mouse(299, 316,1,1,true)
WriteLn('Clicked Login Button')
WriteLn('Waiting For the Confirmation Screen!')
Wait(5000+Random(2000))
end;
begin
end.
Now we need to get the confirmation screen on and pic the co-ords of it:
SO we pick it from the Blue Spot (middle of Click Here To Play button) and we use the color picker again...
SCAR Code:
Color Picked: 16777215 at (381, 338)
(381, 338) are the co-ords of the middle point of the button.
We dont want to get banned so we need Pixel Randomness
Remember in Mouse what the 1,1 is?
Well we can't have 1 pixel randomness or we will get banned!!!!
So we'll change it to 5,5. So our script should look like:
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000));
WriteLn('Clicked Existing User Button');
end;
Procedure TypeInUserandPass;
Begin
TypeSend('UsernameHere'); // username here!
wait(1000+Random(200));
TypeSend('Password here');
end;
Procedure CompleteLogin;
Begin
Mouse(299, 316,1,1,true);
WriteLn('Clicked Login Button');
WriteLn('Waiting For the Confirmation Screen!');
Wait(5000+Random(2000));
Mouse(381, 338,5,5,true);
wait(2000+Random(3000));
end;
begin
end.
I added a wait in their because if you want to add anything then you need to make sure the game has fully loaded (Inventory, ChatBox,
MainScreen and Minimap ).
V - Assembling/See what we have Acieved.
SO what about the end bit??? You ask Edn Bit :=
Well thats what we call a Main Loop thats where we put all our procedures. Without a main lopp our script wouldn't do anything.
try running without the mainloop:
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000));
WriteLn('Clicked Existing User Button');
end;
Procedure TypeInUserandPass;
Begin
TypeSend('UsernameHere'); // username here!
wait(1000+Random(200));
TypeSend('Password here');
end;
Procedure CompleteLogin;
Begin
Mouse(299, 316,1,1,true);
WriteLn('Clicked Login Button');
WriteLn('Waiting For the Confirmation Screen!');
Wait(5000+Random(2000));
Mouse(381, 338,5,5,true);
wait(2000+Random(3000));
end;
begin
end.
You'll Get this message
SCAR Code:
Successfully compiled
Successfully executed
WTF!!!! It hasn't done anything!!!!! Rawr!!!!! Grrr!!!!!!!.
Thats why you need a mainloop saves anger and time .
Ok SO this is the prime Task, If you don't do this correctly you better go back to sythe.org !!
Ok a mainloop must start with Because without it all the procedures in SRL won't work Like
Mouse and TypeSend .
SO our Script Looks Like this:
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000));
WriteLn('Clicked Existing User Button');
end;
Procedure TypeInUserandPass;
Begin
TypeSend('UsernameHere'); // username here!
wait(1000+Random(200));
TypeSend('Password here');
end;
Procedure CompleteLogin;
Begin
Mouse(299, 316,1,1,true);
WriteLn('Clicked Login Button');
WriteLn('Waiting For the Confirmation Screen!');
Wait(5000+Random(2000));
Mouse(381, 338,5,5,true);
wait(2000+Random(3000));
end;
begin
SetupSRL;
end.
Ok we've SetupSRL; now what do we do.
We need to make sure the S.C.A.R window is minimized. How can we do this, we'll after Specifying the client (Steps 1-3) this thingy
works : .
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000));
WriteLn('Clicked Existing User Button');
end;
Procedure TypeInUserandPass;
Begin
TypeSend('UsernameHere'); // username here!
wait(1000+Random(200));
TypeSend('Password here');
end;
Procedure CompleteLogin;
Begin
Mouse(299, 316,1,1,true);
WriteLn('Clicked Login Button');
WriteLn('Waiting For the Confirmation Screen!');
Wait(5000+Random(2000));
Mouse(381, 338,5,5,true);
wait(2000+Random(3000));
end;
begin
SetupSRL;
ActivateClient;
end.
SO thats done what else. We have 3 more procedures we have to call in Cronilogical order (First Second Thrid e.t.c).
So we have
SCAR Code:
ClickOnExistingUserButton;
TypeInUserandPass;
CompleteLogin;
And so our script fully made up and functioning (Working) is: gay(j/k)
SCAR Code:
program New;
{.include srl/srl.scar}
Procedure ClickOnExistingUserButton;
Begin
Mouse(426, 277,1,1,true);
Wait(1000+Random(2000));
WriteLn('Clicked Existing User Button');
end;
Procedure TypeInUserandPass;
Begin
TypeSend('UsernameHere'); // username here!
wait(1000+Random(200));
TypeSend('Password here');
end;
Procedure CompleteLogin;
Begin
Mouse(299, 316,1,1,true);
WriteLn('Clicked Login Button');
WriteLn('Waiting For the Confirmation Screen!');
Wait(5000+Random(2000));
Mouse(381, 338,5,5,true);
wait(2000+Random(3000));
end;
begin
SetupSRL;
ActivateClient;
ClickOnExistingUserButton;
TypeInUserandPass;
CompleteLogin;
end.
;
VI - Glossary.
Here are some Names that Scripters use when talking about certain things:
co-ords := Co ordinates;
Mouse := Click;
Procedure := Something which does something (Paradoxical )
Function := Something which does Something but also gives us a Result e.g.
SCAR Code:
Function FindMom : Boolean;
Begin
If FindBitmap(yourmom,x,y) Then
Result := True;
end;
ActivateClient := Minimizes S.C.A.R window.
Script := Something which is made up of Code.
Code := Writing which does something with your computer.
All I can think about Right Now!
VII - End Notes/ Credits.
Well basically I made this tut to inspire people that scripting isn't something thats really boring and that only elite people can do.
Every one was a noob once upon a time....
EveryOne has the potential. Thanks-
Credits:
YakMan- Started me Scripting. Thanks Buddy!
Devs- No SRL without you.
Fakawi - Nice Community.
Rest Of the members- Thanks guys!!!
End Note:= If you liked this tutorial You can rep++ me