Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program SilentFlax;
- // Includes...
- {$i srl/srl/misc/smart.scar}
- {$loadlib sps}
- {$i srl/srl.scar}
- {$i sps/sps.simba}
- {$i SRL/SRL/Misc/stats.simba}
- const
- SRLStats_User = 'SilentStat'; // Your SRL Stats ID (If you dont have one then just leave it as it is)
- SRLStats_Password = 'report'; // Your SRL Stats Password (If you dont have one then just leave it as it is)
- Var
- X, Y, T, W, Flax, Breaks, Loads: Integer;
- procedure DeclarePlayers;
- begin
- HowManyPlayers := 1; // This is set to the total amount of players, for now, just keep it set as 1
- NumberOfPlayers(HowManyPlayers); // Don't touch
- CurrentPlayer := 0; // This is the player to start with; the first player will always be 0
- Players[0].Name := ''; // Username
- Players[0].Pass := ''; // Password
- Players[0].Active := True; // Set to true if you want to use Player 0
- Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
- Players[0].Integers[1] := 200;//# of loads to do.
- Players[0].Integers[2] := 720; // Time before breaking ( In minutes)
- end;
- procedure SetupLogin;
- begin
- ClearDebug;
- // Setting up SMART;
- Smart_Server := 9;
- Smart_Members := True;
- Smart_Signed := True;
- Smart_SuperDetail := False;
- SetupSRL;
- SetupSRLStats(295, SRLStats_User, SRLStats_Password);
- DeclarePlayers;
- LoginPlayer; // Logging in...
- end;
- procedure BreakTime;
- var
- s, i: Integer;
- begin
- if (s = 0) then
- s := Players[0].Integers[2] * 60000; //+ RandomRange(300000, 600000);
- if T = 1 then
- begin
- W:= GetTimeRunning;
- if (W > s) then
- begin
- Logout;
- i:= RandomRange(10, 15);
- Writeln('Taking a break for ' + IntToStr(i) + ' minutes');
- i:= i * 60000;
- Wait(i);
- T := 0;
- s:= W + s;
- Inc(Breaks);
- LoginPlayer;
- end;
- end else
- if T = 0 then
- begin
- T := T + 1;
- end;
- end;
- procedure SetupSps;
- begin
- SPS_Setup(RUNESCAPE_SURFACE, ['6_6','6_7']);
- SPS_Continue := false;
- end;
- procedure StartFancy;
- var
- i: Integer;
- e: String;
- begin
- e := '=';
- while i < 68 do
- begin
- Writeln(e);
- if (InRange(i, 1, 19)) then
- begin
- Writeln(' /// ');
- Writeln(' / / ');
- Writeln(' / / ');
- Writeln(' \ \ ');
- Writeln(' \ \ ');
- Writeln(' \\\ ');
- end;
- if (InRange(i, 20, 29)) then
- begin
- Writeln(' /// |--------| ');
- Writeln(' / / | |------| ');
- Writeln(' / / | | ');
- Writeln(' \ \ | |---| ');
- Writeln(' \ \ | | ');
- Writeln(' \\\ |_| ');
- end;
- if (InRange(i, 30, 39)) then
- begin
- Writeln(' /// |--------| |-| ');
- Writeln(' / / | |------| | | ');
- Writeln(' / / | | | | ');
- Writeln(' \ \ | |---| | | ');
- Writeln(' \ \ | | | |______ ');
- Writeln(' \\\ |_| |________| ');
- end;
- if (InRange(i, 40, 49)) then
- begin
- Writeln(' /// |--------| |-| /--\ ');
- Writeln(' / / | |------| | | / /\ \ ');
- Writeln(' / / | | | | / / \ \ ');
- Writeln(' \ \ | |---| | | / /----\ \ ');
- Writeln(' \ \ | | | |______ / /------\ \ ');
- Writeln(' \\\ |_| |________| /_/ \_\');
- end;
- if (InRange(i, 50, 59)) then
- begin
- Writeln(' /// |--------| |-| /--\ \~\ /~/');
- Writeln(' / / | |------| | | / /\ \ \ \ / / ');
- Writeln(' / / | | | | / / \ \ \ \/ / ');
- Writeln(' \ \ | |---| | | / /----\ \ / /\ \ ');
- Writeln(' \ \ | | | |______ / /------\ \ / / \ \ ');
- Writeln(' \\\ |_| |________| /_/ \_\ /_/ \_\');
- end;
- if (InRange(i, 60, 69)) then
- begin
- Writeln(' /// |--------| |-| /--\ \~\ /~/ \\\ ');
- Writeln(' / / | |------| | | / /\ \ \ \ / / \ \ ');
- Writeln(' / / | | | | / / \ \ \ \/ / \ \');
- Writeln(' \ \ | |---| | | / /----\ \ / /\ \ / /');
- Writeln(' \ \ | | | |______ / /------\ \ / / \ \ / / ');
- Writeln(' \\\ |_| |________| /_/ \_\ /_/ \_\ /// ');
- end;
- Writeln(e);
- e := e + '=';
- Wait(50);
- Inc(i);
- ClearDebug;
- end;
- Writeln('====================================================================');
- Writeln(' /// |--------| |-| /--\ \~\ /~/ \\\ ');
- Writeln(' / / | |------| | | / /\ \ \ \ / / \ \');
- Writeln(' / / | | | | / / \ \ \ \/ / \ \');
- Writeln(' \ \ | |---| | | / /----\ \ / /\ \ / /');
- Writeln(' \ \ | | | |______ / /------\ \ / / \ \ / /');
- Writeln(' \\\ |_| |________| /_/ \_\ /_/ \_\ ///');
- Writeln('=================Brought to you by Silent SPY=======================');
- Wait(5000);
- end;
- procedure Antiban; //idea taken from Coh3n's tutorial.
- begin
- if not (LoggedIn) then
- Exit;
- begin
- case Random(100) of // Random(100) generates a random integer from 0 to 59
- 10: RandomRClick;
- 30: PickUpMouse;
- 50: RandomMovement;
- 70: BoredHuman;
- 89: ExamineInv;
- end;
- end;
- end;
- procedure RestUp;
- begin
- if not (LoggedIn) then
- Exit;
- begin
- SetRest;
- while not RunEnergy(95) do
- begin
- Antiban;
- Wait(Random(1000));
- end;
- end;
- end;
- function Banking: Boolean;
- var
- p, t: Integer;
- begin
- if not (LoggedIn) then
- Exit;
- if (InvCount < 1) then
- Exit;
- while (IsMoving) do
- begin
- Wait(RandomRange(900, 1200));
- end;
- t := 0; //Tries starts at zero
- repeat
- Inc(t);
- Writeln('Trying to open the bank, this is the ' + IntToStr(t) + ' try out of 5');
- MakeCompass('n');
- Wait(RandomRange(700, 1000));
- OpenBankNPC;
- until BankScreen or PinScreen or (t = 5);
- if PinScreen then
- begin
- p := 0;
- repeat
- InPin(Players[0].Pin);
- Inc(p)
- until BankScreen or (p > 0) or not (LoggedIn);
- end;
- if BankScreen then
- begin
- Writeln('Opened the bank...');
- DepositAll;
- Wait(RandomRange(500, 1500));
- CloseBank;
- end;
- if (t = 5) then
- begin
- Writeln('failed to find bank.');
- Writeln('Terminating...');
- TerminateScript;
- end;
- end;
- function Walking(Color, Tolerance: Integer; SortFrom: tpoint): Boolean;// credit to Camaro' for the tutorial and function!
- var
- i, x, y, rx, ry: Integer;
- TPA: TPointArray;
- begin
- if not LoggedIn then Exit;
- FindNormalRandoms;
- FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
- SortTPAFrom(TPA, SortFrom);
- for i := 0 to High(TPA) do
- begin
- x := TPA[i].x;
- y := TPA[i].y;
- rx := RandomRange(-6, 6);
- ry := RandomRange(-6, 6);
- if (not rs_OnMinimap(x + rx, y + ry)) then
- Continue;
- Mouse(x + rx, y + ry, 0, 0, true);
- FFlag(0);
- Wait(200 + Random(500));
- Result := True;
- Break;
- end;
- end;
- procedure WalkToFlax;
- var
- BankToFlax: TPointArray;
- begin
- if not (LoggedIn) then
- Exit;
- if not FindNormalRandoms then
- begin
- if not RunEnergy(25) then
- RestUp;
- MakeCompass('n');
- Writeln('Walking to Flax...');
- Wait(Random(1000));
- BankToFlax := [Point(2745, 2713), Point(2751, 2751),
- Point(2761, 2811), Point(2771, 2853),
- Point(2801, 2863)];
- if SPS_WalkPath(BankToFlax) then
- Writeln('At the Field..');
- Wait(RandomRange(1200, 1500));
- end;
- end;
- procedure GetFlax;
- var
- i: Integer;
- begin
- if not (LoggedIn) then
- Exit;
- if not (FindNormalRandoms) then
- begin
- SetAngle(true);
- while (InvCount < 28) do
- begin
- while (IsMoving) do
- X:= MSCX;
- Y:= MSCY+30;
- Wait(RandomRange(1000, 1500));
- if(FindColorSpiralTolerance(X, Y, 14407266, MSX1, MSY1, MSX2, MSY2, 41)) then
- begin
- Mouse(X, Y, 10, 10, true);
- Wait(RandomRange(500, 1000));
- AntiBan;
- end else
- Break;
- end;
- end;
- end;
- procedure Progress;
- begin
- if not (LoggedIn) then
- Exit;
- if (InvCount = 28) then
- begin
- Flax:= Flax + 28;
- ClearDebug;
- Writeln('|=======================================|');
- Writeln('| Flax | Loads | Time Running |# of Breaks|');
- Writeln('|' + IntToStr(Flax) + ' |' + IntToStr(Loads) + ' |' + TimeRunning + '|' + IntToStr(Breaks) + '|');
- Writeln('|=======================================|');
- Writeln('');
- stats_IncVariable('Flax (Picked))', 28);
- stats_IncVariable('Loads Done', 1);
- SRLRandomsReport;
- Stats_Commit;
- end;
- end;
- procedure WalkToBank;
- var
- FlaxToBank: TPointArray;
- begin
- if not (LoggedIn) then
- Exit;
- if not FindNormalRandoms then
- begin
- if not RunEnergy(25) then
- RestUp;
- MakeCompass('n');
- Writeln('Walking to Bank...');
- Wait(Random(1000));
- FlaxToBank := [Point(2802, 2873), Point(2764, 2851),
- Point(2745, 2800), Point(2745, 2755),
- Point(2743, 2722), Point(2740, 2679)];
- if SPS_WalkPath(FlaxToBank) then
- Writeln('At the Bank..');
- Wait(RandomRange(1200, 1500));
- end;
- end;
- procedure MainLoop;
- begin
- SetupLogin;
- SetupSps;
- T := 0;
- for Loads := 0 to Players[0].Integers[1] do
- begin
- if not (LoggedIn) then
- Break;
- BreakTime;
- Banking;
- WalkToFlax;
- GetFlax;
- WalkToBank;
- Progress;
- end;
- end;
- begin
- StartFancy;
- MainLoop;
- end.
Add Comment
Please, Sign In to add comment