SRL Archive - First Scripts

Craig's WoodCutter


Craig-

2007-11-13 13:00:43

Hey this is my 1st finished (well i say finished but i need anti randoms and all that) script. Somethings might not work but please reply and with your herp this could become 1 hell of a gd script =)

{ ... WoodCutter By Craig- ... My First Script ... }

program WoodCutter;
{.include SRL/SRL.scar}

const
LoadsPerPlayer =10; // Ammounts of loads before player switches.
TreeColor =4287628; // Fill in the tree color here.
WaitPerTree =5000; // Wait till clicking next tree (1000 = 1 sec)

Var
globalogs: integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 4;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := 'Username'; // Your Username...
Players[0].Pass := 'Password'; // Your Password...
Players[0].Nick := 'erna'; // 3 or 4 letters of your username eg. user.
Players[0].Active:= True;

Players[1].Name := 'Username'; // Your Username...
Players[1].Pass := 'Password'; // Your Password...
Players[1].Nick := 'Nick'; // 3 or 4 letters of your username eg. user.
Players[1].Active:= True;

Players[2].Name := 'Username'; // Your Username...
Players[2].Pass := 'Password'; // Your Password...
Players[2].Nick := 'Nick'; // 3 or 4 letters of your username eg. user.
Players[2].Active:= True;

Players[3].Name := 'Username'; // Your Username...
Players[3].Pass := 'Password'; // Your Password...
Players[3].Nick := 'Nick'; // 3 or 4 letters of your username eg. user.
Players[3].Active:= True;

end;

procedure ChopTree;
var
x, y, MyMark : integer;
begin
if not Loggedin then Exit;
MarkTime(MyMark);
repeat
if FindObj(x, y, 'hop', TreeColor, 30) then
begin
Mouse(x, y, 0, 0, False);
Writeln('Chopping Tree');
if ChooseOption('hop') then
begin
Wait(WaitPerTree);
Exit;
end;
end;
if TimeFromMark(MyMark) > (2 * 60 * 1000) then
begin
Logout;
Exit;
end;
until false
end;

begin
SetupSRL;
DeclarePlayers;
if Loggedin then Logout;
LoginPlayer;
repeat
ChopTree;
if InvFull then
begin
DropToPosition(2,28); // If Axe equiped change to (1,28),if not leave.
Inc(Players[CurrentPlayer].Banked);
if Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0 then
begin
NextPlayer(True);
end;
end;
if not Loggedin then NextPlayer(False);
until false
end.

Writeln( '***************************' );
Writeln('');
Writeln( 'Username : '+ Players[CurrentPlayer].Name);
Writeln( 'Worked For : '+ IntToStr (Players[CurrentPlayer].Worked)+' minutes.');
Writeln( 'Wc Lvl : '+ IntToStr(Players[CurrentPlayer].Integer1));
Writeln( 'Logs Cut : '+ inttostr(globallogs) + ' logs');
Writeln( '');
Writeln( '***************************' );

bondman

2007-11-14 10:38:59

Yep looks nice =D it does need anti randoms and broken axe getter =P but good for a first I cant even do this yet lol.

Craig-

2007-11-14 14:11:43

Thanks =).
Can someone direct me to where i can learn anti randoms/antiban and where to add them to script. (You can pm me!).
I will keep updating script when it gets better =).

~ Craig-

HyperSecret

2007-11-14 14:18:09

go to tutorial island. and search antirandoms…or look in the antirandoms.scar…F