This is what I've been using. It looks for a bunch of the indicators like the gold lock, the black popup box areas, the green/red health bars. Some of the reults carry more weight than others and we take a vote at the end.
My choice of colors is probably horrible but it's been working good so I haven't messed with it.
gold1 := countColorTolerance(2726093, mainscreen.getBounds(), 9, colorSetting(2,0.14,2.16));
red1 := countColorTolerance(3094484, mainscreen.getBounds(), 25, colorSetting(0));
box1 := countColorTolerance(1380618, mainscreen.getBounds(), 0, colorSetting(0));
box2 := countColorTolerance(1381133, mainscreen.getBounds(), 2, colorSetting(0));
green1 := countColorTolerance(3308832, mainscreen.getBounds(), 15, colorSetting(2, 0.27, 1.56));
search := mainscreen.playerBox;
search.expand(35);
green2 := countColorTolerance(45128, search, 9, colorSetting(2, 0.70, 0.00));
if (gold1 > 50) then inc(votes);
if (gold1 > 80) then inc(votes);
if (gold1 > 100) then inc(votes);
if (red1 > 45) then inc(votes);
if (box1 > 150) then votes := votes + 2;
if (box2 > 150) then votes := votes + 2;
if (green1 > 125) then inc(votes);
if (green2 > 40) then inc(votes);
if (votes > 4) then
result := true
else
result := false;