SRL Archive - Outdated Tutorials

Easy And Usefull Stuff Tutorial!!!


Ilikepie1995

2007-06-30 15:35:52

Hello you might be a sucker at scripting while you reading this.Iam just gonna tell you some basic things, that are pretty usefull :).

Some people think what other things are there if click mouse and move mouse are really detecteble?How i make the mouse move to a spot with the color i picked and stuff like that, read below if you are not too lazy and you will learn something from it :D.

Well the first thing is when you want your script to be nice and don't get an error because of the code.
program Something;
{.include SRL/SRL.scar} //ALWAYS HAVE THIS!!!


Procedure Something;
begin
//Code here...
end;


begin
SetupSRL;
Something;
end.

{.include SRL/SRL.scar} <==What that does is it includes SRL from the folder
Includes.

SRL has lots of things in it,and iam gonna explain the easy stuff from it.

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


Procedure Something;
begin
MMouse(100,100,3,3);//What this does is, it moves the mouse to the coords
//100,100 and makes a 3x3 box and Moves the cursor inside of it.This DOES NOT CLICK.
//You can change the 3,3 to 2,2 or more or less.

Wait(1000+random(200));//Well this just waits 1 second + a random of 200 MS.

Mouse(200,200,2,2,true);//This moves the mouse to the Coords 200,200.
//And makes a 2x2 box, then left click's once at a random spot inside the
//2x2 box.You can make the 2,2 more or less it depends on the thing.
//What true means is that it will left click.False means right click.

Wait(500+random(500));//This waits 500 MS + a random of 500 MS.

TypeSend('I like pie');//This types the text at normal human speed.

If FindColor(x,y,TheColorHere,0,0,200,200)then //This looks for the color
//from the coords 0,0 to 200,200
Mouse(x,y,1,1,false);//This right clicks the color inside of a 1x1 box
ChooseOption(x,y,'ack');//This chooses the option attack but you should
//only have 3 letters of the name.
end;


begin
SetupSRL;
Something;
end.


Now go grab some cookies and some milk if you are hungry and continue to read :P.


Sometimes the script won't find the color on the screen, well maybe it will but it might be a color that you did not want the script to pick.So thats when failsafes are going to save us.

Program Something;
{.include SRL/SRL.scar}
Const
TreeColor = 2783618;//The tree color should be here.Thats just an example.


Procedure FindTree;
begin
repeat
If FindColor(x,y,TreeColor,0,0,400,400)then //Looks for the color...
MMouse(x,y,1,1);//Moves the mouse to the color.
Wait(100+random(100));//Waits....
until (IsUpText('ree'));//repeates everything above until text ree is up.
if (IsUptext('ree'))then //if text ree is up then
Mouse(x,y,1,1,true);//Click the color.
end;


begin
SetupSRL;//Oh ya never forget to put this!
FindTree;
end;

Post anything not right or compliments here!

Sinfulend

2007-07-02 03:57:55

i dont get it… but i do like cookies and milk

code man321

2007-07-04 14:13:55

i dont get either

supersayian2224

2007-07-04 22:18:26

Thanks a bunch dude I kept not knowing what the 100,100 meant, don't know what those people above me are talking about :)

supersayian2224

2007-07-04 22:23:33

IN fact i like it so much that i printed it :P

Ilikepie1995

2007-07-05 10:50:32

dont get it… but i do like cookies and milk
Wtf…Lol what not to get?-I like pie more than cookies and milk but they good too :D .

dont get either
-…Learn some more bout scripting then you will understand everything.



Thanks a bunch dude I kept not knowing what the 100,100 meant, don't know what those people above me are talking about
-:) thanks alot.

IN fact i like it so much that i printed it :P
-Lol :D thanks again for saying its a good guide!

e-man

2007-07-06 03:55:54

i dont get this about scripting whats 1,1 or 2,2 or 3,3 w/e
the box
where is the box? and how big is 1,1?
btw nice tut i know more things now :D

BobboHobbo

2007-07-08 21:33:45

I get it but the noobs dont. Maybe you should simplify is some how i dont know how. Because you simplifyed and explained the lot.

yo_d3d

2007-07-09 21:49:05

Amazing tutorial! Thank you so much, you explained things in just the way that I learn them in. (I don't know if that made any sense). I like that you explained things through the script. Anyways to my question…Actually just as I was typing this, I figured out the answer to my question..Well thanks anyways,
-yo_d3d

Aje

2007-07-11 04:03:23

Hmm i get it, maybe some more

Birfday_Cake

2007-08-27 23:50:56

That actually helped me a lot.

I am going to read every tutorial and post a comment because I am going to FORCE myself to learn scar/srl.

FORCE! =)

richk1693

2007-08-30 18:46:10

Awsome tut. I learned how to use (IsUpText) from you. *Love*

sjlou

2007-09-03 04:25:49

tnx for the TUT it really helped me alot:D

willie.long

2007-09-04 21:37:03

This TUT helped me a ton. I got alot done on my script with your help. Thanks!

NitroStalker

2007-09-08 19:31:27

you confused me a little but i think i got it.

mmmmm…cookies and milk…

Aser

2007-09-28 19:57:57

Good Tut thanks for the fail safe part. And you noobs that don't uderstand it he specificly said that you should read another tut before this one if you don't understand basic concepts.

megamikey59

2007-10-05 22:13:34

Nice, i've seen better…

red1

2007-10-07 17:01:58

Make it so that it fits scripting standards.Also you put a semi-colon on the main loop.They might copy and paste and not know what to do next.I am learning too…so yea…just that.