SRL Archive - OSR Help

Checking if player is active & if bank interface is open


pitoms

2012-01-01 23:42:07

I'm working on a essence script and I'm trying to find a good way to see if a player is active. I know there's a way to do it with animations but the player is sometimes blocked by the giant block of essence so the bot can't see the player. Is there a way to do it by xp counter?

Also, what's the best way to check if an interface is open, particularly the banking interface?

edit: I'm also wondering what does area size mean in an ddtm. I know it's not related to the title though.

Flight

2012-01-01 23:46:49

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:

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:

if Bankscreen then
Writeln('The bank screen is present')
else
Writeln('The bank is not on-screen');