SRL Archive - SRL Old School RuneScape

bankscreen broken


westkevin12

2014-05-10 23:09:03

am I allowed to edit the bankscreen function? and if not will it be updated soon? or will I need to make my own for now?
edit:
found 2 fixes. the easy option is to open the show settings tab in your bankscreen and disable tabs. the second is to make the box bigger to find the text in the bankscreen function. I added this to my script along with the official bankscreen so it searches for either one and seems to be working.
function BankScreen2: Boolean;
begin
result := findcolortolerance(x,y,2003443,182,16,336,32,30);
end;

Hazzah

2014-05-11 00:44:17

From: westkevin12
am I allowed to edit the bankscreen function? and if not will it be updated soon? or will I need to make my own for now?
edit:
found 2 fixes. the easy option is to open the show settings tab in your bankscreen and disable tabs. the second is to make the box bigger to find the text in the bankscreen function. I added this to my script along with the official bankscreen so it searches for either one and seems to be working.
function BankScreen2: Boolean;
begin
result := findcolortolerance(x,y,2003443,182,16,336,32,30);
end;


Simba is fully open source so that you are free to change it and any functions within it!

Flight

2014-05-11 00:54:41

Taken (and converted) from AeroLib:

function isBankOpen(): boolean;
begin
result := findTextTPA(2070783, 5, toBox(125,304,170,327), 'Insert', 'SmallChars07', -1);
end;

Although my findTextTPA functions require a TBox parameter rather than X1,Y1,X2,Y2 but I don't recall where, in SRL-OSR's function, those parameters are located so I'll let you convert it. This will work in both standard and tabbed bank modes.

westkevin12

2014-05-11 00:57:11

awesome, thanks flight.

Krazy_Meerkat

2014-05-14 01:31:31

There is a bit more than bankscreen which has wrong co-ords.. The bankslot functons also need adjusting and finally the 2 buttons at the bottom (depositall etc.).. Here's a very quick fix which will restore basic banking functions:

function BankScreen: Boolean;
begin
result := findTextTPA(2070783, 5, 115, 287, 155, 312, 'mode', 'SmallChars07', nothing);
end;

function BankIndexToMSPoint(Index: Integer): TPoint;
begin
if (not InRange(Index, 1, 48)) then
begin
srl_Warn('BankIndexToMSPoint', 'Specified index is not a visible bank slot. Returning first slot''s bank point.', warn_AllVersions);
Result := Point(73, 85);
Exit;
end;
Index := Index - 1;
Result := Point(73 + ((Index mod 8) * 47), 85 + (38 * (Index div 8)));
end;

procedure QuickDeposit(Which: String);
begin
if BankScreen then
begin
case lowercase(Which) of
'inventory','inv': MouseBox(431, 304, 458, 327, mouse_left);
'equipment','worn','equip': MouseBox(467, 300, 491, 326, mouse_left);
else
SRL_Warn('QuickDeposit', 'Invalid deposit method ', WARN_ALLVERSIONS);
end;
Wait(200 + Random(300));
end;
end;
Alternatively, you could just replace bank.simba with this: http://pastebin.com/jtjRCreA

Ashaman88

2014-05-14 08:17:16

send them there pull request:

https://github.com/SRL/SRL-OSR/pulls