Skip to content

Commit

Permalink
support Jammie Dimensions (Expedition)
Browse files Browse the repository at this point in the history
  • Loading branch information
9-9-9-9 committed Nov 18, 2021
1 parent fbbfd5f commit 587bc5d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 25 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>bh.bot</groupId>
<artifactId>99bot</artifactId>
<version>2.6.1</version>
<version>2.7.0</version>

<dependencies>
<dependency>
Expand Down
24 changes: 9 additions & 15 deletions src/main/java/bh/bot/app/AbstractApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -1175,18 +1175,17 @@ else if (place == 3)
o = Configuration.screenResolutionProfile.getOffsetEnterBattleBardsMelvapaloozo();
else if (place == 4)
o = Configuration.screenResolutionProfile.getOffsetEnterBattleBardsBitstock();
} else if (clickImage(BwMatrixMeta.Metas.Expedition.Labels.jammieDimension)) {
if (place == 1)
o = Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionZorgo();
else if (place == 2)
o = Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionYackerz();
else if (place == 3)
o = Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionVionot();
else if (place == 4)
o = Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionGrampa();
}

/*
* result.put(BwMatrixMeta.Metas.Expedition.Labels.jammieDimension, new
* Offset[]{
* Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionZorgo(),
* Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionYackerz(),
* Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionVionot(),
* Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionGrampa(),
* });
*/

if (o != null) {
Point p = o.toScreenCoordinate();
mouseMoveAndClickAndHide(p);
Expand Down Expand Up @@ -1507,11 +1506,6 @@ protected UserConfig getPredefinedUserConfigFromProfileName(String ask) throws I
return resultLoadUserConfig._2;
}

protected void printWarningExpeditionImplementation() {
info(Cu.i().yellow("** WARNING ** ").green("Currently").yellow(", ").cyan("Expedition ").green("only supports").cyan(" Battle Bards").yellow(" & ").cyan(" Idol").yellow(" & ").cyan("Hallowed").yellow(" & ").cyan("Inferno").yellow(" Dimensions").reset().toString());
info(Cu.i().yellow("** WARNING ** The last one ").magenta("Jammie Dimensions").green(" is not yet implemented").yellow(" but will available asap").reset().toString());
}

protected void warningPvpTargetSelectionCase() {
info(Cu.i().yellow("** WARNING ** ").red("about selecting PVP target").yellow(" feature, to prevent wrong targeting and un-expected loss on other target-selectable ranking like GVG... (which having the same target-selection method), ").cyan("while doing AFK").yellow(", this feature works and ").cyan("only works when bot itself attends to PVP").yellow(" by selecting the PVP icon (top left of game screen). That means if you select the PVP icon yourself or enter PVP before bot click etc.., it only select the first line as target as default").reset());
}
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/bh/bot/app/AfkApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,8 @@ private void doLoop(//
info(ColorizeUtil.formatInfo, "Raid: %s of %s", userConfig.getRaidModeDesc(), userConfig.getRaidLevelDesc());
if (doWorldBoss)
info(ColorizeUtil.formatInfo, "World Boss: %s", userConfig.getWorldBossLevelDesc());
if (doExpedition) {
if (doExpedition)
info(ColorizeUtil.formatInfo, "Expedition: (%d) %s", this.expeditionPlace, UserConfig.getExpeditionPlaceDesc(this.expeditionPlace));
printWarningExpeditionImplementation();
}
if (doPvp) {
info(ColorizeUtil.formatInfo, "PVP target: %s", userConfig.getPvpTargetDesc());
warningPvpTargetSelectionCase();
Expand Down
1 change: 0 additions & 1 deletion src/main/java/bh/bot/app/farming/ExpeditionApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ protected boolean readMoreInput() throws IOException {
place = selectExpeditionPlace();
}

printWarningExpeditionImplementation();
return true;
}

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/bh/bot/common/types/ScreenResolutionProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -612,27 +612,27 @@ public Offset getOffsetEnterHallowedDimensionX5T34M() {

@Override
public Offset getOffsetLabelJammieDimension() {
throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
return new Offset(218, 57);
}

@Override
public Offset getOffsetEnterJammieDimensionZorgo() {
throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
return new Offset(168, 201);
}

@Override
public Offset getOffsetEnterJammieDimensionYackerz() {
throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
return new Offset(319, 283);
}

@Override
public Offset getOffsetEnterJammieDimensionVionot() {
throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
return new Offset(479, 338);
}

@Override
public Offset getOffsetEnterJammieDimensionGrampa() {
throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
return new Offset(636, 374);
}

@Override
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/bh/bot/common/types/images/BwMatrixMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,11 @@ public static void load() throws IOException {
Configuration.screenResolutionProfile.getOffsetLabelBattleBards(), //
0xFFFFFF
);
Metas.Expedition.Labels.jammieDimension = BwMatrixMeta.from(//
"labels/expedition.jammie-dimension?",
Configuration.screenResolutionProfile.getOffsetLabelJammieDimension(), //
0xFFFFFF
);

// Trials
Metas.Trials.Buttons.play = BwMatrixMeta.from(//
Expand Down
Binary file not shown.

0 comments on commit 587bc5d

Please sign in to comment.