SRL Archive - RS3 Help

What are some banking methods?


vvarfare

2014-09-23 20:49:19

I am trying to add some decent banking into one of my scripts using the following
 bankScreen.open(BANK_CHEST_SHANTAY);  

but i keep getting the following
-- TRSBankscreen.__openChest()
---- ERROR: Failed to find enough chest colors [1 0, 2 0 ]
-- TRSBankscreen.__openChest(): result = false

Are there any alternatives or am i doing something wrong in the current way this is is how i have it setup since im just testing the banking atm.

{$DEFINE SMART}
{$I SRL-6/SRL.simba}

procedure withdrawItems();
begin
if not isLoggedin() then
exit;

if isLoggedin() then
begin
wait(randomRange(300,500));
bankScreen.open(BANK_CHEST_SHANTAY);
end;

if not (bankScreen.isOpen) then
terminateScript();


if (bankScreen.isOpen()) then
begin
wait(randomRange(400,600));
bankScreen.clickButton(BANK_BUTTON_PRESET_2);
end;
end;

begin
setupSRL();
withdrawItems();
end;

NKN

2014-09-23 20:52:23

I like making my own custom banking methods.

Look into TPA's and ATPA's

vvarfare

2014-09-23 20:59:30

From: NKN
I like making my own custom banking methods.

Look into TPA's and ATPA's


I tried but i couldn't get ACA to to capture the rsclient, ill give it another try, but the thing is not very beginner friendly!

Ross

2014-09-23 21:03:08

From: vvarfare
I tried but i couldn't get ACA to to capture the rsclient, ill give it another try, but the thing is not very beginner friendly!


Which ACA are you using? ACA v2 doesn't need to captures anything it just looks at your screen.

e: here

TylerT

2014-09-23 21:57:47

View sub-tutorial 3 and 4 in this tutorial by @The Mayor

vvarfare

2014-09-23 22:21:38

From: therossity
Which ACA are you using? ACA v2 doesn't need to captures anything it just looks at your screen.

e: here


You son of a gun! Congratulations, i still owe you some proggies I am just hoarding my charms for dxp, I do gold charms for you tonight!

Ross

2014-09-23 22:24:33

From: vvarfare
You son of a gun! Congratulations, i still owe you some proggies I am just hoarding my charms for dxp, I do gold charms for you tonight!


Thanks! :)

Yes, proggies are my lifeblood. That script is getting no love unfortunately.

vvarfare

2014-09-24 01:01:54

I did it! it works know using The mayors tutorial
this is the code that works for shantay banking

program exampleScript;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}

procedure OpenBank();

var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
mainscreen.findObject(x, y, 4477037, 18, colorSetting(2, 0.28, 1.10), mainscreen.playerPoint, 30, 50, 50, ['pen', 'hantay' , 'chest' ], MOUSE_LEFT)
end;

begin
setupsrl();
OpenBank();
end.


Except i have some questions how did you get the width and height of the object, i couldn't find that in your thread,
and a ACA question when i select perfect match i also highlights other items that are also brown in bright red, if aca can detect it, what stops the script to go to other brown looking areas?

@The Mayor

The Mayor

2014-09-24 03:23:26

From: vvarfare
I did it! it works know using The mayors tutorial
this is the code that works for shantay banking

program exampleScript;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}

procedure OpenBank();

var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
mainscreen.findObject(x, y, 4477037, 18, colorSetting(2, 0.28, 1.10), mainscreen.playerPoint, 30, 50, 50, ['pen', 'hantay' , 'chest' ], MOUSE_LEFT)
end;

begin
setupsrl();
OpenBank();
end.


Except i have some questions how did you get the width and height of the object, i couldn't find that in your thread,
and a ACA question when i select perfect match i also highlights other items that are also brown in bright red, if aca can detect it, what stops the script to go to other brown looking areas?

@The Mayor


For that mainscreen.findObject function, just estimate the width and height of the object you are finding (in pixels). You can use current mouse coordinates to do this, or the colour picker or what ever.

Excluding unnecessary colour matches is the fun (and sometimes tricky) part with colour scripting. You will notice in that findObject function the last number before the mouseOverText is the 'minCount'. This means any TPAs with less than X matching pixels will be excluded from the result.