SCAR Code:
//--------------------------------------------------------------------//
//------------- Moon 111's Auto Choper And Droper V0.53 --------------//
//--------------------------------------------------------------------//
//---------------- Requires: SRL 3.81 or better -----------------//
//---------------- and SCAR DIVI 3.11 or better -----------------//
//--------------------------------------------------------------------//
//---------------- Special thanks to the SRL team! -----------------//
//--------------------------------------------------------------------//
//---------------- Instructions: Go to any place -----------------//
//---------------- that has willows (I suggest the -----------------//
//---------------- willows over crafting guild) -----------------//
//---------------- dont weild axe put it in your -----------------//
//---------------- first inv spot. dont take anythin -----------------//
//---------------- but an axe. -----------------//
//--------------------------------------------------------------------//
//---------------- Future Features: MultiUser -----------------//
//--------------------------------------------------------------------//
//---------------- Extra Features: AntiRandoms -----------------//
//--------------------------------------------------------------------//
//---------------- Please post bugs and proggys at: -----------------//
//---- http://www.villavu.com/forum/showthread.php?t=14732 ----//
//--------------------------------------------------------------------//
program New;
{.include SRL/SRL.scar}
{.include srl\srl\skill\WoodCutting.scar}
{.include srl\srl\skill\Fighting.scar}
{.include SRL/SRL/Misc/Playerform.scar}
var
TreeColor1,TreeColor2,TreeColor3,Loads,LoadsToDo,Ents,a,b:integer;
procedure Vars;
begin
//--------------------- Setup ---------------------//
TreeColor1 := 4616056; // Color of tree 1
TreeColor2 := 4682363; // Color of tree 2
TreeColor3 := 4221040; // Color of tree 3
LoadsToDo := 9999999; // Loads to do before ending script. If you want it to run until
// you tell it to stop write a huge number like 999999999999999999
//------------------- End Setup -------------------//
end;
procedure Progress;
var
H,M,S,TimeRunningA:integer;
begin
TimeRunningA := GetTimeRunning;
ConvertTime(TimeRunningA, H, M, S);
Writeln(' ');
Writeln(' ');
Writeln(' ');
Writeln('-=-=-=-=-=-=-=-=- Progress Report -=-=-=-=-=-=-=-=-');
Writeln('Loads: ' + IntToStr(Loads));
Writeln('Time running: ' + IntToStr(H) + ' hours ' + IntToStr(M) + ' mins and ' + IntToStr(S) + ' secs');
Writeln('Ents found: ' + IntToStr(Ents));
Writeln('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-');
end;
function MyFindEnt:boolean;
var
xa,ya:integer;
begin
MMouse(a, b, 2, 2);
if(IsUpText('Chop'))then
begin
if(FindColor(xa, ya, 65535, x + 70, y, x + 100, y + 10)) then
begin
Writeln('Found Ent! Running Away...');
RunAwayDirection('N');
Wait(400 + random(300));
RunBack;
Ents := Ents + 1;
Result := True;
end else
begin
Result := False;
end;
end else
begin
Result := False;
end;
end;
function Randoms:Boolean;
var
c:integer;
Return:boolean;
begin
if(InFight)then
begin
RunAwayDirection('N');
repeat
c := c + 1;
if(InFight)then
begin
RunAwayDirection('N');
c := 1;
Wait(2000 + random(5000));
RunBack;
end;
Wait(300 + random(400));
until(c = 20)
Wait(3000 + random(4000));
RunBack;
Return := True;
end;
if(FindNormalRandoms)then
Return := True;
Wait(400 + Random(300));
if(MyFindEnt)then // I think its the same color as the one I use to find trees to cut.
Return := True;
Wait(400 + Random(300));
if(FindHead)then
Return := True;
Wait(400 + Random(300));
if(FindNewBox)then
SolveBox;
Wait(400 + Random(300));
Wait(400 + Random(300));
if(Return)then
begin
Result := True;
end else
Result := False;
Wait(300 + Random(700));
end;
procedure Drop;
var
c:integer;
begin
if(InvFull)then
begin
c := 1;
repeat
c := c + 1;
DropItem(c);
if(c = 15)then
Randoms;
Wait(150 + Random(200));
until(c = 28)
Loads := Loads + 1;
Progress;
end;
end;
procedure Chop;
var
cx,cy,c,d,Rand:integer;
begin
Rand := Random(3);
if(FindObj(cx, cy, 'Wil', TreeColor1, 10000))then
begin
if(IsUpText('Chop'))then
begin
a := cx;
b := cy;
Mouse(cx, cy, 2, 2, true);
repeat
d := d + 1;
c := c + 1;
if((InvFull) OR (PopUp('ontinue')))then
Exit;
Wait(500 + random(1250));
if(Random(2) = 1)then
Randoms;
Wait(500 + random(1250));
MMouse(cx, cy, 2, 2);
if(not(IsUpText('illow')))then
Exit;
if(d + Rand = 7)then
begin
d := 0;
Mouse(cx, cy, 2, 2, true);
end;
until(c = 15)
end;
end else
begin
if(FindObj(cx, cy, 'Wil', TreeColor2, 10000))then
begin
if(IsUpText('Chop'))then
begin
a := cx;
b := cy;
Mouse(cx, cy, 2, 2, true);
repeat
c := c + 1;
if((InvFull) OR (PopUp('ontinue')))then
Exit;
Wait(500 + random(1250));
Randoms;
Wait(500 + random(1250));
MMouse(cx, cy, 2, 2);
if(not(IsUpText('illow')))then
Exit;
if(d + Rand = 7)then
begin
d := 0;
Mouse(cx, cy, 2, 2, true);
end;
until(c = 15)
end;
end else
begin
if(FindObj(cx, cy, 'Wil', TreeColor3, 10000))then
begin
if(IsUpText('Chop'))then
begin
a := cx;
b := cy;
Mouse(cx, cy, 2, 2, true);
repeat
c := c + 1;
if((InvFull) OR (PopUp('ontinue')))then
Exit;
Wait(500 + random(1250));
Randoms;
Wait(500 + random(1250));
MMouse(cx, cy, 2, 2);
if(not(IsUpText('illow')))then
Exit;
if(d + Rand = 7)then
begin
d := 0;
Mouse(cx, cy, 2, 2, true);
end;
until(c = 15)
end;
end;
end;
end;
end;
procedure Logged;
begin
if(not(LoggedIn))then
begin
LoginPlayer;
Writeln('Logging in...');
end;
end;
procedure SetupScript;
begin
SetUpSRL;
SetupPlayers;
ActivateClient;
Vars;
Logged;
end;
begin
SetupScript;
repeat
Chop;
Drop;
Randoms;
until(Loads = LoadsToDo)
end.