System to system anom ratting

Is there such a bot that can travel to the next system in search for anoms once exhausted in current?

Finding myself running out of sites and having to travel to another location.

Cheers

Any way of writing this?

1 easy way is to re-use this function from the mining bot to choose a random system instead of a random asteroid belt.

warpToMiningSite : BotDecisionContext -> DecisionPathNode
warpToMiningSite =
    useContextMenuCascadeOnListSurroundingsButton
        (useMenuEntryWithTextContaining "asteroid belts"
            (useRandomMenuEntry
                (useMenuEntryWithTextContaining "Warp to Within"
                    (useMenuEntryWithTextContaining "Within 0 m" menuCascadeCompleted)
                )
            )
        )
warpToRandomGate : BotDecisionContext -> DecisionPathNode
warpToRandomGate  =
    useContextMenuCascadeOnListSurroundingsButton
        (useMenuEntryWithTextContaining "stargates"
            (useRandomMenuEntry
                (useMenuEntryWithTextContaining "Jump" menuCascadeCompleted)
                )
            )
        )

Now with this warpToRandomGate we can insert it in decideNextActionWhenInSpace at the right place. I have never used this script but I think it should go in ifNoAcceptableAnomalyAvailable like this:

decideNextActionWhenInSpace : BotDecisionContext -> SeeUndockingComplete -> DecisionPathNode
decideNextActionWhenInSpace context seeUndockingComplete =
    if seeUndockingComplete.shipUI |> shipUIIndicatesShipIsWarpingOrJumping then
        describeBranch "I see we are warping."
            ([ returnDronesToBay context
             , readShipUIModuleButtonTooltips context
             ]
                |> List.filterMap identity
                |> List.head
                |> Maybe.withDefault waitForProgressInGame
            )

    else
        case context |> knownModulesToActivateAlways |> List.filter (Tuple.second >> moduleIsActiveOrReloading >> not) |> List.head of
            Just ( inactiveModuleMatchingText, inactiveModule ) ->
                describeBranch ("I see inactive module '" ++ inactiveModuleMatchingText ++ "' to activate always. Activate it.")
                    (clickModuleButtonButWaitIfClickedInPreviousStep context inactiveModule)

            Nothing ->
                let
                    returnDronesAndEnterAnomaly { ifNoAcceptableAnomalyAvailable } =
                        returnDronesToBay context
                            |> Maybe.withDefault
                                (describeBranch "No drones to return."
                                    (enterAnomaly { ifNoAcceptableAnomalyAvailable = ifNoAcceptableAnomalyAvailable } context)
                                )

                    returnDronesAndEnterAnomalyOrWait =
                        returnDronesAndEnterAnomaly
                            { ifNoAcceptableAnomalyAvailable =
                                describeBranch "Wait for a matching anomaly to appear." (warpToRandomGate context)
                            }
                in
                case context.readingFromGameClient |> getCurrentAnomalyIDAsSeenInProbeScanner of
                    Nothing ->
                        describeBranch "Looks like we are not in an anomaly." returnDronesAndEnterAnomalyOrWait

                    Just anomalyID ->
                        describeBranch ("We are in anomaly '" ++ anomalyID ++ "'")
                            (case findReasonToAvoidAnomalyFromMemory context { anomalyID = anomalyID } of
                                Just reasonToAvoidAnomaly ->
                                    describeBranch
                                        ("Found a reason to avoid this anomaly: "
                                            ++ describeReasonToAvoidAnomaly reasonToAvoidAnomaly
                                        )
                                        (returnDronesAndEnterAnomaly
                                            { ifNoAcceptableAnomalyAvailable =
                                                describeBranch "Get out of this anomaly."
                                                    (dockAtRandomStationOrStructure context)
                                            }
                                        )

                                Nothing ->
                                    combat context seeUndockingComplete returnDronesAndEnterAnomalyOrWait
                            )

The big issue with this method is you could end up in lowsec.

1 Like

Let me know if it works well. I might try it