SCAR Code:
program LumbridgeYewCutter;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/woodcutting.scar}
{.include SRL\SRL\Extended\xBank.scar}
const
YewColr = 4161648;
BankMM = 4047587;
TreeMM = 99083;
RGBoxes = False;
var
MiniBank,MiniTree,TreeXP,LogTT,BTD: integer;
Chat,Name,ChatName: String;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer:= 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Loc := 'Draynor';
Players[0].Active := True;
end;
//Randoms//
function FQRandoms :Boolean;
var
RL: Integer;
begin
for RL:=1 to 17 do
begin
case RL of
1: CloseWindow;
2: if FindTalk then
Result := True;
3: if FindDead then
Result := True;
4: if FindMod then
Result := True;
5: if FindMime then
Result := True;
6: if FindMaze then
Result := True;
7: if FindQuiz then
Result := True;
8: if FindDemon then
Result := True;
9: if FindScapeRune then
Result := True;
10: if FindTalk then
Result := True;
11: if FindLamp(LampSkill) then
Result := True;
12: if (FindNewBox) then
begin
Result := True;
if(RGBoxes = True)then
begin
if(not(GambleNewBox))then
LogOut;
end else
SolveBox;
end;
13: if FindTrade then
Result := True;
14: begin
if NoGameTab then
begin
if ( SolveFrog ) then Exit;
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
15: if SolvePinball then
Result := True;
16: AntiBan;
17: if(FindFight)then
begin
RunAwayDirection('S');
RunBack;
end;
end;
wait(15);
end;
end;
//FindAxeHeadColor//
function FindHeadCol: Boolean;
begin
GameTab(4);
wait(100 + random(200));
if ( ExistsItem ( 1 )) then
MMouse(590, 220, 2, 2)
wait(200 + random(100));
if(IsUptext('xe'))then
begin
Head := GetColor(590, 220);
Head2 := GetColor(587, 219);
Head3 := GetColor(588, 218);
Result:= true;
EquipAxe := False;
end;
If(Result = False)then
begin
GameTab(5);
wait(200 + random(200));
MMouse(592, 297, 2, 2);
wait(200 + random(100));
if(IsUptext('Remove'))then
begin
Head := GetColor(597, 294);
Head2 := GetColor(600, 295);
Head3 := GetColor(599, 298);
Result:= true;
EquipAxe := True;
end;
end;
If(Result = true) then
begin
writeln('Axe head colors: ' +inttostr(Head)+ ' '+inttostr(Head2)+ ' ' +inttostr(Head3));
end else
begin
DisguiseSCAR('ERROR! Axe not found.');
writeln('');
writeln('Restart script and try again.');
writeln('');
end;
end;
//Walking//
Procedure ToTheYewzz;
var
FSB :integer;
Begin
FSB:=0;
if(not(LoggedIn))then
begin
Writeln('Not logged in.. Terminating.');
TerminateScript;
end;
MakeCompass('N');
begin
Mouse(x,y-10+random(3),802,327,true);
Wait(5000);
end;
begin
Mouse(x,y-10+random(3),819,312,true);
Wait(5000);
end;
begin
Mouse(x,y-10+random(3),832,292,true);
Wait(5000);
end;
begin
Mouse(x,y-10+random(3),833,270,true);
Wait(5000);
end;
begin
if(FindColorSpiralTolerance(x,y,TreeMM,1,1,800,287,40))then
Mouse(x,y-10+random(3),800,287,true);
end;
begin
DisguiseSCAR('At yews.');
end;
end;
//Banking//
function BankWalker : boolean;
begin
Mouse(x,y-10+random(3),708,300,true);
Wait(5000)
end;
begin
Mouse(x,y-10+random(3),708,284,true)
if (FlagPresent) then
repeat
wait(100+random(200));
until (not(FlagPresent))
end.
begin
Mouse(x,y-10+random(3),729,240,true);
if (FlagPresent) then
repeat
wait(100+random(200));
until (not(FlagPresent))
end
if(FindColorSpiralTolerance(x,y,BankMM,1,1,727,240,50))then
begin
Mouse(x,y-10+random(3),727,240,true);
if (FlagPresent) then
repeat
wait(100+random(200));
until (not(FlagPresent))
end;
DisguiseSCAR('Walked to bank.');
end;
//BankOpening//
procedure CrappyBankOpen;
var //Same one i used in my flaxer.
Tries :integer;
BankTol :integer;
begin
if not (BankScreen) then
repeat
if(FindObj(x,y,'ank',607067,10))then
Mouse(x,y,4,4,false)
else if(FindObj(x,y,'ank',608095,10))then
Mouse(x,y,4,4,false)
Wait(250);
if(ClickOption('uickly', 1))then
begin
Tries := Tries+1;
Flag;
end;
until(BankScreen) or (Tries=10);
if(BankScreen)then
begin
if(existsitem(2))then
begin
Deposit2(2+random(10),0);
Wait(345+random(235));
end;
end;
end;
//EntFinding//
Function PyroEnt:boolean;
begin
if(not(findcolorspiraltolerance(x,y,YewColr,msx1,msy1,msx2,msy2,5)))then exit;
if(isuptext('hop'))or(isuptext('Yew'))or(isuptext('Down'))then
begin
if(FindColorTolerance(x,y,515029,1,1,180,45,20))or
(FindColorSpiralTolerance(x,y,65535,1,1,200,40,20)) then
begin
Result:=True
Writeln('Ent found');
end;
end else
begin
FindObj(x,y,'Yew',YewColr,5)
PyroEnt;
end;
end;
//CuttingYew//
Function ChopYewsDown(var Mx, My : integer; tol : integer) : boolean;
var
YSX,YSY :integer;
A,Ctol :integer;
Chopping :boolean;
begin
if(FindObj(x,y,'ew',YewColr,Tol))then
begin
wait(100+random(100))
if(PyroEnt)then
begin
wait(4000+random(2000))
ChopYewsDown(x,y,1);
end else mouse(x,y,0,0,true)
Mx:= x;
My:= y;
Result:= true;
end;
if not Result then
repeat
wait(500+random(500))
CTol:=CTol + 1;
if(FindObj(x,y,'Yew',YewColr,CTol))then
begin
wait(100+random(100))
if(PyroEnt)then
begin
wait(4000+random(2000))
ChopYewsDown(x,y,1);
end else mouse(x,y,0,0,true)
Mx:= x;
My:= y;
result:= true;
end;
until Result or (CTol = tol * 5)
case Random(10) of
1 : FQRandoms;
end;
case Random(15) of
1 : AutoRespond;
end;
if(Result)Then Begin
Chopping:= true;
Repeat
If(InvFull)then Exit;
Wait(500+random(250))
Mmouse(Random(MSX2), Random(MSY2), 10, 10);
Until(Not(flag));
wait(1000)
MarkTime(Mark);
Repeat
If(InvFull)then Exit;
If(Not (Loggedin) or (WeAreDead)) Then break;
FindNormalRandoms;
WWait(1000+Random(1000));
FindNormalRandoms;
FQRandoms;
Findtalk;
A:= A + 1;
if(A mod 4 = 0)and (PyroEnt) then
begin
Mouse(647,82,2,2,true);
wait(800 + random(400));
Mouse(647,82,2,2,true);
wait(3000 + random(2000));
end;
If (Not (Loggedin) or (TimeFromMark(Mark) > 30000)) Then break;
Until(A = 10)or(Not(FindColorSpiralTolerance(x,y,YewColr,msx1,msy1,msx2,msy2,3)))
End;
If(Not(A = 10)) and (Chopping) Then
Begin
MakeCompass('S')
HighestAngle;
FindNormalRandoms;
If(FindColorSpiralTolerance(YSX,YSY,MiniTree,580,110,720,162,3))or
(FindColorSpiralTolerance(YSX,YSY,MiniTree,580,5,725,65,3))then
Mouse(YSX-5,YSY+5,0,0,true)
Flag;
End;
End;
//Misc.//
procedure AniMotion;
begin
ClearDebug;Writeln('');Writeln('#');Writeln('#');Writeln('#');Writeln(''); wait(100);Writeln(' # ');Writeln('# ');Writeln('# ');Writeln('# ');Writeln(' # ');wait(100);ClearDebug;Writeln(' ## ');Writeln('# ');Writeln('# ');Writeln('# ');Writeln(' ## ');wait(100)ClearDebug;Writeln(' ### ');Writeln('# ');Writeln('# # ');Writeln('# ');Writeln(' ### ');wait(100)ClearDebug;Writeln(' #### ');Writeln('# ');Writeln('# ## ');Writeln('# ');Writeln(' #### ');wait(100)ClearDebug;Writeln(' ##### ');Writeln('# ');Writeln('# ### ');;Writeln('# # ');Writeln(' #### ');wait(100)ClearDebug;Writeln(' ##### ');Writeln('# ');Writeln('# ### ');Writeln('# # ');Writeln(' #### ');wait(500);ClearDebug;Writeln(' ##### ');Writeln('# # ');Writeln('# ### # ');Writeln('# # # ');Writeln(' #### ');wait(100);ClearDebug;Writeln(' ##### # ');Writeln('# # ');Writeln('# ### # ');Writeln('# # # ');Writeln(' #### # ');wait(100)ClearDebug;Writeln(' ##### ## ');Writeln('# # ');Writeln('# ### # ');Writeln('# # # ');Writeln(' #### ## ');wait(100)ClearDebug;Writeln(' ##### ### ');Writeln('# # ');Writeln('# ### # ');Writeln('# # # ');Writeln(' #### ### ');wait(100)ClearDebug;Writeln(' ##### ### ');Writeln('# # # ');Writeln('# ### # # ');Writeln('# # # # ');Writeln(' #### ### ');wait(300);ClearDebug;Writeln(' ##### ### # ');Writeln('# # # # ');Writeln('# ### # # # ');Writeln('# # # # # ');Writeln(' #### ### # ');wait(100)ClearDebug;Writeln(' ##### ### ## ');Writeln('# # # # ');Writeln('# ### # # ## ');Writeln('# # # # # ');Writeln(' #### ### # ');Wait(100)ClearDebug;Writeln(' ##### ### ### ');Writeln('# # # # ');Writeln('# ### # # ### ');Writeln('# # # # # ');Writeln(' #### ### # ');wait(100);ClearDebug;Writeln(' ##### ### #### ');Writeln('# # # # ');Writeln('# ### # # #### ');Writeln('# # # # # ');Writeln(' #### ### # ');Writeln('');wait(1200);ClearDebug;Writeln('#### ### #### #### #### # # ##### #### ');Writeln('# # # # # # # ## # # # ');Writeln('#### ### ### ### ### # # # # ### ');Writeln('# # # # # # # ## # # ');Writeln('# # # #### #### #### # # # #### ');Writeln('');wait(1200);ClearDebug;Writeln('#### ### #### # # ');Writeln('# # # # # # ');Writeln('### # # # ### # ');Writeln('# # # # # # ');Writeln('#### ## #### # ');Writeln('');wait(1200);ClearDebug;Writeln('# # #### # # ### # ## #### ##### #### ### ');Writeln(' # # # # # # # # # # # # # # # # ');Writeln(' # ### # # # # ### # #### ### # ### ### ');Writeln(' # # ## ## # # # # # # # # # # ');Writeln(' # #### # # ### ##### # # #### # #### # # ');wait(1300)
end; {^^Dont mess with that... I wanted to make it smaller :P Used to be too.. Huge.}
procedure LogsToEXP;
var
XPFT :integer;
begin
XPFT:=175;
TreeXP:=LogTT*XPFT;
end;
Procedure ProggyRprt;
begin
ClearDebug;
Writeln(' .MACROMACRO123s YEWOWNER PROGRESSREPORT.');
Wait(100);
Writeln(' ..MACROMACRO123s YEWOWNER PROGRESSREPORT..');
Wait(100);
Writeln(' ..:MACROMACRO123s YEWOWNER PROGRESSREPORT:..');
Wait(100);
Writeln(' ..::MACROMACRO123s YEWOWNER PROGRESSREPORT::..');
Wait(100);
Writeln('..:::MACROMACRO123s YEWOWNER PROGRESSREPORT:::...');
Wait(300+random(200));
ClearDebug;
Writeln('*********************************************');
Writeln('Logs cut:'+IntToStr(LogTT));;
Writeln('Times banked:'+IntToStr(BTD));;
LogsToEXP;
Writeln('Gained about'+IntToStr(TreeXP)+'Exp.');
Writeln('Script has been running:'+(TimeRunning));
Writeln('*********************************************');
end;
//Loop//
Begin
wait(10);
AniMotion;
Wait(100+random(200));
ClearDebug;
SetupSRL;
DeclarePlayers;
ActivateClient;
Wait(500);
LoginPlayer;
HighestAngle;
if(not(FindHeadCol))then
begin
Logout;
DisguiseSCAR('Axe NOT Found!');
Terminatescript;
end;
repeat
SetRun(true);
ToTheYewzz;
Flag;
MakeCompass('S');
repeat
ChopYewsDown(x,y,1);
FindHead;
Until(InvFull);
PerfectNorth;
BankWalker;
CrappyBankOpen;
ProggyRprt;
Until(false)
end;
End.