SRL Archive - RS3 Help

Banking Issue


Theron

2015-01-06 15:11:23

Hey all, trying to run Wooty's HardLeatherBootMaker on my ironman account and I'm having some issues with the banking. The current bank procedure is:

procedure bankBoots();
begin
if not isLoggedIn() then exit();
if not tabBackpack.isEmpty() then bankScreen.open(BANK_TABLE_BURTHORPE);
wait(gaussRangeInt(1000, 2000));
if (makeBoots) and (bankScreen.getPackCountDTM(leatherDTM) > 0) then
begin
setStatus('Widrawing thread and leathers...');
if bankScreen.isOpen(2500) then
begin
bankScreen.clickButton(BANK_BUTTON_PRESET_1);
if not bankScreen.isOpen(gaussRangeInt(1500, 2500)) then tabBackpack.mouseSlot(random(2, 28), MOUSE_LEFT);
wait(gaussRangeInt(750, 1250));
if (toolScreen.isOpen(2500)) then toolScreen.select('Needle');
if productionScreen.isOpen(1500) then
begin
if productionScreen.getSelectedBoxText() <> 'Hard leather boots' then productionScreen.selectBox(9);
wait(1250 + random(250));
productionScreen.clickStart();
setStatus('Crafting boots...');
end;
while not (progressScreen.getPercentDone() = 100) do wait(100);
progressScreen.findButton(PROGRESS_BUTTON_DONE, gaussRangeInt(500, 1000), True);
gaussRangeInt(1000, 1500);
if makeBoots then bootsMade := bootsMade + tabBackpack.countDTM(bootsDTM);
inc(tripsFinished);
bankScreen.open(BANK_TABLE_BURTHORPE);
gaussRangeInt(750, 1250);
end;
end;
if bankScreen.isOpen(2500) then
begin
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(gaussRangeInt(1000, 2000));
setStatus('Closing the bank...');
bankScreen.close();
wait(gaussRangeInt(500, 1000));
end;
end;

However I don't really need it to make the boots for me, just bank the hard leather and continue the loop, so I slimmed it down to:

procedure bankHardLeather();
begin
if not isLoggedIn() then exit();
if not tabBackpack.isEmpty() then bankScreen.open(BANK_TABLE_BURTHORPE);
wait(gaussRangeInt(1000, 2000));
if bankScreen.isOpen(2500) then
begin
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(gaussRangeInt(1000, 2000));
setStatus('Closing the bank...');
bankScreen.close();
wait(gaussRangeInt(500, 1000));
end;
end;

I changed the procedure in the main loop also to the title of the slimmer procedure. It will compile and it runs every aspect of the script as intended. It rarely finds the bank after it runs north from the cow pasture (1/10 it will succeed).

It uses a SRL-6 function to detect the banker so maybe it's outdated? I cannot think of another reason why it would be having issues finding the bank.

Also, the script tends to kill 2-4 cows, but only ever loots 2 at most, leaving quite a few hides on the floor, which is a little inefficient. This is the looting code:

procedure lootHides();
var
x, y: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn() then exit();
minimap.waitPlayerMoving();
findColorsSpiralTolerance(x, y, TPA, 14607600, mainScreen.getBounds(), 6, colorSetting(2, 1.06, 3.40));
if (Length(TPA) < 1) then exit;
setStatus('Looting!');
ATPA := TPA.toATPA(20, 20);
ATPA.filterBetween(0, 62);
ATPA.sortFromMidPoint(mainScreen.playerPoint);
smartImage.debugATPA(ATPA);
if Length(ATPA) > 0 then mouse(middleTPA(ATPA[0]), MOUSE_MOVE);
if isMouseOverText(['ake']) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.select(['ake Cowhide', 'Cowhide'], 250) then
begin
smartImage.clearArea(mainScreen.getBounds());
tabBackpack.waitForShift(2000);
end;
end;
end;


What could I alter to make it loot all hides on the floor before it continues to kill cows? Any advice would be appreciated. Please note I have looked through most tutorials and I am stumped regarding the banking issue. I could probably find the solution to the looting issue if I continued to dig, but it may be something obvious that I am just overlooking.

Quentini

2015-01-06 23:49:05

I would suggest using ATPAs in a procedure that searches and finds the required bank you wish to use. This will be more accurate and easier to add both antiban and failsafe features.

fastler

2015-01-07 07:59:12


procedure lootHides();
var
x, y: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
repeat
if not isLoggedIn() then
exit();
minimap.waitPlayerMoving();
findColorsSpiralTolerance(x, y, TPA, 14607600, mainScreen.getBounds(), 6, colorSetting(2, 1.06, 3.40));
if (Length(TPA) < 1) then
exit;
setStatus('Looting!');
ATPA := TPA.toATPA(20, 20);
ATPA.filterBetween(0, 62);
ATPA.sortFromMidPoint(mainScreen.playerPoint);
smartImage.debugATPA(ATPA);
if Length(ATPA) > 0 then
mouse(middleTPA(ATPA[0]));
if isMouseOverText(['ake']) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.select(['ake Cowhide', 'Cowhide'], 250) then
tabBackpack.waitForShift(2000);
end;
smartImage.clearArea(mainScreen.getBounds());
until (Length(ATPA) < 1);
end;
-Removed MOUSE_MOVE from mouse(), that is the default mouse action.
-Moved the smartImage.clearArea() so it triggers each time.
-Threw in a repeat until, to cycle through until it can't find anymore hides.

Alternatively, you could have turned this into a function that returns a true or false, and then you could loop the call to this function until it returns false. You might then want to change the name to "lootHide" though. In that case:

function lootHide(): Boolean;
var
x, y: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit(false);
minimap.waitPlayerMoving();
findColorsSpiralTolerance(x, y, TPA, 14607600, mainScreen.getBounds(), 6, colorSetting(2, 1.06, 3.40));
if (Length(TPA) < 1) then
exit(false);
setStatus('Looting!');
ATPA := TPA.toATPA(20, 20);
ATPA.filterBetween(0, 62);
ATPA.sortFromMidPoint(mainScreen.playerPoint);
smartImage.debugATPA(ATPA);
if Length(ATPA) > 0 then
mouse(middleTPA(ATPA[0]));
if isMouseOverText(['ake']) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.select(['ake Cowhide', 'Cowhide'], 250) then
begin
result := true;
tabBackpack.waitForShift(2000);
end;
end;
smartImage.clearArea(mainScreen.getBounds());
end;
You could loop it like so:

repeat
wait(gaussRangeInt(250, 750));
until (not lootHide());
or so:

while lootHide() do
wait(gaussRangeInt(250, 750));

Theron

2015-01-07 11:31:55

From: Quentini
I would suggest using ATPAs in a procedure that searches and finds the required bank you wish to use. This will be more accurate and easier to add both antiban and failsafe features.


From: fastler

procedure lootHides();
var
x, y: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
repeat
if not isLoggedIn() then
exit();
minimap.waitPlayerMoving();
findColorsSpiralTolerance(x, y, TPA, 14607600, mainScreen.getBounds(), 6, colorSetting(2, 1.06, 3.40));
if (Length(TPA) < 1) then
exit;
setStatus('Looting!');
ATPA := TPA.toATPA(20, 20);
ATPA.filterBetween(0, 62);
ATPA.sortFromMidPoint(mainScreen.playerPoint);
smartImage.debugATPA(ATPA);
if Length(ATPA) > 0 then
mouse(middleTPA(ATPA[0]));
if isMouseOverText(['ake']) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.select(['ake Cowhide', 'Cowhide'], 250) then
tabBackpack.waitForShift(2000);
end;
smartImage.clearArea(mainScreen.getBounds());
until (Length(ATPA) < 1);
end;
-Removed MOUSE_MOVE from mouse(), that is the default mouse action.
-Moved the smartImage.clearArea() so it triggers each time.
-Threw in a repeat until, to cycle through until it can't find anymore hides.

Alternatively, you could have turned this into a function that returns a true or false, and then you could loop the call to this function until it returns false. You might then want to change the name to "lootHide" though. In that case:

function lootHide(): Boolean;
var
x, y: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit(false);
minimap.waitPlayerMoving();
findColorsSpiralTolerance(x, y, TPA, 14607600, mainScreen.getBounds(), 6, colorSetting(2, 1.06, 3.40));
if (Length(TPA) < 1) then
exit(false);
setStatus('Looting!');
ATPA := TPA.toATPA(20, 20);
ATPA.filterBetween(0, 62);
ATPA.sortFromMidPoint(mainScreen.playerPoint);
smartImage.debugATPA(ATPA);
if Length(ATPA) > 0 then
mouse(middleTPA(ATPA[0]));
if isMouseOverText(['ake']) then
begin
fastClick(MOUSE_RIGHT);
if chooseOption.select(['ake Cowhide', 'Cowhide'], 250) then
begin
result := true;
tabBackpack.waitForShift(2000);
end;
end;
smartImage.clearArea(mainScreen.getBounds());
end;
You could loop it like so:

repeat
wait(gaussRangeInt(250, 750));
until (not lootHide());
or so:

while lootHide() do
wait(gaussRangeInt(250, 750));


Thank you both, does the given banking procedure look incorrect? Why isn't it working?

fastler

2015-01-07 19:28:47

Could it be that you are zoomed out to the maximum? Being slightly above the median zoom distance is ideal.
Maybe the player is not close enough to the table? Try getting the script to end up as close as possible.

But perhaps this will help the most.
In "Includes\srl-6\lib\interfaces\bankscreen.simba" on line "2167" change the variable "col1"
from:
col1:= [14547176, 8, [2, [1.24, 4.52, 0.00]]];
to:
col1:= [13427162, 9, [2, [0.88, 0.94, 0.00]]];

@Ashaman88; Perhaps this is something to consider, colors were aggregated over 5+ world hops.

Ian

2015-01-07 20:48:02

From: fastler
Could it be that you are zoomed out to the maximum? Being slightly above the median zoom distance is ideal.

Unless the script tells you to use a specific zoom I think that zoomed out completely is standard.

Ashaman88

2015-01-08 13:20:19

From: fastler
Could it be that you are zoomed out to the maximum? Being slightly above the median zoom distance is ideal.
Maybe the player is not close enough to the table? Try getting the script to end up as close as possible.

But perhaps this will help the most.
In "Includes\srl-6\lib\interfaces\bankscreen.simba" on line "2167" change the variable "col1"
from:
col1:= [14547176, 8, [2, [1.24, 4.52, 0.00]]];
to:
col1:= [13427162, 9, [2, [0.88, 0.94, 0.00]]];

@Ashaman88; Perhaps this is something to consider, colors were aggregated over 5+ world hops.


Colors should also be grabbed with reloading smart several times. Wait which bank is this for?

Theron

2015-01-08 13:22:27

From: Ashaman88
Colors should also be grabbed with reloading smart several times. Wait which bank is this for?


This is for the burthrope bank

fastler

2015-01-10 06:07:22

From: Ashaman88
Colors should also be grabbed with reloading smart several times. Wait which bank is this for?


Thanks be to you, for imparting knowledge unto me.
When I checked my color it failed to match straight away. ;(

Quentini

2015-01-11 10:22:54

From: fastler
Thanks be to you, for imparting knowledge unto me.
When I checked my color it failed to match straight away. ;(


Just like Ashaman suggested, make sure you world hop several times and get a decent amount of color matches for the bank. Also, make sure you are using the standard zoom (fully zoomed out), while using the more accurate CTS2 option when selecting the colors.

I, personally, select colors at various angles and multiple worlds to cover all bases just in case.

Theron

2015-01-14 22:16:40

Still cannot figure out the banking issue.. :/

The Mayor

2015-01-15 01:05:18

From: Theron
Still cannot figure out the banking issue.. :/


I did notice the BANK_TABLE_BURTHORPE wasn't working. I didn't fix it the other day because nobody posted it in the bugs section.

Theron

2015-01-15 12:00:19

From: The Mayor
I did notice the BANK_TABLE_BURTHORPE wasn't working. I didn't fix it the other day because nobody posted it in the bugs section.

I posted in the bugs section. :) Really would like to get this fixed to get my ironman some money. ;)