Code:
program new;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[0].Pin :=''
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
case Random(8) of
0:
begin
HoverSkill('woodcutting', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
end;
end;
end;
Procedure ChopTree;
var x, y: integer;
begin
repeat
if FindObj(x,y,'hop',1384479, 05) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');
end;
repeat
Wait(400+random(250));
AntiBan;
Until not IsUpText('ew') or (InvFull);
until(invFull);
end;
Procedure Walk;
Var
myPath:TPointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['11_7']);
myPath :=[Point(4497, 3032), Point(4500, 3029), Point(4503, 3026), Point(4509, 3008), Point(4509, 3008), Point(4509, 3003), Point(4509, 2998), Point(4510, 2992), Point(4512, 2981), Point(4516, 2970), Point(4516, 2964), Point(4522, 2949), Point(4522, 2949), Point(4525, 2948), Point(4528, 2945), Point(4531, 2943), Point(4535, 2942), Point(4542, 2939), Point(4548, 2939), Point(4553, 2938), Point(4560, 2935), Point(4564, 2933), Point(4571, 2929), Point(4576, 2923), Point(4581, 2915), Point(4582, 2911), Point(4588, 2908), Point(4593, 2908)];//Path
SPS_WalkPath(myPath);
end;
function OpenBankNPC: Boolean;
var
NPCBox :TBox;
Colors, NPCArray :TPointArray;
ATPA: T2DPointArray;
MSNPC, NPCPoint :TPoint;
CTS, C, II, I :Integer;
begin
Result := False;
Result := (BankScreen) or (PinScreen);
If Result then
Exit;
NPCArray := GetMinimapDots('NPC');
If Length(NPCArray) < 1 then
Exit;
SortTPAFrom(NPCArray, Point(MMCX, MMCY));
for I := 0 to High(NPCArray) do
begin
NPCPoint := MMToMS(NPCArray[I])
If (NPCPoint.x = -1) and (NPCPoint.y = -1) then
Continue;
with NPCPoint do
NPCBox := IntToBox(Max(X - 40, MSX1), Max(Y - 40, MSY1), Min(X + 40, MSX2), Min(Y + 40, MSY2));
If PixelShift(NPCBox, 200) > 500 then
Continue;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.13, 1.52);
FindColorsTolerance(Colors, 6067652, NPCBox.X1, NPCBox.Y1, NPCBox.X2, NPCBox.Y2, 13);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(Colors, 15, 20);
SortATPASize(ATPA, True);
for II := 0 to High(ATPA) do
begin
MSNPC := MiddleTPA(ATPA[II]);
MMouse(MSNPC.X, MSNPC.Y, 3, 3);
If WaitUpTextMulti(['ooth', 'anker'], 200) then
begin
ClickMouse2(False);
If WaitOptionMulti(['Bank B', 'nk B'], 600) then
MarkTime(c);
Repeat
Wait(RandomRange(50, 100));
Until (BankScreen) or (PinScreen) or (TimeFromMark(C) > 4500);
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
If Result then
Exit;
end;
end;
end;
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
ChopTree;
Walk;
OpenBankNPC;
end.
I wrote line 69 in red.