PDA

View Full Version : RadialWalking Chopper!



The Prince of Randomness?
06-28-2006, 04:15 AM
RadialChopper


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.

WhiteShadow
06-28-2006, 04:18 AM
Which location is this for? o-0. Code looks good.

XxKanexX
06-28-2006, 04:30 AM
There's a couple of problems, but the main one is your begin and ends for doing more than 1 task in a condition..



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:


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.



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.

The Prince of Randomness?
06-28-2006, 06:26 AM
@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.

dunno
06-28-2006, 07:02 AM
you mean behind the palace?

The Prince of Randomness?
06-28-2006, 08:01 PM
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!

Mallegonian
07-02-2006, 04:12 AM
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?

Mjordan
08-27-2006, 02:12 PM
no this script just isnt set up to

Sumilion
08-27-2006, 05:01 PM
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.