SCAR Code:
program hbryan1991powerchopper;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/WoodCutting.scar}
const
//Tree Type - Tree, Oak, Willow, Maple, or Yew.
TreeType = 'Willow'; //set this for the type of tree your gonna cut
//Tree Colors - You may have to set these
OakColor = 4881568;
TreeColor = 3440752;
WillowColor = 2582616;
MapleColor = 2582616;
YewColor = 2582616;
//Loads To Do
Loadz = 10;
Procedure DeclarePlayers;
Begin
HowManyPlayers:=1; //Don't Change if you want more players just fill in their info and set their active to: True/False
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Player to start on
Players[0].Name :='Username'; //Fill in your username
Players[0].Pass :='Pass'; //Fill in your password
Players[0].Nick :='Nick'; //2-3 letters of your username
Players[0].Active :=True; //Set true if you want to use this player
Players[0].Boolean1 := True; //Axe Settings: True=Equiped False=InventoryFirstSlot
NickNameBmp:=CreateBitMapMaskFromText(Players[CurrentPlayer].Nick,UpChars);
End;
var
Ix, Iy, LoadzDone, wclvl, logz: Integer;
//////////////////////////////
Const VersionNum = '1.17'; //
//////////////////////////////
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
procedure FindRandoms;
begin
FindFastRandoms;
FindNormalRandoms;
If (FindFight) Then RunAwayDirection('N');
end;
Procedure AntiBanage;
Begin
if(not(LoggedIn))then
Exit;
case Random(5) of
0: Begin
GameTab(2);
HoverSkill('Woodcutting', false);
GameTab(4);
End;
1: PickUpMouse;
2: GameTab(1 + Random(12));
3: MouseBox(MSX1,MMY1,MMX2,MMY2,5);
4: SleepAndMoveMouse(3000+random(2000));
end;
end;
function FindObjMultiText2(var cx, cy: Integer; Ut1, UT2, UT3: string; color,
tolerance: Integer): Boolean;
var
x, y, a, c, i, x1, y1, x2, y2: Integer;
begin
Color := Color;
if (FindColorTolerance(x, y, color, msx1, msy1, msx2, msy2, tolerance)) then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if (not (Loggedin)) then
Break;
a := a + 1;
if (a = 1) or (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end
else if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end
else if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end
else if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
if (FindColorTolerance(x, y, Color, x1, y1, x2, y2, tolerance)) then
begin
MMouse(x, y, 0, 0)
Wait(10);
cx := x;
cy := y;
if (IsUpTextMulti(UT1, UT2, UT3)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
Procedure ProgReport;
Begin
Cleardebug;
wclvl:= Getskilllevel('Woodcutting')
logz := logz;
WriteLn('//////////////////////////////////////////////////')
WriteLn('| hbryan1991 PowerCutter');
WriteLn('| Version: '+VersionNum);
WriteLn('| Logs Cut: '+IntToStr(logz)+'.');
WriteLn('| Loads Dropped: '+IntToStr(LoadzDone)+'.');
Writeln('| Worked for '+ TimeRunning);
WriteLn('//////////////////////////////////////////////////')
SRLRandomsReport;
End;
Procedure drop;
Begin
If(Players[CurrentPlayer].Boolean1 = True)Then
Begin
Dropall;
LoadzDone := LoadzDone+1;
Logz := Logz+28;
End;
If(Players[CurrentPlayer].Boolean1 = False)Then
Begin
DropTo(2,28);
LoadzDone := LoadzDone+1;
Logz := Logz+27;
End;
ProgReport;
End;
//->Ent Checker<-// //credit Fourscape
Var
EX, EY : integer;
FX, FY : integer;
Procedure EntChecker;
Begin
Status('Checking For Ent')
Flag;
If (FindObjMultiText(EX, EY, TreeType, TreeType, TreeType, 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);
Wait(15000+Random(5000));
EntsAvoided := EntsAvoided + 1
end;
end;
end;
Procedure Tree;
Begin
GameTab (4);
Repeat
If FindObjMultiText2(Ix, Iy, 'Tre', 'ree', 'ee', TreeColor, 5) then
Mouse (Ix, Iy, 0, 0, True);
FindRandoms;
AntiBanage;
FindHead;
EntChecker;
wait(2500+random(500));
Until(invcount = 28);
drop;
End;
Procedure OakTree;
Begin
GameTab (4);
Repeat
If FindObjMultiText2(Ix, Iy, 'Oa', 'ak', 'Oak', OakColor, 5) then
Mouse (Ix, Iy, 0, 0, True);
FindRandoms;
AntiBanage;
FindHead;
EntChecker;
wait(2500+random(500));
Until(invcount = 28);
drop;
End;
Procedure WillowTree;
Begin
GameTab (4);
Repeat
If FindObjMultiText2(Ix, Iy, 'Wil', 'ill', 'low', WillowColor, 5) then
Mouse (Ix, Iy, 0, 0, True);
FindRandoms;
AntiBanage;
FindHead;
EntChecker;
wait(2500+random(500));
Until(invcount = 28);
drop;
End;
Procedure MapleTree;
Begin
GameTab (4);
Repeat
If FindObjMultiText2(Ix, Iy, 'Map', 'apl', 'ple', MapleColor, 5) then
Mouse (Ix, Iy, 0, 0, True);
FindRandoms;
AntiBanage;
FindHead;
EntChecker;
wait(2500+random(500));
Until(invcount = 28);
drop;
End;
Procedure YewTree;
Begin
GameTab (4);
Repeat
If FindObjMultiText2(Ix, Iy, 'Ye', 'ew', 'Yew', YewColor, 5) then
Mouse (Ix, Iy, 0, 0, True);
FindRandoms;
AntiBanage;
FindHead;
EntChecker;
wait(2500+random(500));
Until(invcount = 28);
drop;
End;
Begin
SetupSRL;
activateclient;
ClearDebug;
ProgReport;
DeclarePlayers;
LoadzDone := 0;
If(not(LoggedIn)) then
LoginPlayer;
setchat('off',3);
setchat('off',2);
makecompass('N')
highestangle;
FindAxeHeadColor;
Repeat
If(LoadzDone = Loadz)Then
Begin
NextPlayer(True);
End;
If (TreeType = 'Tree') Then
Begin
Tree;
End;
If(TreeType = 'Oak')Then
Begin
OakTree;
End;
If(TreeType = 'Willow')Then
Begin
WillowTree;
End;
If(TreeType = 'Maple')Then
Begin
MapleTree;
End;
If(TreeType = 'Yew')Then
Begin
YewTree;
End;
until(False);
End.