I’ve been able to customize the a-bot code to handle my custom requirements, including correct orbiting, selecting specific anoms, etc. I’m wanting the bot to target anything containing a certain string first, and kill them. Targeting the elite cruisers helps with my tank, since they are able to track the vni orbiting.
Any idea how to do this? I’m trying to dive into the AttackPriorityIndex(), but not sure exactly how it returns the array according to ewar. I think I have a general understanding, where the AttackPriorityIndex is an index of overview items that are priority. Just need a little assistance implementing it.
I took a look at the method you mentioned, `AttackPriorityIndex`:
The information about ewar from the given overview entry is retrieved from the memory the bot keeps about overview entries. This memory is used to make sure that computation of attack priority not only considers ewar icons currently shown, but also icons shown for that entry in the past (especially importand for jamming).
target anything containing a certain string first
So back to your goal of comparing with a string:
In the method
AttackPriorityIndex you have a reference of type
Sanderling.Parse.IOverviewEntry representing the given overview entry. To get the
type shown for that entry, use the extension method
ColumnTypeValue. The complete method for priority could look like this:
static public int AttackPriorityIndex(
this Bot bot,
Sanderling.Parse.IOverviewEntry entry) =>
(entry?.ColumnTypeValue()?.Contains("cruiser") ?? false) ? 0 : 1;
Maybe I am a little dense here…
but from what I can see the Name and Type Columns are the same and they don’t contain “cruiser”
but the Name of the ship.
I too would like to be able to select what rats I target by name.
I have also looked at the icon which in the tool tip has the type of ship but I see no way to grab the tooltip
I see, the example code can be improved when we know what can be found there instead.
Screenshots I have gotten from users suggest that it is unlikely that the name assigned to a ship ends up in the “Type” column.
When you have an example for this feel free to share it here.
ColumnNameValue function returns the Name from an overview entry. So you can use that value to select.