SRL Archive - RS3 Outdated / Broken Scripts

My First Wc'er.


Runningun01

2007-05-20 13:41:28

Hi. This Is My First Woodcutting Script. And I'd Be More Then Happy To Listen To Any Feedback.

[x]Basic AntiRandoms
[x]Progress Report
[x]Failsafes.


Program PowerChopper;
{.include SRL/SRL.scar}

Var
Clicks,Loads: Integer;

Const
Tree = 4025476; {Setup This Constant With The Color Of Your Tree}

procedure AntiRandoms;
Begin
FindTalk;
FindNormalRandoms;
if(FindFight=True) then
Begin
RunAwayDirection('E');
Wait(10000+random(3000));
RunBack;
End;

procedure Cut;
Begin
SetupSRL;
Repeat
if(FindColor(xx,yy,Tree,3,3,532,-140)) then
MMouse(x,y,0,0);
Wait(200+random(100));
Mouse(x,y,0,0,True);
Wait(200+random(100));
AntiRandoms;
Clicks:=Clicks+1;
Until(InvFull);
End;

Procedure Drop;
Begin
DropAll;
Loads:=Loads+1
End;

procedure ProgressReport;
begin
ClearDebug;
Writeln('Progress Report');
Writeln('Did' + IntToStr(Loads) +' Loads');
Writeln('And Did' + IntToStr(Clicks) +' Clicks');
end;


Begin
SetupSRL;
Repeat
if(not(LoggedIn)) then
Exit;
End Else
RepeatClicking;
Drop;
ProgressReport;
until(false);
end.

inSane

2007-05-20 13:48:38

Its pretty simple, but everyone has to start from somewhere! Theres no randomness on those Wait Times! But looks good for first script. keep it going!

JAD

2007-05-20 13:49:36

You should have checked if the script compiled before posting :p

here are the errors, then I'll post the script fixed:

1: In your anti randoms procedure, you needed an extra "end;". You had 2 begins and 1 "end;".

2: Your variables xx and yy need to be declared like var xx,yy: Integer; like I did in the fixed script.

3: In your main loop, you can't have an end else for your first begin of the procedure, because its not doing something else if a condition doesn't happen. I just took out the end else thing and it works good now, and does the exact same thing in the main loop as you wanted it too I think. If its not logged in it exits (Good fail safe ;)), then it does the clicking.

4: You have in the main loop repeat clicking? Thats not a procedure or a function in your script. I think that you wanted it to do the Cut procedure so I put that in there.

Its an ok script for your first one, but I have a feeling you copied a lot of things from other peoples scripts, pasted it into your own without knowing what they did at all.

Heres the fixed script though:


Program PowerChopper;
{.include SRL/SRL.scar}

Var
Clicks,Loads,xx,yy: Integer;

Const
Tree = 4025476; {Setup This Constant With The Color Of Your Tree}

procedure AntiRandoms;
Begin
FindTalk;
FindNormalRandoms;
if(FindFight=True) then
Begin
RunAwayDirection('E');
Wait(10000+random(3000));
RunBack;
End;
End;

procedure Cut;
Begin
SetupSRL;
Repeat
if(FindColor(xx,yy,Tree,3,3,532,-140)) then
MMouse(x,y,0,0);
Wait(200+random(100));
Mouse(x,y,0,0,True);
Wait(200+random(100));
AntiRandoms;
Clicks:=Clicks+1;
Until(InvFull);
End;

Procedure Drop;
Begin
DropAll;
Loads:=Loads+1
End;

procedure ProgressReport;
begin
ClearDebug;
Writeln('Progress Report');
Writeln('Did' + IntToStr(Loads) +' Loads');
Writeln('And Did' + IntToStr(Clicks) +' Clicks');
end;


Begin
SetupSRL;
Repeat
if(not(LoggedIn)) then
Exit;
Cut;
Drop;
ProgressReport;
until(false);
end.

suggestions to improve the script a LOT.

1: Add tolerance to your color finding using FindColorTolerance instead of FindColor.

2: Add random parameters to your mouse movements using Mouse(x,y,2,2,true)…etc.

3: I'd have it Move the mouse to the tree using random parameters like

MMouse(x,y,2,2)
if(IsUpText('Chop'))then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,true)
end;

do that after looking for the color.

Also, this script will not work because your looking for the color, and saving the position to xx,yy , but your Clicking the mouse at x,y. You gotta change either of those to match.

Good try, keep it up and keep reading tutorials!

Camaro'

2007-05-20 14:38:39

it says identifier expected in script at line 21

Lalaji

2007-05-24 16:09:55

Would the

SetupSRL;


be really necessary in the cut procedure? I am not sure myself.

The devil

2007-05-29 03:57:52

Good work.

Really good work………

Hugolord

2007-05-29 04:03:12

From: The devil
Good work.


Yer your right i think it should come first in the main loop…right?