Hmm let's see...
For mining detection, you could use one of three strategies; pixel-shift, inventory count tracking, XP Counter tracking.
Here's what I personally use for pixel-shift mining detection:
Simba Code:
Function Mining: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 260);
end;
For the bank check, you could simply use "BankScreen". This is a boolean, so use it like this:
Simba Code:
if Bankscreen then
Writeln('The bank screen is present')
else
Writeln('The bank is not on-screen');