@@ -388,6 +388,63 @@ begin
388388 Bank.OpenTab(tab);
389389end;
390390
391+ // DepositBox antibans
392+ procedure TAntiban.HoverDepositItem();
393+ var
394+ boxes: TBoxArray;
395+ begin
396+ if not DepositBox.IsOpen() then Exit;
397+ WriteLn GetDebugLn('Antiban', 'Hovering a random deposit box item');
398+ boxes := DepositBox.ISlots.Boxes();
399+ if boxes = [] then Exit;
400+ Mouse.Move(boxes.Random());
401+ Biometrics.Sleep(500, 2000, ERandomDir.LEFT);
402+ end;
403+
404+ procedure TAntiban.HoverDepositQuantity();
405+ var
406+ btn: TRSButton;
407+ begin
408+ if not DepositBox.IsOpen() then Exit;
409+ WriteLn GetDebugLn('Antiban', 'Hovering a random deposit box quantity button');
410+ btn := DepositBox.QuantityButtons[ERSItemQuantity(Random(0, Length(DepositBox.QuantityButtons)-1))];
411+ Mouse.Move(btn.Bounds);
412+ Biometrics.Sleep(500, 2000, ERandomDir.LEFT);
413+ end;
414+
415+ procedure TAntiban.HoverDepositButton();
416+ var
417+ btn: TRSButton;
418+ begin
419+ if not DepositBox.IsOpen() then Exit;
420+ WriteLn GetDebugLn('Antiban', 'Hovering a random deposit box button');
421+ btn := DepositBox.DepositButtons[ERSDepositButtons(Random(0, Length(DepositBox.DepositButtons)-1))];
422+ Mouse.Move(btn.Bounds);
423+ Biometrics.Sleep(500, 2000, ERandomDir.LEFT);
424+ end;
425+
426+ procedure TAntiban.ToggleDepositQuantity();
427+ var
428+ currentIdx, newIdx, totalButtons: Integer;
429+ begin
430+ if not DepositBox.IsOpen() then Exit;
431+ WriteLn GetDebugLn('Antiban', 'Toggling deposit box quantity buttons');
432+
433+ totalButtons := Length(DepositBox.QuantityButtons);
434+
435+ for currentIdx := 0 to totalButtons-1 do
436+ if DepositBox.QuantityButtons[ERSItemQuantity(currentIdx)].Enabled() then
437+ Break;
438+
439+ newIdx := (currentIdx + Random(1, totalButtons-1)) mod totalButtons;
440+
441+ DepositBox.QuantityButtons[ERSItemQuantity(newIdx)].Click();
442+ Biometrics.Sleep(1000, 3000, ERandomDir.LEFT);
443+
444+ if DepositBox.IsOpen() then
445+ DepositBox.QuantityButtons[ERSItemQuantity(currentIdx)].Click();
446+ end;
447+
391448// GrandExchange antibans
392449procedure TAntiban.CheckHistory();
393450begin
@@ -764,6 +821,16 @@ begin
764821 end;
765822end;
766823
824+ procedure TAntiban.RandomDepositTask();
825+ begin
826+ case Random(0, 10) of
827+ 0..3: Self.HoverDepositItem();
828+ 4..6: Self.HoverDepositQuantity();
829+ 7..8: Self.HoverDepositButton();
830+ 9..10: Self.ToggleDepositQuantity();
831+ end;
832+ end;
833+
767834procedure TAntiban.RandomGETask();
768835begin
769836 case Random(0, 10) of
@@ -998,6 +1065,11 @@ const
9981065 ['BankScrolling', @Antiban.BankScrolling],
9991066 ['RandomBankTab', @Antiban.RandomBankTab],
10001067 ['ToggleBankTab', @Antiban.ToggleBankTab],
1068+ ['HoverDepositItem', @Antiban.HoverDepositItem],
1069+ ['HoverDepositQuantity', @Antiban.HoverDepositQuantity],
1070+ ['HoverDepositButton', @Antiban.HoverDepositButton],
1071+ ['ToggleDepositQuantity', @Antiban.ToggleDepositQuantity],
1072+ ['RandomDepositTask', @Antiban.RandomDepositTask],
10011073 ['CheckHistory', @Antiban.CheckHistory],
10021074 ['RandomOffer', @Antiban.RandomOffer],
10031075 ['RandomRightClick', @Antiban.RandomRightClick],
0 commit comments