IronTeapot
11-11-2006, 06:34 AM
I wrote this because the SRL findbank's weren't always working for the script I'm writing. Even if you dont want to use it for anything, just check it out. :)
Try standing near a bank, but with the actual bank out of your view for best results. Oh and low quality of course, the roofs are evil in high quality....
program LocateBank;
{.include srl/srl.scar}
Procedure prepareClient;
begin
SetupSRL;
ClearDebug;
ActivateClient;
MakeCompass('N');
HighestAngle;
//SetRun(true);
Writeln('Setup Complete');
end;
Procedure OpenMyBank;
//Will rotate the screen and change the angle until the bank is found
var
i,WA,WC:Integer;
begin
WC:=1
WA:=1
repeat
if(FindObj(x,y,'ank',5066840,5))then
begin
mouse(x,y,1,1,false);
if (ChooseOption(x, y, 'quickly')) then
begin
Flag;
repeat
Wait(100);
i := i + 1
until (BankScreen) or (i >= 50);
end;
end;
if (not(BankScreen))then
begin
case WC of
1:MakeCompass('W');
2:MakeCompass('E');
3:MakeCompass('S');
4:MakeCompass('N');
else Writeln('Can not find the bank at Highest Angle.');
end;
end;
WC:=WC+1;
if (WC=5) and (WA=1)then
begin
Writeln('Trying Lowest Angle.');
LowestAngle;
WC:=1
WA:=2
end;
until(BankScreen)or (WC=5)and (WA=2);
if (not(BankScreen))then
Writeln('Can not find the bank at all.');
end;
begin
prepareClient;
OpenMyBank;
Writeln('The bank should be open now');
end.
Please comment. I just had to share this with someone.
Try standing near a bank, but with the actual bank out of your view for best results. Oh and low quality of course, the roofs are evil in high quality....
program LocateBank;
{.include srl/srl.scar}
Procedure prepareClient;
begin
SetupSRL;
ClearDebug;
ActivateClient;
MakeCompass('N');
HighestAngle;
//SetRun(true);
Writeln('Setup Complete');
end;
Procedure OpenMyBank;
//Will rotate the screen and change the angle until the bank is found
var
i,WA,WC:Integer;
begin
WC:=1
WA:=1
repeat
if(FindObj(x,y,'ank',5066840,5))then
begin
mouse(x,y,1,1,false);
if (ChooseOption(x, y, 'quickly')) then
begin
Flag;
repeat
Wait(100);
i := i + 1
until (BankScreen) or (i >= 50);
end;
end;
if (not(BankScreen))then
begin
case WC of
1:MakeCompass('W');
2:MakeCompass('E');
3:MakeCompass('S');
4:MakeCompass('N');
else Writeln('Can not find the bank at Highest Angle.');
end;
end;
WC:=WC+1;
if (WC=5) and (WA=1)then
begin
Writeln('Trying Lowest Angle.');
LowestAngle;
WC:=1
WA:=2
end;
until(BankScreen)or (WC=5)and (WA=2);
if (not(BankScreen))then
Writeln('Can not find the bank at all.');
end;
begin
prepareClient;
OpenMyBank;
Writeln('The bank should be open now');
end.
Please comment. I just had to share this with someone.