-
RadialWalking Chopper!
RadialChopper
Code:
program WoodCutter;
{.include srl/srl.scar}
{.include srl/srl/skill/woodcutting.scar}
const TreeColor = 4353677;
const RoadCcoloring = 0;
procedure DeclarePlayers;
begin
HowManyPlayers :=2;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active:=True;
end;
procedure FindWcRandoms;
begin
FindNormalRandoms;
FindHead;
FindEnt(TreeColor);
WriteLn('Finding WoodCutting Randoms');
if not loggedin then RandomNextPlayer(False);
end;
procedure FindTree;
var x,y,prevcount,a:integer;
begin
prevcount:=invcount;
WriteLn('Searching for tree');
if FindObj(X,y,'hop',TreeColor,10) then
begin
Mouse(x,y,10,5,true);
WriteLn('Finding Tree');
a:=0;
end else
begin
WriteLn('Theres no tree... Stop script and set the tree color const again!');
TerminateScript;
end;
repeat
wait(1800 + Random(300));
a:=a+1;
if a=4 then
begin
WriteLn('Breaking out of Loop!!');
break;
end;
until(invcount>prevcount);
end;
procedure BankIt;
var x,y:integer;
begin
if FindSymbol(X,y,'water') then
begin
WriteLn('Finding Water symbol');
Mouse(x,y,5,5,true);
CountFlag(2);
RadialRoadWalk(RoadCcoloring,70,125,72,1,1);
WriteLn('Radial Walking to Bank');
CountFlag(2);
if FindSymbol(X,y,'bank') then
begin
WriteLn('Finding Bank Symbol');
Mouse(X,y,1,1,true);
CountFlag(1);
Face('s');
WriteLn('Facing south');
OpenBank;
WriteLn('Opening Bank');
DepositAll;
CloseBank;
RadialRoadWalk(RoadCcoloring,305,370,50,1,1);
WriteLn('Radial Walking back');
CountFlag(0);
RadialRoadWalk(RoadCcoloring,200,305,50,1,1);
CountFlag(0);
end;
if FindSymbol(X,y,'water') then
begin
WriteLn('finding water symbol');
Mouse(X,y,5,5,true);
Face('n');
WriteLn('facing north');
end;
end;
end;
begin
Setupsrl;
declareplayers;
Face('n');
KeyDown(VK_DOWN);
Wait(50+random(100));
KeyUp(VK_DOWN);
repeat
FindTree;
FindWcRandoms;
if InvFull then BankIt;
until(false);
end.
EDIT:O! Use this at the 3 trees north west from the dummy building in varrock east.
-
Which location is this for? o-0. Code looks good.
-
There's a couple of problems, but the main one is your begin and ends for doing more than 1 task in a condition..
Code:
if (1 = 1) then Writeln('Yeh..');
I only want it to do 1 thing if 1 is 1, so there's no begin. But if i wanted it to do 2 or more things i'd do this:
Code:
if (1 = 1) then
begin
Writeln('task 1');
Writeln('task 2');
end;
;) I put standards in and fixed anything else i found in there, i hope you don't mind.
Code:
program WoodCutter;
{.include srl/srl.scar}
{.include srl/srl/skill/woodcutting.scar}
const TreeColor = 4353677;
const RoadCcoloring = 0;
procedure DeclarePlayers;
begin
HowManyPlayers :=2;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active:=True;
end;
procedure FindWcRandoms;
begin
FindNormalRandoms;
FindHead;
FindEnt(TreeColor);
WriteLn('Finding WoodCutting Randoms');
if not loggedin then RandomNextPlayer(False);
end;
procedure FindTree;
var x,y,prevcount,a:integer;
begin
prevcount:=invcount;
WriteLn('Searching for tree');
if FindObj(X,y,'hop',TreeColor,10) then
begin
Mouse(x,y,10,5,true);
WriteLn('Finding Tree');
a:=0;
end else
begin
WriteLn('Theres no tree... Stop script and set the tree color const again!');
TerminateScript;
end;
repeat
wait(1800 + Random(300));
a:=a+1;
if a=4 then
begin
WriteLn('Breaking out of Loop!!');
break;
end;
until(invcount>prevcount);
end;
procedure BankIt;
var x,y:integer;
begin
if FindSymbol(X,y,'water') then
begin
WriteLn('Finding Water symbol');
Mouse(x,y,5,5,true);
CountFlag(2);
RadialRoadWalk(RoadCcoloring,70,125,72,1,1);
WriteLn('Radial Walking to Bank');
CountFlag(2);
if FindSymbol(X,y,'bank') then
begin
WriteLn('Finding Bank Symbol');
Mouse(X,y,1,1,true);
CountFlag(1);
Face('s');
WriteLn('Facing south');
OpenBank;
WriteLn('Opening Bank');
DepositAll;
CloseBank;
RadialRoadWalk(RoadCcoloring,305,370,50,1,1);
WriteLn('Radial Walking back');
CountFlag(0);
RadialRoadWalk(RoadCcoloring,200,305,50,1,1);
CountFlag(0);
end;
if FindSymbol(X,y,'water') then
begin
WriteLn('finding water symbol');
Mouse(X,y,5,5,true);
Face('n');
WriteLn('facing north');
end;
end;
end;
begin
Setupsrl;
declareplayers;
Face('n');
KeyDown(VK_DOWN);
Wait(50+random(100));
KeyUp(VK_DOWN);
repeat
FindTree;
FindWcRandoms;
if InvFull then BankIt;
until(false);
end.
-
@Kane Thanks Kane! i was wondering about that when i wrote it :S.
@whiteshadow Its for the 3 trees northwest of the varrock dummy camp.
-
you mean behind the palace?
-
No!
there are three normal trees straight northeast of the dummy building, which is north of the East bank of Varrock.
You know the fountain where you fill your buckets/jugs/bowls in varrock east? the three normal trees north of there!
-
I'm guessing that either there isn't yet a way to have a script enter a bank pin (which I think I've seen somewhere) or that this script isn't set up to?
-
no this script just isnt set up to
-
No that function does exists, it just wasn't used a lot so it got moved to the x section, i think its in something like xBank.scar.