Check to see if any reds are on active overview and return a value greater than 0 or bool of true …
//global
int test
//somewhere call the method then ..
public int RatTest()
{
if (Parse.IOverviewEntry[] ListRatOverviewEntry => WindowOverview?.ListView?.Entry?.Where(entry =>(entry?.MainIconIsRed ?? false));
{
test = test + 1;
}
return test;
}
Reminds me of what the older demo mining script integrated with Sanderling does (not the beginner script, the other one). It attacks rats and as far as I remember it uses red color to identify them.
you have var:
c#
var SetRatName =
ListRatOverviewEntry?.Select(entry => Regex.Split(entry?.Name ?? “”, @"\s+")?.FirstOrDefault())
?.Distinct()
?.ToArray();
or you can count the list and use if list.count>0
do: …