SRL Archive - SRL Development and Help

Bank Update - getPackSlotBox


Squigglyo

2014-04-07 21:21:20


function TRSBankScreen.getPackSlotBox(slot: integer): TBox;
begin
if (not self.isOpen()) then
exit();

if (not inRange(slot, BACKPACK_SLOT_LOW, BACKPACK_SLOT_HIGH)) then
begin
print('bankScreen.getPackSlotBox(): Slot '+toStr(slot)+' is invalid', TDebug.WARNING);
exit(intToBox(-1, -1, -1, -1));
end;

// - 1 because the grid (array) starts at 0.
result := gridBox(slot -1, 4, 7, 35, 31, 42, 36, point(self.x + _PACK_SLOTS_OFFSET.x, self.y + _PACK_SLOTS_OFFSET.y));
end;
I dont know if this broke in the recent bank update or what, but it seems to not be able to find the slots 100% of the time anymore.

Edit.
thought i fixed it, but not yet.

The Mayor

2014-04-08 01:29:17

I think riwu already patched this

https://github.com/SRL/SRL-6/commit/7bf131078b1f9f45622ac56fccf0bc04590d945c

Squigglyo

2014-04-08 01:37:49

From: The Mayor
I think riwu already patched this

https://github.com/SRL/SRL-6/commit/7bf131078b1f9f45622ac56fccf0bc04590d945c


was talking to him when he did it.
Tested it for a few hours, its still not right.

It seems to sometimes go to far up on the y, so it either grabs no item (inbetween) or sometimes even the item above.

The Mayor

2014-04-08 01:45:15

From: Squigglyo
was talking to him when he did it.
Tested it for a few hours, its still not right.

It seems to sometimes go to far up on the y, so it either grabs no item (inbetween) or sometimes even the item above.


Ahh yea, it seems getBankSlotBox is throwing an out of bounds error too :unsure:

E: actually it might be because isOpen is failing

E2: actually the bug is in function TRSBankScreen.__find(): boolean;

E3: specifically this conditional:

if (countColorTolerance(1985923, b, 25, colorSetting(1)) = BROWN_LENGTH) then

which results false when bank is actually open.

Squigglyo

2014-04-08 01:52:17

At a guess, Jagex have slightly moved the bank window with the upadte.
I have a pretty weird memory for locations and small stuff like that and I didnt notice any change, so it must be pretty subtle. Ide say most botters are at extreme risk at the moment, since all bots that bank are going to be acting up until this is fixed

riwu

2014-04-08 08:47:56

From: Squigglyo
was talking to him when he did it.
Tested it for a few hours, its still not right.

It seems to sometimes go to far up on the y, so it either grabs no item (inbetween) or sometimes even the item above.

You were talking to me?!? Through what?


This is my own fix that i made yesterday that has been working fine for me. (both TRSBankScreen.__find() and TRSBankScreen.getPackSlotBox())

Squigglyo

2014-04-08 09:07:30

From: riwu
You were talking to me?!? Through what?


My bad, was someone else. Ill try out your fix tomorow.