SRL Archive - Test corner

BankScreen2: Boolean;


Wanted

2007-05-11 19:34:20

EDIT: Ok never mind, WT-Fawaki's fix is working perfectly, also this function is still good.

The SRL BankScreen isn't working even when I change 185 to 184.

Some one test this please. It will return true if the bank screen is open.

function BankScreen2: Boolean;
begin
if (GetColor(236, 42) = 2070783) then
Result := True;
end;

for testers

program BankTeller;
{.include SRL/SRL.scar}

function BankScreen2: Boolean;
begin
if (GetColor(236, 42) = 2070783) then
Result := True;
end;

begin
SetUpSRL;
ActivateClient;
if (BankScreen2) then
Writeln('Found Bank Screen.');
end.

bullzeye95

2007-05-11 19:46:57

Works nicely :). I suppose the colors are static. This one seems more… I don't know… safe then the existing bankscreen. Nicely done.

Wanted

2007-05-11 20:59:07

I'm still getting all kinds of problems with banking related functions/procedures in SRL :(. Bringing my progress on all of my scripts to a stand still.

Problems with withdrawing mostly and exiting.

Dark_Sniper

2007-05-11 21:31:25

well what happens when that color just so happens to show up when the is no bankscreen :p

its possible but not plausible :p


lets see now if you used get color in about 4-5 places its unlikly.

~alex~

2007-05-12 05:22:24

The only problem is other functions like depositall require bankscreen also… so you would have to edit them as well.

Wanted

2007-05-12 10:18:55

From: ~alex~
The only problem is other functions like depositall require bankscreen also… so you would have to edit them as well.


Wow I'm stupid.

Thanks alex, everything works now. :-p

Smartzkid

2007-05-13 19:32:13

From: ~alex~
The only problem is other functions like depositall require bankscreen also… so you would have to edit them as well.


Or, you could just replace BankScreen with this code…

Wizzup?

2007-05-14 03:10:33

{*******************************************************************************
function BankScreen: Boolean;
by: SRL Dev Team
Description: Finds Bankscreen. Returns true if Found.
*******************************************************************************}

function BankScreen: Boolean;

var
x, y: integer;

begin
If FindColor(x, y, 2070783, 22, 31, 473, 52) Then
Result := IsTextAtEx(x, y - 2 , 'The Bank of', 0, upchars, True, False, 0, 0,
2070783)
Else If FindColorTolerance(x, y, 2070783, 22, 31, 473, 52, 30) Then
Result := IsTextAtEx(x, y - 2 , 'The Bank of', 30, upchars, True, False, 0, 0,
GetColor(x, y));
end;

~alex~

2007-05-14 17:59:17

From: Smartzkid
Or, you could just replace BankScreen with this code…


The fact that he called it bankscreen2 means that it would be calling the wrong function..

Wanted

2007-05-14 22:54:24

The problem was, I wasn't actually editing the procedure in SRL.

I was making my own procedure in the script so that I wouldn't have to deal with noob's asking me "Why don't the banking work?!?!!:confused: " but as Alex pointed out the other banking procedures call bankscreen procedure which after I edited fixed the problem.

Thanks guys.