SCAR Code:
{ _____ _ _ _ _ _ _ _ _ _ _
/ ___| | (_) | | | | | | | (_) | |
\ `--.| | ___| | | __| | | | | |_| | | _____ __
`--. \ |/ / | | |/ _` | | |/\| | | | |/ _ \ \ /\ / /
/\__/ / <| | | | (_| | \ /\ / | | | (_) \ V V /
\____/|_|\_\_|_|_|\__,_| \/ \/|_|_|_|\___/ \_/\_/
_____ _ _ ______ _
/ __ \ | | | | | ___ \ | |
| / \/_ _| |_ __ _ _ __ __| | | |_/ / __ _ _ __ | | __
| | | | | | __| / _` | '_ \ / _` | | ___ \/ _` | '_ \| |/ /
| \__/\ |_| | |_ | (_| | | | | (_| | | |_/ / (_| | | | | <
\____/\__,_|\__| \__,_|_| |_|\__,_| \____/ \__,_|_| |_|_|\_\
Thank You Rasta Magician, You helped me ALOT.
You Must have axe in inventory, NOT wielded}
program WillowCutter;
{.include SRL/SRL.scar}
const
Loads = 3;//amount of loads to do before switching players
Version = '2';
YourSRLId = '2670';
YourSRLPassword = 'blink182';
var
C1, C2 : integer;
x,y : integer;
Bankers, Log, Willow : integer;
time : integer;
{Fill This Part Out}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
{Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;}
end;
Procedure Bitmaps;
begin
Log := DTMFromString('78DA6314616060106340013E2E32609A11CA6' +
'7540412520C688011550D480B2F0135FC40828F801A7620214C40' +
'0D3311EE0199234F847B9408A891246C0E00D8F60238');
Bankers := DTMFromString('78DA639461606010654001FFFFFF07D38C503' +
'EA31090904455F3E70F13A61A41026A8481841C7E3500E04109A4' +
'');
Willow := BitmapFromString(35, 33, 'beNrtlk9LAzEQxZtvICoiIh' +
'Y99aBeFnGRUlqkokjBCgX/IYqiKELBkx/ftzwdpjubkCzuQdjwDqX' +
'Lzi8vOy9Jp9OOdvzP4RbVFGK3t5TtLefZ6iBfO+6vN8ByUn8y3jwd' +
'bUC1QC4s1JyebQGhlQ4q6mCqEOaMmcvkMW0UBMIqHeSebvOX+6OP5' +
'8Fs0qVsWXkkTwna6a7Egz7fR9TNxbZlaYQWQXAdbWoBpFki/q8loK' +
'SlE9D8dahZtr4ITvH5UuxUgwLiqtIOGiYutj+tKyC9gL76jA/7E5q' +
'e758Me0GWY+igAEUaQxAUX2SaVHItzt3NDrBQEj1SdIczVrasxEq+' +
'o56JYRXZAQiV3x77fJEUmbNF2Ia3q2pBX/MxLQgImX24OixtMtaC7' +
'fkwSNpMQOQC50uoL1lhEGoShB+040tTTHgDIBjRIN14AVB6eItmEB' +
'DsxDiq7Hz2Nvd8T5oKFnxBcH19mVXuD4FPD9U61p0vtno/N8XrnNT' +
'akZiSo+dPryKutHS/9Ru553Dd4KLJ21TpltIONb4BEilgcA==');
end;
//Made by Sumillion
function FindEnt(fx, fy: Integer; AvoidWhenFound: Boolean): Boolean;
var
arUpTextEntColorPoints: TPointArray;
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.4, 0.4);
FindColorsTolerance(arUpTextEntColorPoints, 51657, 80, 6, 127, 20, 5);
Result := Length(arUpTextEntColorPoints) > 10;
ColorToleranceSpeed(tcts);
end;
if(Result)then
begin
WriteLn('Ent Found!!');
if(AvoidWhenFound)then
begin
Writeln('Waiting for it to go away.');
MouseFindNoFlag(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;
//I got this procedure from Derek-
Procedure AngleWalk(WAngle: string; Dist: Integer; WFlag: Boolean);
var
Angle : Extended;
TheAngle, x, y : Integer;
begin
Case LowerCase(WAngle) of
'n' : TheAngle := 0;
'w' : TheAngle := 90;
's' : TheAngle := 180;
'e' : TheAngle := 270;
else
begin
try
TheAngle := StrToInt(GetNumbers(WAngle));
except
WriteLn('AngleWalk Failed: Invalid string/integer entered.');
Exit;
end;
end;
end;
TheAngle := 270 - TheAngle;
if (Dist > 72) then Dist := 72;
Angle := rs_GetCompassAngleDegrees;
x := MMCX + Round(Dist * Cos((Angle + TheAngle) * (pi/180)));
y := MMCY + Round(Dist * Sin((Angle + TheAngle) * (pi/180)));
Mouse(x, y, 0, 0, True);
if WFlag then
begin
Wait(RandomRange((Dist * 24), (Dist * 26)));
FFlag(0);
end;
end;
procedure ToSpot;
begin
MakeCompass('N');
SetRun(True);
RadialWalk(FindRockColor,175,171,49,5,5);
If not RadialWalk(FindRockColor,175,171,49,5,5) then
begin
AngleWalk('170', 40, True);
end;
end;
procedure MyAntiBannage;
begin
case Random(40) of
0: RandomRClick;
1: BoredHuman;
2: RandomMovement;
3: AlmostLogout;
4: PickUpMouse;
5: HoverSkill('Woodcutting', False);
end;
end;
procedure Bank;
begin
MakeCompass('N');
SetRun(False);
GameTab(4);
If FindSymbol(x,y,'bank')Then
begin
Mouse(x,y,3,3,true);
Flag;
end else
if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Flag;
end else
RadialWalk(5987171,34,39,39,5,5);
begin
MarkTime(time);
repeat;
if (not(Loggedin)) then break;
OpenBankQuiet('db');
until(BankScreen or (TimeFromMark(time) > 120000));
end;
If FindDTM(Log, x, y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x,y,3,3,False);
ChooseOption('all');
Deposit(2,28,2);
C2 := C2 + 28 - InvCount;
ReportVars[0]:= ReportVars[0] + 28 - InvCount;
C1 := C1 + 1;
ReportVars[1]:= ReportVars[1] + 1;
CloseBank;
Disguise('Cut '+IntToStr(C2)+' Willows');
end;
procedure ChopTree;
begin
repeat
If Not Loggedin Then Break;
FindEnt(x,y,True);
if (FindObjCustom(X, Y, ['ill','low','illo','llo'], [3896169,3238238,3902333,1387816], 3)) then
begin
Mouse(x,y,3,3,True);
FFlag (0);
FindNormalRandoms;
MyAntiBannage;
Wait(5000);
end;
Until(invfull);
end;
procedure Reports;
begin
ClearDebug;
writeln('------Skilld Us Willow Chopper and Banker------');
writeln('Cut '+IntToStr(C2)+' Willows');
writeln('Banked '+IntToStr(C1)+' Times');
writeln('Worked For '+TimeRunning);
writeln('-----------------------------------------------');
SRLRandomsReport;
end;
begin
SetupSRL;
ScriptID := '636';
SRLID := YourSRLID;
SRLPassword := YourSRLPassword;
ActivateClient;
Bitmaps;
DeclarePlayers;
repeat
if LoggedIn then Logout;
LoginPlayer;
repeat
ToSpot;
ChopTree;
MyAntiBannage;
if InvFull then
begin
Bank;
Reports;
end;
if not Loggedin then NextPlayer(False);
until C1 = Loads;
NextPlayer(True);
until False;
end.