SCAR Code:
program Yew_Cutt0r;
{.include SRL/SRL.scar}
Var
X, y, Banked : Integer;
Const Ver = '0.1'; //Dont Touch!!!
procedure DeclarePlayers;
begin
Disguise('SRL - Forms- Index...');
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'aum';
Players[0].Active := True;
Players[0].Integers[0] := 10; //Loads To Do?
Players[0].PIN := '0000'; //Leave at 0000 if no pin else enter it :)
{Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;
Players[1].Integers[0] := 5; //Loads To Do? }
WriteLn('Using ' +IntToStr(HowManyPlayers) + ' Players');
end;
Procedure WalkToTree;
Label RV;
Begin
If FindSymbol(x, y, 'Tree') Then GoTo RV
Else
RadialWalk(FindDirtRoadColor, 230, 160, 65, 10, 20);
Begin
RV : WriteLn('Used Symbol Walking!');
If FindSymbol(x, y, 'Tree') Then
Mouse(x + 8, y + 4, 0, 0, True);
FFlag(4);
end;
end;
Function FindYew : Boolean;
Var
I, Cts : Integer;
TPA : Array Of TPoint;
ATPA : T2DPointArray;
Begin
Cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2386011, MSX1, MSY1, MSX2, MSY2, 10);
ATPA := (TPAtoATPAEx(TPA, 4, 5));
For I := 0 to High(ATPA) Do
If MiddleTPAEx(ATPA[I], x, y) Then
Begin
MMouse(x, y, 0, 0);
GetMousePos(x, y);
If IsUpTextMultiCustom(['hop', 'ew', 'own']) Then
Begin
Result := True;
Wait(80+ Random(80));
end;
If Result = True Then
Exit
else
Try
Wait(1);
except
Wait(2);
Finally
Wait(3) //:p
end;
end;
ColorToleranceSpeed(Cts);
end;
{*******************************************************************************
function FindEnt(fx, fy: Integer; AvoidWhenFound: Boolean): Boolean;
By: Sumilion
Description: Will look for an Ent and avoid if found.
*******************************************************************************}
function FindEnt(fx, fy: Integer; AvoidWhenFound: Boolean): Boolean;
var
x, y, EntTime, tcts: Integer;
begin
if not(LoggedIn)then
Exit;
GetMousePos(x, y);
if(x <> fx)or(y <> fy)then
MMouse(fx, fy, 0, 0);
if(IsUpText('Chop'))then
begin
tcts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.75);
Result := (CountColorTolerance(118478, 9, 10, 124, 23, 10) > 10);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(tcts);
end;
if(Result)then
begin
WriteLn('Ent Found!!');
if(AvoidWhenFound)then
begin
Writeln('Waiting for it to go away.');
MFNF(MMCX, MMCY, -1, 1);
MarkTime(EntTime);
while(TimeFromMark(EntTime) < 35000)do
if(Random(20) > 15)then
IdleTime(500, 500, 0.4)
else
Wait(500 + Random(500));
EntsAvoided := EntsAvoided + 1;
end;
end;
end;
Procedure IfFight;
Begin
If (FindFight) Then
RunAway('E', False, 1, 1000 + Random(500));
end;
Procedure WaitWhileChop;
Var mrk : Integer;
Begin
MarkTime(mrk);
Repeat
FindNormalRandoms;
FindEnt(x, y, True);
IfFight;
Case Random(4) Of
0 : GameTab(1 + Random(12));
1, 2 : FtWait(5);
end;
Wait(900 + Random(100));
GameTab(4);
SleepAndMoveMouse(4000 + Random(3000));
IfFight;
FindEnt(x, y, True);
IfFight;
FindNormalRandoms;
Until(Not IsUpText('ew')) Or (TimeFromMark(mrk) > 13000 + Random(3000));
FindEnt(x, y, True);
end;
Procedure SwitchTrees;
Begin
Case FindSymbol(x, y, 'Water source') Of
True : If FindSymbolIn(x, y, 'Tree', 547, 89, 683, 155) Then
MouseFlag(x + 7, y - 3, 3, 3, 0);
False : If FindSymbolIn(x, y, 'Tree', 570, 6, 700, 76) Then
MouseFlag(x + 7, y + 3, 3, 3, 0);
end;
end;
Procedure ChopTree;
Begin
Repeat
If Not FindYew Then
Wait(2000 + Random(3000));
FindNormalRandoms;
If Not FindYew Then
SwitchTrees
Else
Begin
Case Random(3) Of
0, 1 : Mouse(x, y, 2, 2, True);
2 : Begin
Mouse(x, y, 2, 2, False);
Wait(Random(80) + 100);
ChooseOptionMulti(['hop', 'ew', 'own']);
end;
end;
Begin
WaitWhileChop;
Wait(1);
FindNormalRandoms;
end;
end;
Until(InvFull);
IncEx(Players[CurrentPlayer].integers[3], 27);
Inc(Players[CurrentPlayer].integers[2]);
end;
Procedure Bank;
Begin
SetRun(True);
If FindBitmapToleranceIn(BitmapFromString(5, 7, 'beNrjFo7ipgsCAFtREGk='),
x, y, MMX1, MMY1, MMX2, MMY2,30) Then
Begin
Wait(12000 + Random(2000));
MouseFlag(x, y + 8, 4, 7, 6)
end else
If Not FindColor(x, y, FindVarrockRoadColor, MMX1, MMY1, MMX2, MMY2) Then
MouseFlag(MMCX, MMCY - 60, 20, 5, 0)
Else
Begin
Mouse(x, y, 9, 9, True);
FFlag(5);
end;
If FindSymbol(x, y, 'Bank') Then
MouseFlag(x, y, 1, 1, 0);
If OpenBankFast('eb') Then
If BankScreen Xor PinScreen Then
Begin
If InPin(Players[CurrentPlayer].PIN) Then
Begin
Deposit(2 + Random(24), 28, True);
Wait(700 + Random(800));
CloseBank;
end;
end;
Inc(Banked);
WriteLn('Banked!');
end;
Procedure Proggie;
Var I : Integer;
Begin
WriteLn('');
WriteLn('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ');
WriteLn('[ NaumanAkhlaQ Presents ]');
WriteLn('[ Yew Cutt0r!! ]');
WriteLn('| |');
WriteLn('| [> Worked '+ TimeRunning +'! | ');
WriteLn('| [> Chopped '+ IntToStr(Players[CurrentPlayer].integers[3])+' Logs |');
WriteLn('| [> Banked '+ IntToStr(Banked) +' Loads|');
WriteLn('| ---------------------- |');
WriteLn('| [> Current Version Is V'+ Ver+' Pub!|');
WriteLn('= Thank You For Using ;) |');
WriteLn('=================================== ');
For I := 0 to (HowManyPlayers - 1) do
Begin
WriteLn('[~ '+ Players[I].Name +' /\ Chopped '+IntToStr(Players[I].integers[3])+ ' Logs. /\ Banked ' +IntToStr(Players[I].integers[2])+' Loads!');
WriteLn(' <--------- |-----$$-----| --------->');
End;
Begin
WriteLn(' ++++++++++++++++++++');
SRLRandomsReport;
If (Not (LoggedIn)) Then
Begin
WriteLn('--> Lost Player : '+Capitalize(Players[CurrentPlayer].Name));
LogOut;
NextPlayer(False);
end else
WriteLn('> Using ' +IntToStr(HowManyPlayers)+ ' Players');
Try
If Banked >= Players[CurrentPlayer].Integers[0] Then
WriteLn('Loads Done and Dusted!');
Finally
FindNormalRandoms;
Except
end;
end;
end;
begin
SetupSRL;
DeclarePlayers;
ActivateClient;
Wait(999);
Repeat
If Not LoggedIn Then LoginPlayer;
Repeat
SetRun(True);
WalkToTree;
ChopTree;
Bank;
Proggie;
Until(Banked >= Players[CurrentPlayer].Integers[0]) xOr (Not LoggedIn)
LogOut;
If Banked >= Players[CurrentPlayer].Integers[0] Then
NextPlayer(True)
Else
NextPlayer(False);
Until(AllPlayersInactive);
TerminateScript;
end.