SRL Archive - RS3 Help

Looking for a bit of help from scripters!


Incurable

2015-09-27 07:22:40

From: theholyone
here is what I would do,


procedure depositBones();
///var
///bankTimer: TTimeMarker;
begin
if (not isLoggedIn()) then
exit;
if bankScreen.isOpen() then
begin
///bankTimer.start();
///repeat
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(gaussrangeint(200,500));
///until (bankscreen.getPackCount() <= 0);
///I'm PRETTY sure there is a check within bankScreen.quickDeposit that checks
///whether it has deposit all or not
bankScreen.close();
end;
///exit;
end;

the banktimer is really a 200% safeproof method, don't this its necessary in this case or if you want an even quicker method
make your preset1 an empty inventory


procedure depositBones();
begin
if (not isLoggedIn()) then
exit;
if bankScreen.isOpen() then
begin
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
wait(gaussrangeint(300,400));
end;
exit;
end;


There's nothing wrong with being 200% safe, and in this case it's necessary because no timer would run the risk of getting stuck in an indefinite loop.

I'd also suggest a change to your suggested procedure. Rather than keeping it as a procedure, if you're going to simplify it that much you'd be better off making it a boolean function like so:


function depositBones():boolean;
begin
if (not isLoggedIn()) then
exit;
if bankScreen.isOpen() then
begin
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
wait(gaussrangeint(300,400));
if (tabBackpack.isEmpty()) then
exit(true);
end;
end;

… this way you can actually know whether or not it succeeds and take care of it if it doesn't.

Excuse any bad formatting, I'm on my phone.