SCAR Code:
const
willow1= 3754306; //Light side of willow
willow2= 530448; //Darker side not the black part
willow3= 1585201; //The trunk of the willow
HowManyLoads = 50; //Amount of loads before switching
var
AxeMask, logz: integer;
procedure LookForRandoms; forward;
procedure AntiBan; forward;
procedure GetAxeHead; forward;
procedure ScaredToFight; forward;
Procedure DeclarePlayers;
begin
HowManyPlayers :=1; // set to how many players your going to use
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
//For Every new one add 1 to 0 so players[0] would be a 1 instead of 0
//So on and so forth
Players[0].Name :='';//Your RSUsername
Players[0].Pass :='';//RS Password
Players[0].Nick :='itez';//3-4 letters of your name but not the first letter
Players[0].Active:=True;//in use or not
end;
Procedure OpenDtm;
Begin
logz := DTMFromString('78DA8DD24B0A80300C04D064A758ACBAF0874' +
'5A905F5FE17341111047192C594C25B64687924A29E5E73ECD975' +
'F27DE720B1D0E73C264ACCC06C12133049A2056695A80DFB94C06' +
'82F074C27E181690C4677A9807186EEB9C460300198C2F0A6DE60' +
'B47B0246FF57FC3727AFC003D1');
AxeMask := DTMFromString('78DA635465606058CA800618914820AD09245' +
'613500332671D01350A4062150135D244B84703482C23A0461248' +
'ACC5AF06001A0805A5');
end;
function CheckForEnt: Boolean; //Fr0ze & Nauman
var
i,x,y, Counter : Integer;
begin
if Not(LoggedIn) then Exit;
Counter := 0;
While Counter < 8 do
begin
i := GetColor(86 + Counter, 17);
Counter := Counter + 1;
if SimilarColors(i,119764,60) then
begin
Result := true;
Writeln('We found an ent!! Trying to avoid now..');
If FindSymbol(x,y,'Fishing Spot') then //
Begin //
MFF(MMX1,MMY2,0,0) // Modded by NaumanAkhlaq
Flag; //
FTWait(61 + Random(5));
begin
Writeln('Whew! We avoided the ent.. Carrying on with chopping');
Exit;
end;
end;
Result := false;
end;
end;
end;
Procedure ChopTree;
var x,y: integer;
begin
MakeCompass('S');
if not Loggedin then Exit;
repeat
LookForRandoms;
AntiBan;
if FindObjCustom(x, y, ['illow'], [willow1, willow2, willow3], 7) then
begin
Mouse(x,y,0,0,false);
repeat
CheckForEnt;
wait(100 + (random(200)));
ChooseOption('hop');
LookForRandoms;
GetAxeHead;
AntiBan;
until(InvFull)
end;
until (InvFull)
end;
function Banking: Boolean;
var
x,y : integer;
begin
if (InvFull) then
begin
MakeCompass('N')
Wait (300 + random(160));
OpenBankQuiet('db');
if(FindDTM(logz, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
MMouse(x, y, 5, 5);
if Isuptext('og') then
begin
ChooseOption('All');
end;
CloseBank;
Wait(150 + random (278));
MakeCompass('S');
FreeDTM(logz);
end;
end;
end;
Procedure WalkToBank;
var
x,y : integer;
PlanFailed:boolean;
AtBank:boolean;
begin
if (InvFull) then
begin
if FindSymbol(x,y,'bank') then
begin
GetAxeHead;
Mouse(x,y,1,1,true);
PlanFailed:=False;
AtBank:=True;
LookForRandoms;
AntiBan;
exit;
end;
begin
If (Not(FindSymbol(x,y,'bank'))) then
begin
Writeln('Symbol Not Found');
RadialWalk(FindRoadColor,0,60,65,1,1);
end;
end;
end;
end;
Procedure ScaredToFight;
begin
FindNormalRandoms;
if FindFight then
RunAway('N', True, 1, 15000+random(5000));
Writeln('Someone Has Beef... Running..');
end;
Procedure LookForRandoms;
begin
FindNormalRandoms;
wait(Random(400) + 200);
FindLamp('Woodcutting');
Findtalk;
ScaredToFight;
end;
procedure MoveDaCompass; forward;
Procedure AntiBan;
begin
if not LoggedIn then exit;
case Random(30) of
1: RandomRClick;
2: RandomMovement;
3: HoverSkill('Woodcutting', False);
4: AlmostLogout;
5: BoredHuman;
6: DoEmote(400 +Random(90));
7: GameTab(1 +Random(12));
8: MoveDaCompass;
end;
end;
Procedure MoveDaCompass;
begin
if not LoggedIn then exit;
case Random(20) of
1: MakeCompass('N');
2: MakeCompass('S');
3: MakeCompass('E');
4: MakeCompass('W');
end;
end;
procedure GetAxeHead; //Credits to Nauman
var
x, y: integer;
Axe : string;
begin
if (findDTM(AxeMask, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin;
writeln('Found An Axe!!')
Axe := 'Present'
end;
if (not (findDTM(AxeMask, x, y, MIX1, MIY1, MIX2, MIY2))) then
begin
Axe := 'Absent';
writeln('Axe Absent')
end;
end;
begin
SetupSRL;
DeclarePlayers;
OpenDtm;
ChopTree;
if Loggedin then Logout;
LoginPlayer;
repeat
ChopTree;
if InvFull then
begin
WalkToBank;
Inc(Players[CurrentPlayer].Banked);
if Players[CurrentPlayer].Banked = HowManyLoads then
begin
NextPlayer(True);
end;
end;
if not Loggedin then NextPlayer(False);
until false
end.