Skip to content

Commit

Permalink
Adapt Mutant Wizards EVE Online mining bot
Browse files Browse the repository at this point in the history
Adapt Mutant Wizards EVE Online mining bot to his update from https://forum.botengine.org/t/how-to-automate-mining-asteroids-in-eve-online/628/91?u=viir
  • Loading branch information
Viir committed Oct 19, 2019
1 parent 85e8861 commit 0c5ae20
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Expand Up @@ -26,6 +26,7 @@ module Bot exposing
)

import BotEngine.Interface_To_Host_20190808 as InterfaceToHost
import Json.Encode
import Sanderling.Sanderling as Sanderling exposing (MouseButton(..), centerFromRegion, effectMouseClickAtLocation)
import Sanderling.SanderlingMemoryMeasurement as SanderlingMemoryMeasurement
exposing
Expand Down Expand Up @@ -144,10 +145,15 @@ getProgramSequence sequenceName =

MineInBelt ->
{ steps =
[ ( "when warp ends"
, .shipUi
[ ( -- 2019-10-19 MutantWizard introduces name 'before warp finished' at https://forum.botengine.org/t/how-to-automate-mining-asteroids-in-eve-online/628/85?u=viir
"before warp finished - repeat as long as we see the 'warp drive active'"
, {- 2019-10-19 MutantWizard at https://forum.botengine.org/t/how-to-automate-mining-asteroids-in-eve-online/628/91?u=viir:
A third method could be 3 lines of above the ship UI. While warping it displays in the first line “WARP DRIVE ACTIVE” second line displays destination and third line displays distance to destination. When it drops out of warp these 3 lines disappear completely.
-}
.shipUi
>> maybeNothingFromCanNotSeeIt
>> Maybe.map isShipWarpingOrJumping
>> Maybe.andThen (.indication >> maybeNothingFromCanNotSeeIt)
>> Maybe.map (.jsonValue >> Json.Encode.encode 0 >> String.toLower >> String.contains "warp drive active")
>> Maybe.withDefault True
>> mapBoolToOtherType { true = RepeatStep, false = FinishStep }
)
Expand Down
Expand Up @@ -78,7 +78,9 @@ type alias ShipUiModule =


type alias ShipUiIndication =
{ maneuverType : MaybeVisible ShipManeuverType }
{ maneuverType : MaybeVisible ShipManeuverType
, jsonValue : Json.Encode.Value
}


type alias Target =
Expand Down Expand Up @@ -228,7 +230,9 @@ shipUiIndicationFromJsonValue jsonValue =
|> List.head
|> canNotSeeItFromMaybeNothing
in
{ maneuverType = maneuverType }
{ maneuverType = maneuverType
, jsonValue = jsonValue
}


shipUiIsStoppedDecoder : Json.Decode.Decoder (Maybe Bool)
Expand Down

0 comments on commit 0c5ae20

Please sign in to comment.