SCAR Code:
program WoodCutter;
{.include SRL\SRL.Scar}
{.include SRL\SRL\Extended\xAntiBan.scar}
{.include SRL\SRL\Extended\xAntiRandoms.scar}
{.include SRL\SRL\Skill\Woodcutting.SCAR}
var
o, p: integer;
Clicks: Integer;
Loads: Integer;
BrokenAxeDTM, RegularAxeDTM : Integer;
TheTreeName : String;
TreeColor : Integer;
const
TreeColors = 2904136;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '******';
Players[0].Pass := '******';
Players[0].Nick := '******'; //3 - 4 letters of YOUR username, example: sern
Players[0].Active := True;
end;
Procedure GetAxeColors; // taken from fours script
Begin
Wait(100)
MakeCompass('S');
GameTab(4)
FindAxeHeadColor;
MakeCompass('N')
end;
Var
EX, EY : integer; // taken from fours script
FX, FY : integer;
Procedure EntChecker;
Begin
Status('Checking For Ent') // taken from fours script
Flag;
If (FindObjMultiText(EX, EY, TheTreeName, TheTreeName, TheTreeName, Treecolor, 4)) then
Begin
MMouse(Ex, EY, 0, 0)
If FindColorTolerance( FX, FY, 55769, 85, 15, 115, 15, 20) then
Begin
Status('Ent Found');
MouseFindFlag(648,83,5,5); // taken from fours script
Wait(15000+Random(5000));
EntsAvoided := EntsAvoided + 1
end;
end;
end;
Var
BX, BY, NX, NY : integer;
Procedure IsAxeBroken; // taken from fours script
Begin
Status('Checking for broken axe')
GameTab(4)
Wait(400 + Random (100))
If (Not(FindDTM(BrokenAxeDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 ))) then
Begin
Status('Axe Not Broken') // taken from fours script
Exit;
end;
Begin
If (FindDTM(BrokenAxeDTM, BX, BY, MIX1, MIY1, MIX2, MIY2 )) and
(Not(FindDTM(RegularAxeDTM, NX, NY, MIX1, MIY1, MIX2, MIY2))) then
Begin
Status('Broke an Axe, and you have no more.')
NextPlayer(False)
end; // taken from fours script
end;
end;
Procedure TheFindAxe;
Begin // taken from fours script
Status ('Looking For Axe')
FindHead;
end; // taken from fours script
procedure AntiBanning;
begin
RotateEvery(20 + Random(10));
LeaveScreenEvery(5 + Random(5));
HoverEvery(15 + Random(5), 'random');
PickUpMouseEvery(5 + Random(10));
RandomRClickEvery(15 + Random(5));
if (KillScriptTime > 0) then
KillScript(KillScriptTime);
end;
procedure AntiRandom;
begin
FindTalk;
FindNormalRandoms;
if (FindFight = true) then
begin
RunAwayDirection('N');
Wait(10000 + random(2000));
RunBack;
end;
end;
procedure ProgressReport;
begin
ClearDebug;
Writeln('-=-Ummmmm0k Power Chopper Progress Report-=-');
Writeln('You have completed ' + IntToStr(Loads) + ' Loads' + ' ');
Writeln('Worked For : ' + ScriptTime2(2))
Writeln('-=-Ummmmm0k Power Chopper Progress Report-=-');
end;
procedure FindTree;
begin
repeat;
wait(1000 + random(500));
if FindColorSpiralTolerance(p, o, TreeColors, 3, 3, 514, 338, 10) then
begin
IsAxeBroken;
MMouse(p, o, 3, 3); // more random, coord.
Wait(50 + random(25));
if (IsUpText('hop')) then // Check up text.
begin
wait(200 + random(100));
AntiRandom;
Mouse(p, o, 1, 1, true);
Clicks := Clicks + 1;
wait(4000 + random(500));
EntChecker;
TheFindAxe;
end;
end;
Wait(3000 + random(500)); // So it won't endlessly click.
AntiRandom;
until (InvFull);
end;
procedure DropLogs;
begin
wait(100 + random(50));
wait(2000 + random(1000));
AntiRandom;
dropto(2, 28);
Loads := Loads + 1;
wait(100 + random(50));
AntiRandom;
end;
begin
SetupSRL;
DeclarePlayers;
if not Loggedin then LoginPlayer;
LoginPlayer;
HighestAngle;
MakeCompass('N')
repeat
if (not (LoggedIn)) then
Exit;
GetAxeColors;
AntiRandom;
AntiBanning;
FindTree;
DropLogs;
AntiRandom;
AntiBanning;
ProgressReport;
until (false)
end.