PDA

View Full Version : Easy And Usefull Stuff Tutorial!!!



Ilikepie1995
06-30-2007, 07:35 PM
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
07-02-2007, 07:57 AM
i dont get it... but i do like cookies and milk

code man321
07-04-2007, 06:13 PM
i dont get either

supersayian2224
07-05-2007, 02:18 AM
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
07-05-2007, 02:23 AM
IN fact i like it so much that i printed it :P

Ilikepie1995
07-05-2007, 02:50 PM
dont get it... but i do like cookies and milkWtf...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
07-06-2007, 07:55 AM
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
07-09-2007, 01:33 AM
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
07-10-2007, 01:49 AM
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
07-11-2007, 08:03 AM
Hmm i get it, maybe some more

Birfday_Cake
08-28-2007, 03:50 AM
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
08-30-2007, 10:46 PM
Awsome tut. I learned how to use (IsUpText) from you. *Love*

sjlou
09-03-2007, 08:25 AM
tnx for the TUT it really helped me alot:D

willie.long
09-05-2007, 01:37 AM
This TUT helped me a ton. I got alot done on my script with your help. Thanks!

NitroStalker
09-08-2007, 11:31 PM
you confused me a little but i think i got it.

mmmmm...cookies and milk...

Aser
09-28-2007, 11:57 PM
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
10-06-2007, 02:13 AM
Nice, i've seen better...

red1
10-07-2007, 09:01 PM
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.