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.
{.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.
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.
Post anything not right or compliments here!
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!