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.


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 =
        (useMenuEntryWithTextContaining "asteroid belts"
                (useMenuEntryWithTextContaining "Warp to Within"
                    (useMenuEntryWithTextContaining "Within 0 m" menuCascadeCompleted)
warpToRandomGate : BotDecisionContext -> DecisionPathNode
warpToRandomGate  =
        (useMenuEntryWithTextContaining "stargates"
                (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

        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 ->
                    returnDronesAndEnterAnomaly { ifNoAcceptableAnomalyAvailable } =
                        returnDronesToBay context
                            |> Maybe.withDefault
                                (describeBranch "No drones to return."
                                    (enterAnomaly { ifNoAcceptableAnomalyAvailable = ifNoAcceptableAnomalyAvailable } context)

                    returnDronesAndEnterAnomalyOrWait =
                            { ifNoAcceptableAnomalyAvailable =
                                describeBranch "Wait for a matching anomaly to appear." (warpToRandomGate context)
                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 ->
                                        ("Found a reason to avoid this anomaly: "
                                            ++ describeReasonToAvoidAnomaly reasonToAvoidAnomaly
                                            { 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