SRL Archive - SRL Archives

Bank Depositing Button.


Tniffoc

2009-04-01 20:40:46

Jagex has added a little button to the banking gui that you can push to deposit everything in your inventory! Here's the procedure to click it.

This is what the button looks like.

{*******************************************************************************
function DepositAllButton: Boolean;
By: Tniffoc
Description: Deposits the whole inventory if the bank is open by using the
deposit all button from Jagex.
*******************************************************************************}
function DepositAllButton: Boolean;
begin
if(GetColor(400,314) = 1655412) then
MouseBox(383, 300, 407, 315, 1)
else
begin
Result := false;
Exit;
end;
wait(500 + random(500));
if(InvEmpty) then
Result := true
else
Result := false;
end;

Harry

2009-04-01 20:43:35

So.. I heard you liked using static coords to find if the bank screen is open..
if(GetColor(400,314) = 1655412) then
=\

It would have been better to use "if BankScreen then".

But nice work.
From: mormonman
He does use if bankscreen then… the color is to check if the "note" button has already been clicked…

Oh, I see.. why would it matter if the button is active or not? Sorry, I haven't played The Game in a while…

mormonman

2009-04-01 20:45:32

From: Harry
So.. I heard you liked using static coords to find if the bank screen is open..
if(GetColor(400,314) = 1655412) then
=\

It would have been better to use "if BankScreen then".

But nice work.


He does use if bankscreen then… the color is to check if the "note" button has already been clicked…

lordsaturn

2009-04-01 20:52:02

How about
procedure DepositAllButton;
begin
if BankScreen then
MouseBox(383, 300, 407, 315, 1);
end;

Nava2

2009-04-01 20:53:23

procedure DepositAllButton;
var
iTime: Integer;
begin
if not BankScreen then Exit;
MouseBox(383, 300, 407, 315, 1);
iTime := GetTimeRunning + 2000;
while (iTime < 2000) and (not InvEmpty) do
Wait(80);
Wait(RandomRange(50, 100));
end;

Tniffoc

2009-04-01 20:56:56

From: Nava2
procedure DepositAllButton;
var
iTime: Integer;
begin
if not BankScreen then Exit;
MouseBox(383, 300, 407, 315, 1);
iTime := GetTimeRunning + 2000;
while (iTime < 2000) and (not InvEmpty) do
Wait(80);
Wait(RandomRange(50, 100));
end;


If I was scripting with this, I know that I would like it to be a function. Maybe just me though.

lordsaturn

2009-04-01 21:02:32

function DepositAllButton: Boolean;
var
iTime: Integer;
begin
if BankScreen then
if(GetColor(400,314) = 1655412) then
begin
MouseBox(383, 300, 407, 315, 1);
iTime := GetTimeRunning + 2000;
while (GetTimeRunning < iTime) and (not Result) do
begin
Wait(80);
Result := InvEmpty;
end;
if Result then
Wait(RandomRange(50, 100));
end;
end;

kingarabian

2009-04-01 21:11:37

From: Harry
So.. I heard you liked using static coords to find if the bank screen is open..
if(GetColor(400,314) = 1655412) then
=\

It would have been better to use "if BankScreen then".

But nice work.

Oh, I see.. why would it matter if the button is active or not? Sorry, I haven't played The Game in a while…


Yeah I think "if bankScreen then" is broken with the new update.

Tniffoc

2009-04-01 22:00:16

From: kingarabian
Yeah I think "if bankScreen then" is broken with the new update.


It worked. I just put the static coords in to make sure the button hadn't moved or done something strange like that.

ZephyrsFury

2009-04-02 03:24:20

I've already added a similar function to the dev svn.

Tniffoc

2009-04-02 11:08:41

Darn. I thought I caught it first. :)

Dervish

2009-04-02 11:30:11

I was the first one ;) and it used all buttons.