You know, every time I see a new post from someone who is trying to learn, I always laugh. A lot of beginners read old tutorials from tutorial island that teach VERY old basics. Like WhoCares357's tutorial. Anyway, I'll say a few of my opinions, regardless if they have been posted before:
1. Standards. I'm REALLY nitpicky about certain things and this is it. This is how you would clean that up.
program Jams1stScript;
{.include SRL/SRL.scar}
var
x,y: Integer;
const
Ore = 9868962; //Color Of Ore You Want To Mine
procedure FindAndClickOre;
begin
repeat
if(Findcolor(x,y,Ore,0,0,700,700))then //might want to limit your coordential search
begin
wait(750+random(250));
MoveMouseSpline(x,y,x+1,y+1);//should use spline. Use Mouse(x,y,1,1) or w/e
wait(15+random(5));
ClickMouseSpline(x,y,1,1,true); //same advice as above
end;
until(InvFull);
end;
procedure Drop;
begin
DropAll;
end;
begin
SetupSRL;
repeat
FindAndClickOre;
Drop
until(false)
end.
2. Don't use MoveMouseSpline. It's BEYOND old….its…its….ancient and gay. Use Mouse(x,y,1,1) —-The (1,1) part depicts the pixels of wavering when the mouse moves.
MoveMouseSpline(x,y,x+1,y+1);// NOOOOOOO
MMouse(x,y,1,1);// YESSSSSSSSSSSS
3. This is a very basic script but you've gathered all the basic ideals. That's good. YOu NEED to have failsafes in case what you wanted to happen didn't work.
For Example:
if not Mouse(x,y,1,1)then
Logout;
Very basic Failsafe but it's used quite a bit.
4. You really don't need A WHOLE PROCEDURE for one action…
procedure Drop;
begin
DropAll; // DONT DO THIS
end;
Just add
DropAll;
Whenever you need it.
5. Make sure you add a failsafe in the main loop
begin
SetupSRL;
repeat
FindAndClickOre;
Drop //btw forgot to put a semi colon?
until(false) // not good.
end.
Instead of this
until(false)
Do this
until(not loggedin); //or something along those lines
6. You might wanna add more different colors to your const to give an accurate reading of the rocks to mine.
const
Ore = 9868962; //Color Of Ore You Want To Mine
Since that's just ONE color that could be easily distorted.
const
Ore = 9868962;
Ore2= //blah
Ore3= //blah
just makes finding rocks more accurate
Anyway those were my opinions. Good luck. If you need any more help. PM me and i'll give you my instant messenger so I can work more closely with you. :f: