SRL Archive - OSR Help

Banking does not work ?


Dervish

2010-05-25 15:12:31

Procedure WalkToChurch;
begin
if FindSymbol(x,y,'Bank') and
FindSymbol(x,y,'Bar') then
begin
Players[CurrentPlayer].Loc := 'bank';
ReportStatus('Everything looks fine, checking runes');
If not FindBitmapIn(bmp_Rune_Law,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
ReportStatus('No laws in inventory, checking bank.');
Tries:=0;
Repeat
OpenBankQuiet('fwb');
Inc(Tries);
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried 20 times to find bank, stopping...');
NextPlayer(False);
end else;
begin
SearchBank('law');
If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No laws in inventory nor bank...');
Nextplayer(False);
end else;
begin
Mouse(x,y,2,2,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end;
end;
If not Findbitmapin(bmp_Rune_Air,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
ReportStatus('No air runes in inventory, checking if staff is equipped.');
Gametab(26);
If not(FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2)) then
begin
Reportstatus('No Staff equipped either, checking Bank.');
Tries:=0;
repeat
OpenBankQuiet('fwb');
Inc(Tries);
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried 20 times to find bank, stopping...');
NextPlayer(False);
end else;
begin
SearchBank('air');
If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
ReportStatus('Found Staff of Air');
Mouse(x,y,2,2,false);
Wait(200+random(100));
ChooseOption('1');
Wait(200+random(100));
Closebank;
FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
Mouse(x,y,1,1,true);
end else;
begin
Reportstatus('No staff, going for runes...');
If Findbitmapin(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,2,2,false);
Wait(200+random(100));
ChooseOption('ll');
Wait(200+random(100));
ReportStatus('Runes found.');
CloseBank;
end;
end;
end;
end else;
ReportStatus('Staff equipped.');
end;
ReportStatus('It would seem you have both Air / Laws aviable.');
ReportStatus('Starting walking procedure.');
Makecompass('N');
{walking here...}
end;
end;
end;

Hmm I try it and it does not work, yet I can't find the error.

Help please :(

Narcle

2010-05-25 15:24:07

Won't find/open the bank? Or doesn't detect bank is open? They did an update this morning that changed some graphics.

Dervish

2010-05-25 15:24:47

From: Narcle
Won't find/open the bank? Or doesn't detect bank is open? They did an update this morning that changed some graphics.


Does not open the bank :(.

marpis

2010-05-25 15:25:58

OpenBankQuiet('fwb'); <- how about trying OpenBank('fwb')?

Dervish

2010-05-25 15:31:06

From: marpis
OpenBankQuiet('fwb'); <- how about trying OpenBank('fwb')?


That worked, thanks, however it doesn't find it well :( It incs the tries to 7-12 before finding it.

Works anyways, thanks alot :).

_Edit

I can't see why OpenBankQuiet doesn't work though…

aran armath

2010-05-25 15:55:59

From: Dr D. Dervish
That worked, thanks, however it doesn't find it well :( It incs the tries to 7-12 before finding it.

Works anyways, thanks alot :).

_Edit

I can't see why OpenBankQuiet doesn't work though…


Might try OpenBankNpc;

Awkwardsaw

2010-05-25 15:58:15

or openbankfast, :)

Dervish

2010-05-25 15:59:46

From: aran armath
Might try OpenBankNpc;


I could use that to play a "random antiban".

aran armath

2010-05-25 16:01:33

From: Dr D. Dervish
I could use that to play a "random antiban".


I just have used it always because others just give me trouble.

Narcle

2010-05-25 16:09:24

I usually make my own banking procedure with TPA and splitting it etc. usually finds bank first try and then use OpenBank() as back up if it fails.

Just make sure when you do WaitOption() you have it wait for 2000… took me forever to figure that out on mine. =X

aran armath

2010-05-25 16:12:07

From: Narcle
I usually make my own banking procedure with TPA and splitting it etc. usually finds bank first try and then use OpenBank() as back up if it fails.

Just make sure when you do WaitOption() you have it wait for 2000… took me forever to figure that out on mine. =X


Still reminds me of the days when SRL didn't have them and we had to make our own…. Those troubled me.