From 814910ab0c759f71656f33f3180d5704b1e3c8a1 Mon Sep 17 00:00:00 2001
From: HungPV <49741222+9-9-9-9@users.noreply.github.com>
Date: Fri, 10 Sep 2021 04:44:34 +0700
Subject: [PATCH] 1.6.0 support Invasion on Steam (#36)
* prepare for other Dimentions of Expedition
* update desc of some functions
* support Invasion on Steam
* 1.6.0
Co-authored-by: 9-9-9-9 <9-9-9-9>
---
README.md | 2 +-
README.release.md | 2 +-
pom.xml | 2 +-
.../java/bh/bot/app/AbstractApplication.java | 84 ++++--
src/main/java/bh/bot/app/AfkApp.java | 8 +-
.../bh/bot/app/farming/ExpeditionApp.java | 2 +-
.../java/bh/bot/app/farming/GauntletApp.java | 2 +-
src/main/java/bh/bot/app/farming/GvgApp.java | 2 +-
.../java/bh/bot/app/farming/InvasionApp.java | 2 +-
src/main/java/bh/bot/app/farming/PvpApp.java | 4 +-
.../java/bh/bot/app/farming/TrialsApp.java | 2 +-
.../java/bh/bot/app/farming/WorldBossApp.java | 2 +-
.../java/bh/bot/common/Configuration.java | 2 +-
.../bh/bot/common/jna/MiniClientLinuxJna.java | 3 +-
.../common/types/ScreenResolutionProfile.java | 248 +++++++++++++++++-
.../bot/common/types/images/BwMatrixMeta.java | 4 +
.../bh/bot/common/utils/InteractionUtil.java | 10 +-
.../steam/buttons/invasion.accept-tp.bmp | Bin 0 -> 3834 bytes
.../steam/buttons/invasion.play-tp.bmp | Bin 0 -> 2350 bytes
.../steam/buttons/invasion.town-tp.bmp | Bin 0 -> 2134 bytes
.../labels/attendable-places/invasion-tp.bmp | Bin 0 -> 1430 bytes
21 files changed, 326 insertions(+), 55 deletions(-)
create mode 100644 src/main/resources/game-images/steam/buttons/invasion.accept-tp.bmp
create mode 100644 src/main/resources/game-images/steam/buttons/invasion.play-tp.bmp
create mode 100644 src/main/resources/game-images/steam/buttons/invasion.town-tp.bmp
create mode 100644 src/main/resources/game-images/steam/labels/attendable-places/invasion-tp.bmp
diff --git a/README.md b/README.md
index ab15a755..6ca4e6b1 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ Tips 2: see help
- Linux/MacOS: run script `./help.sh`
##### Optional configuration:
-- [Configure Raid/World Boss](https://github.com/9-9-9-9/Bit-Heroes-bot/wiki/Select-Raid-World-Boss-level,-mode,..-using-%60setting%60-function):
+- [Configure Raid/World Boss/Expedition](https://github.com/9-9-9-9/Bit-Heroes-bot/wiki/Select-Raid-World-Boss-level,-mode,..-using-%60setting%60-function):
- Windows: run file `setting.bat`
- Linux/MacOS: run script `./setting.sh`
- [push notification via Telegram](https://github.com/9-9-9-9/Bit-Heroes-bot/wiki/Configure-Telegram-in-able-to-receive-notification)
diff --git a/README.release.md b/README.release.md
index 707e212d..5e42050f 100644
--- a/README.release.md
+++ b/README.release.md
@@ -48,7 +48,7 @@ Tips 2: see help
- Linux/MacOS: run script `./help.sh`
##### Optional configuration:
-- [Configure Raid/World Boss](https://github.com/9-9-9-9/Bit-Heroes-bot/wiki/Select-Raid-World-Boss-level,-mode,..-using-%60setting%60-function):
+- [Configure Raid/World Boss/Expedition](https://github.com/9-9-9-9/Bit-Heroes-bot/wiki/Select-Raid-World-Boss-level,-mode,..-using-%60setting%60-function):
- Windows: run file `setting.bat`
- Linux/MacOS: run script `./setting.sh`
- [push notification via Telegram](https://github.com/9-9-9-9/Bit-Heroes-bot/wiki/Configure-Telegram-in-able-to-receive-notification)
diff --git a/pom.xml b/pom.xml
index b26c72a9..644b0f00 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
4.0.0
bh.bot
99bot
- 1.5.8
+ 1.6.0
diff --git a/src/main/java/bh/bot/app/AbstractApplication.java b/src/main/java/bh/bot/app/AbstractApplication.java
index a2ea023c..eb08ee49 100644
--- a/src/main/java/bh/bot/app/AbstractApplication.java
+++ b/src/main/java/bh/bot/app/AbstractApplication.java
@@ -1,6 +1,7 @@
package bh.bot.app;
import bh.bot.Main;
+import bh.bot.app.farming.ExpeditionApp;
import bh.bot.common.Configuration;
import bh.bot.common.OS;
import bh.bot.common.Telegram;
@@ -27,8 +28,7 @@
import java.io.File;
import java.io.IOException;
import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.*;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Supplier;
@@ -659,30 +659,63 @@ protected void autoExit(int exitAfterXSecs, AtomicBoolean masterSwitch) {
}
}
+ private final HashMap expeditionMap =
+ this instanceof AfkApp || this instanceof ExpeditionApp
+ ? new HashMap() {{
+ /*
+ put(BwMatrixMeta.Metas.Expedition.Labels.infernoDimension, new Offset[]{
+ Configuration.screenResolutionProfile.getOffsetEnterInfernoDimensionRaleib(),
+ Configuration.screenResolutionProfile.getOffsetEnterInfernoDimensionBlemo(),
+ Configuration.screenResolutionProfile.getOffsetEnterInfernoDimensionGummy(),
+ Configuration.screenResolutionProfile.getOffsetEnterInfernoDimensionZarlock(),
+ });
+ put(BwMatrixMeta.Metas.Expedition.Labels.hallowedDimension, new Offset[]{
+ Configuration.screenResolutionProfile.getOffsetEnterHallowedDimensionGooGarum(),
+ Configuration.screenResolutionProfile.getOffsetEnterHallowedDimensionSvord(),
+ Configuration.screenResolutionProfile.getOffsetEnterHallowedDimensionTwimbo(),
+ Configuration.screenResolutionProfile.getOffsetEnterHallowedDimensionX5T34M(),
+ });
+ put(BwMatrixMeta.Metas.Expedition.Labels.jammieDimension, new Offset[]{
+ Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionZorgo(),
+ Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionYackerz(),
+ Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionVionot(),
+ Configuration.screenResolutionProfile.getOffsetEnterJammieDimensionGrampa(),
+ });
+ */
+ put(BwMatrixMeta.Metas.Expedition.Labels.idolDimension, new Offset[]{
+ Configuration.screenResolutionProfile.getOffsetEnterIdolDimensionBlubLix(),
+ Configuration.screenResolutionProfile.getOffsetEnterIdolDimensionMowhi(),
+ Configuration.screenResolutionProfile.getOffsetEnterIdolDimensionWizBot(),
+ Configuration.screenResolutionProfile.getOffsetEnterIdolDimensionAstamus(),
+ });
+ /*
+ put(BwMatrixMeta.Metas.Expedition.Labels.battleBards, new Offset[]{
+ Configuration.screenResolutionProfile.getOffsetEnterBattleBardsHero(),
+ Configuration.screenResolutionProfile.getOffsetEnterBattleBardsBurning(),
+ Configuration.screenResolutionProfile.getOffsetEnterBattleBardsMelvapaloozo(),
+ Configuration.screenResolutionProfile.getOffsetEnterBattleBardsBitstock(),
+ });
+ */
+ }}
+ : null;
+
protected boolean tryEnterExpedition(boolean doExpedition, byte place) {
- if (doExpedition && clickImage(BwMatrixMeta.Metas.Expedition.Labels.idolDimension)) {
- Point p;
- switch (place) {
- case 1:
- p = Configuration.screenResolutionProfile.getOffsetEnterIdolDimensionBlubLix().toScreenCoordinate();
- break;
- case 2:
- p = Configuration.screenResolutionProfile.getOffsetEnterIdolDimensionMowhi().toScreenCoordinate();
- break;
- case 3:
- p = Configuration.screenResolutionProfile.getOffsetEnterIdolDimensionWizBot().toScreenCoordinate();
- break;
- case 4:
- p = Configuration.screenResolutionProfile.getOffsetEnterIdolDimensionAstamus().toScreenCoordinate();
- break;
- default:
- return false;
+ if (!doExpedition)
+ return false;
+
+ for (Map.Entry entry : expeditionMap.entrySet()) {
+ if (entry.getKey() == null)
+ continue;
+
+ if (clickImage(entry.getKey())) {
+ Point p = entry.getValue()[place - 1].toScreenCoordinate();
+ mouseMoveAndClickAndHide(p);
+ sleep(5_000);
+ hideCursor();
+ return true;
}
- mouseMoveAndClickAndHide(p);
- sleep(5_000);
- hideCursor();
- return true;
}
+
return false;
}
@@ -781,7 +814,6 @@ private Point fromRelativeToAbsoluteBasedOnPreviousResult(BwMatrixMeta sampleImg
}
protected byte selectExpeditionPlace() {
- //noinspection StringBufferReplaceableByString
StringBuilder sb = new StringBuilder("Select a place to do Expedition:\n");
final Tuple2 expeditionPlaceRange = UserConfig.getExpeditionPlaceRange();
for (int i = expeditionPlaceRange._1; i <= expeditionPlaceRange._2; i++)
@@ -916,8 +948,8 @@ protected String readCfgProfileName(String ask, String desc) {
final String prefix = "readonly.";
final String suffix = ".user-config.properties";
boolean foundAny = false;
- for (File file : Arrays.stream(new File(".").listFiles())
- .filter(x -> x.isFile())
+ for (File file : Arrays.stream(Objects.requireNonNull(new File(".").listFiles()))
+ .filter(File::isFile)
.sorted().collect(Collectors.toList())) {
String name = file.getName();
if (!name.startsWith(prefix) || !name.endsWith(suffix))
diff --git a/src/main/java/bh/bot/app/AfkApp.java b/src/main/java/bh/bot/app/AfkApp.java
index eade2284..13d7d90e 100644
--- a/src/main/java/bh/bot/app/AfkApp.java
+++ b/src/main/java/bh/bot/app/AfkApp.java
@@ -126,10 +126,6 @@ private void doLoop(//
boolean doGauntlet //
) {
try {
-
- if (doInvasion && Configuration.isSteamProfile)
- throw new NotSupportedException("Invasion has not been supported on Steam mode");
-
info(ColorizeUtil.formatInfo, "\n\nStarting AFK");
boolean isUnknownGvgOrInvasionOrExpedition = (doGvg && doInvasion) || (doGvg && doExpedition)
|| (doInvasion && doExpedition);
@@ -460,7 +456,7 @@ private ArrayList getAttendablePlaces() {
MenuItem.from("Trials/Gauntlet", AttendablePlaces.trials, AttendablePlaces.gauntlet),
MenuItem.from(AttendablePlaces.pvp, AttendablePlaces.worldBoss, AttendablePlaces.raid),
MenuItem.from(AttendablePlaces.pvp, AttendablePlaces.worldBoss, AttendablePlaces.raid,
- AttendablePlaces.expedition, AttendablePlaces.trials),
+ AttendablePlaces.invasion, AttendablePlaces.gauntlet),
MenuItem.from("All", allAttendablePlaces.toArray(new AttendablePlace[0]))
).collect(Collectors.toList());
@@ -521,7 +517,7 @@ protected String getUsage() {
@Override
protected String getDescription() {
- return "It helps you AFK by automatically consume PVP/World Boss/GVG/Invasion/Trials/Gauntlet turns";
+ return "AFK automatically consume PVP/World Boss/GVG/Invasion/Trials/Gauntlet turns, thus you can away from keyboard";
}
@Override
diff --git a/src/main/java/bh/bot/app/farming/ExpeditionApp.java b/src/main/java/bh/bot/app/farming/ExpeditionApp.java
index 99653703..9be9d1e8 100644
--- a/src/main/java/bh/bot/app/farming/ExpeditionApp.java
+++ b/src/main/java/bh/bot/app/farming/ExpeditionApp.java
@@ -54,7 +54,7 @@ public static List getPredefinedImageActions() {
@Override
protected String getLimitationExplain() {
- return "This function does not support select badge cost, so choose it before turn this on";
+ return "Expedition does not support select badge cost, so choose it before turn this on";
}
@Override
diff --git a/src/main/java/bh/bot/app/farming/GauntletApp.java b/src/main/java/bh/bot/app/farming/GauntletApp.java
index 21c92ff6..8153ff2b 100644
--- a/src/main/java/bh/bot/app/farming/GauntletApp.java
+++ b/src/main/java/bh/bot/app/farming/GauntletApp.java
@@ -31,6 +31,6 @@ public static List getPredefinedImageActions() {
@Override
protected String getLimitationExplain() {
- return "This function does not support select difficulty and token cost, so choose it before turn this on";
+ return "Gauntlet does not support select difficulty and token cost, so choose it before turn this on";
}
}
diff --git a/src/main/java/bh/bot/app/farming/GvgApp.java b/src/main/java/bh/bot/app/farming/GvgApp.java
index fec317a3..6b06a36b 100644
--- a/src/main/java/bh/bot/app/farming/GvgApp.java
+++ b/src/main/java/bh/bot/app/farming/GvgApp.java
@@ -32,6 +32,6 @@ public static List getPredefinedImageActions() {
@Override
protected String getLimitationExplain() {
- return "This function does not support select badge cost, so choose it before turn this on";
+ return "GVG does not support select badge cost, so choose it before turn this on";
}
}
\ No newline at end of file
diff --git a/src/main/java/bh/bot/app/farming/InvasionApp.java b/src/main/java/bh/bot/app/farming/InvasionApp.java
index 3765729e..e2a696ad 100644
--- a/src/main/java/bh/bot/app/farming/InvasionApp.java
+++ b/src/main/java/bh/bot/app/farming/InvasionApp.java
@@ -31,6 +31,6 @@ public static List getPredefinedImageActions() {
@Override
protected String getLimitationExplain() {
- return "This function does not support select badge cost, so choose it before turn this on";
+ return "Invasion does not support select badge cost, so choose it before turn this on";
}
}
diff --git a/src/main/java/bh/bot/app/farming/PvpApp.java b/src/main/java/bh/bot/app/farming/PvpApp.java
index d5193f7c..595863d0 100644
--- a/src/main/java/bh/bot/app/farming/PvpApp.java
+++ b/src/main/java/bh/bot/app/farming/PvpApp.java
@@ -33,6 +33,6 @@ public static List getPredefinedImageActions() {
@Override
protected String getLimitationExplain() {
- return "This function only hit first opponent and does not support select PVP ticket cost, so choose it before turn this on";
+ return "PVP only hit first opponent and does not support select PVP ticket cost, so choose it before turn this on";
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/bh/bot/app/farming/TrialsApp.java b/src/main/java/bh/bot/app/farming/TrialsApp.java
index 6628cdd8..d618cb52 100644
--- a/src/main/java/bh/bot/app/farming/TrialsApp.java
+++ b/src/main/java/bh/bot/app/farming/TrialsApp.java
@@ -31,6 +31,6 @@ public static List getPredefinedImageActions() {
@Override
protected String getLimitationExplain() {
- return "This function does not support select difficulty and token cost, so choose it before turn this on";
+ return "Trials does not support select difficulty and token cost, so choose it before turn this on";
}
}
diff --git a/src/main/java/bh/bot/app/farming/WorldBossApp.java b/src/main/java/bh/bot/app/farming/WorldBossApp.java
index 008ef352..81a87cfa 100644
--- a/src/main/java/bh/bot/app/farming/WorldBossApp.java
+++ b/src/main/java/bh/bot/app/farming/WorldBossApp.java
@@ -66,6 +66,6 @@ public static List getPredefinedImageActions() {
@Override
protected String getLimitationExplain() {
- return "This function is solo only and does not support select mode of World Boss (Normal/Hard/Heroic), only select by default So which boss do you want to hit? Choose it before turn this on";
+ return "World Boss is solo only and does not support select mode of World Boss (Normal/Hard/Heroic), only select by default So which boss do you want to hit? Choose it before turn this on";
}
}
diff --git a/src/main/java/bh/bot/common/Configuration.java b/src/main/java/bh/bot/common/Configuration.java
index cb8a0154..cde3299d 100644
--- a/src/main/java/bh/bot/common/Configuration.java
+++ b/src/main/java/bh/bot/common/Configuration.java
@@ -75,7 +75,7 @@ public static void loadSystemConfig(final ParseArgumentsResult parseArgumentsRes
if (isBlank(profileName))
throw new InvalidDataException("profileName");
- warn("You must move the Bit Heroes game's window to top left corner of your screen or provide exactly screen offset into the 'offset.screen.x & y' keys");
+ warn("You must move the Bit Heroes game's window to top left corner of your screen or provide exactly screen offset into the 'offset.screen.x & y' keys. See more: https://github.com/9-9-9-9/Bit-Heroes-bot/wiki/Manually-setting-game-screen-coordinate");
if (isSteamProfile)
warn("Your Bit Heroes game window must be 800x480. You can check it by open Settings, see the Windowed option");
diff --git a/src/main/java/bh/bot/common/jna/MiniClientLinuxJna.java b/src/main/java/bh/bot/common/jna/MiniClientLinuxJna.java
index ba3e3bbb..73537891 100644
--- a/src/main/java/bh/bot/common/jna/MiniClientLinuxJna.java
+++ b/src/main/java/bh/bot/common/jna/MiniClientLinuxJna.java
@@ -36,9 +36,8 @@ public void internalTryToCloseGameWindow() throws Exception {
debug("internalTryToCloseGameWindow: Output of ps command has invalid format: %s", psOutput);
continue;
}
- int pid = Integer.parseInt(spl[0]);
- startProcess("kill", "-9", String.valueOf(pid));
+ int pid = Integer.parseInt(spl[0]);
new ProcessBuilder(new String[]{
"kill", "-9", String.valueOf(pid)
}).start().waitFor();
diff --git a/src/main/java/bh/bot/common/types/ScreenResolutionProfile.java b/src/main/java/bh/bot/common/types/ScreenResolutionProfile.java
index 0f888ae7..533118e0 100644
--- a/src/main/java/bh/bot/common/types/ScreenResolutionProfile.java
+++ b/src/main/java/bh/bot/common/types/ScreenResolutionProfile.java
@@ -1,9 +1,11 @@
package bh.bot.common.types;
+import bh.bot.common.exceptions.NotImplementedException;
import bh.bot.common.types.tuples.Tuple4;
import java.awt.*;
+@SuppressWarnings("SpellCheckingInspection")
public abstract class ScreenResolutionProfile {
public abstract String getName();
@@ -99,6 +101,46 @@ public abstract class ScreenResolutionProfile {
public abstract Offset getOffsetEnterIdolDimensionAstamus();
+ public abstract Offset getOffsetLabelInfernoDimension();
+
+ public abstract Offset getOffsetEnterInfernoDimensionRaleib();
+
+ public abstract Offset getOffsetEnterInfernoDimensionBlemo();
+
+ public abstract Offset getOffsetEnterInfernoDimensionGummy();
+
+ public abstract Offset getOffsetEnterInfernoDimensionZarlock();
+
+ public abstract Offset getOffsetLabelHallowedDimension();
+
+ public abstract Offset getOffsetEnterHallowedDimensionGooGarum();
+
+ public abstract Offset getOffsetEnterHallowedDimensionSvord();
+
+ public abstract Offset getOffsetEnterHallowedDimensionTwimbo();
+
+ public abstract Offset getOffsetEnterHallowedDimensionX5T34M();
+
+ public abstract Offset getOffsetLabelJammieDimension();
+
+ public abstract Offset getOffsetEnterJammieDimensionZorgo();
+
+ public abstract Offset getOffsetEnterJammieDimensionYackerz();
+
+ public abstract Offset getOffsetEnterJammieDimensionVionot();
+
+ public abstract Offset getOffsetEnterJammieDimensionGrampa();
+
+ public abstract Offset getOffsetLabelBattleBards();
+
+ public abstract Offset getOffsetEnterBattleBardsHero();
+
+ public abstract Offset getOffsetEnterBattleBardsBurning();
+
+ public abstract Offset getOffsetEnterBattleBardsMelvapaloozo();
+
+ public abstract Offset getOffsetEnterBattleBardsBitstock();
+
public abstract Offset getOffsetDialogNotEnoughInvasionBadges();
public abstract Offset getOffsetButtonPlayTrials();
@@ -491,6 +533,106 @@ public Offset getOffsetEnterIdolDimensionAstamus() {
return new Offset(400, 311);
}
+ @Override
+ public Offset getOffsetLabelInfernoDimension() {
+ throw new NotImplementedException("Inferno Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterInfernoDimensionRaleib() {
+ throw new NotImplementedException("Inferno Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterInfernoDimensionBlemo() {
+ throw new NotImplementedException("Inferno Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterInfernoDimensionGummy() {
+ throw new NotImplementedException("Inferno Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterInfernoDimensionZarlock() {
+ throw new NotImplementedException("Inferno Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetLabelHallowedDimension() {
+ throw new NotImplementedException("Hallowed Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterHallowedDimensionGooGarum() {
+ throw new NotImplementedException("Hallowed Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterHallowedDimensionSvord() {
+ throw new NotImplementedException("Hallowed Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterHallowedDimensionTwimbo() {
+ throw new NotImplementedException("Hallowed Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterHallowedDimensionX5T34M() {
+ throw new NotImplementedException("Hallowed Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetLabelJammieDimension() {
+ throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterJammieDimensionZorgo() {
+ throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterJammieDimensionYackerz() {
+ throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterJammieDimensionVionot() {
+ throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterJammieDimensionGrampa() {
+ throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetLabelBattleBards() {
+ throw new NotImplementedException("Battle Bards of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterBattleBardsHero() {
+ throw new NotImplementedException("Battle Bards of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterBattleBardsBurning() {
+ throw new NotImplementedException("Battle Bards of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterBattleBardsMelvapaloozo() {
+ throw new NotImplementedException("Battle Bards of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterBattleBardsBitstock() {
+ throw new NotImplementedException("Battle Bards of Expedition has not yet been implemented");
+ }
+
@Override
public Offset getOffsetButtonAcceptExpedition() {
return new Offset(474, 457);
@@ -661,17 +803,17 @@ public Offset getOffsetDialogNotEnoughPvpTicket() {
@Override
public Offset getOffsetButtonPlayInvasion() {
- return null;
+ return new Offset(513, 250);
}
@Override
public Offset getOffsetButtonAcceptInvasion() {
- return null;
+ return new Offset(470, 424);
}
@Override
public Offset getOffsetButtonTownAfterCompetedInvasion() {
- return null;
+ return new Offset(388, 435);
}
@Override
@@ -839,6 +981,106 @@ public Offset getOffsetEnterIdolDimensionAstamus() {
return new Offset(400, 286);
}
+ @Override
+ public Offset getOffsetLabelInfernoDimension() {
+ throw new NotImplementedException("Inferno Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterInfernoDimensionRaleib() {
+ throw new NotImplementedException("Inferno Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterInfernoDimensionBlemo() {
+ throw new NotImplementedException("Inferno Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterInfernoDimensionGummy() {
+ throw new NotImplementedException("Inferno Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterInfernoDimensionZarlock() {
+ throw new NotImplementedException("Inferno Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetLabelHallowedDimension() {
+ throw new NotImplementedException("Hallowed Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterHallowedDimensionGooGarum() {
+ throw new NotImplementedException("Hallowed Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterHallowedDimensionSvord() {
+ throw new NotImplementedException("Hallowed Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterHallowedDimensionTwimbo() {
+ throw new NotImplementedException("Hallowed Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterHallowedDimensionX5T34M() {
+ throw new NotImplementedException("Hallowed Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetLabelJammieDimension() {
+ throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterJammieDimensionZorgo() {
+ throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterJammieDimensionYackerz() {
+ throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterJammieDimensionVionot() {
+ throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterJammieDimensionGrampa() {
+ throw new NotImplementedException("Jammie Dimension of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetLabelBattleBards() {
+ throw new NotImplementedException("Battle Bards of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterBattleBardsHero() {
+ throw new NotImplementedException("Battle Bards of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterBattleBardsBurning() {
+ throw new NotImplementedException("Battle Bards of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterBattleBardsMelvapaloozo() {
+ throw new NotImplementedException("Battle Bards of Expedition has not yet been implemented");
+ }
+
+ @Override
+ public Offset getOffsetEnterBattleBardsBitstock() {
+ throw new NotImplementedException("Battle Bards of Expedition has not yet been implemented");
+ }
+
@Override
public Offset getOffsetButtonAcceptExpedition() {
return new Offset(469, 424);
diff --git a/src/main/java/bh/bot/common/types/images/BwMatrixMeta.java b/src/main/java/bh/bot/common/types/images/BwMatrixMeta.java
index 54ed7623..5646c097 100644
--- a/src/main/java/bh/bot/common/types/images/BwMatrixMeta.java
+++ b/src/main/java/bh/bot/common/types/images/BwMatrixMeta.java
@@ -274,7 +274,11 @@ public static class Buttons {
}
public static class Labels {
+ public static BwMatrixMeta infernoDimension;
+ public static BwMatrixMeta hallowedDimension;
+ public static BwMatrixMeta jammieDimension;
public static BwMatrixMeta idolDimension;
+ public static BwMatrixMeta battleBards;
}
}
diff --git a/src/main/java/bh/bot/common/utils/InteractionUtil.java b/src/main/java/bh/bot/common/utils/InteractionUtil.java
index 9fb5e627..36d8ca81 100644
--- a/src/main/java/bh/bot/common/utils/InteractionUtil.java
+++ b/src/main/java/bh/bot/common/utils/InteractionUtil.java
@@ -66,10 +66,6 @@ public static void mouseMoveAndClickAndHide(Point p) {
moveCursor(p);
sleep(300);
mouseClick();
- // sleep(200);
- // moveCursor(p);
- // sleep(100);
- // mouseClick();
sleep(200);
hideCursor();
}
@@ -81,7 +77,8 @@ public static void hideCursor() {
public static void clickRadioButton(int level, Point[] points, String evName) {
if (level < 1 || level > points.length)
throw new InvalidDataException(
- "Can not select level %d of %s because it's not exists, do you setup wrongly?", level, evName);
+ "Can not select level %d of %s because it's not exists, do you setup wrongly?", level, evName
+ );
Point p = points[level - 1];
moveCursor(new Point(p.x + 7, p.y + 7));
sleep(500);
@@ -161,7 +158,8 @@ public Point findAttendablePlace(AttendablePlace event) {
stepY = backwardScanLeftAttendablePlaces._3;
maxX = backwardScanLeftAttendablePlaces._4;
} else { // right
- Tuple4 backwardScanRightAttendablePlaces = Configuration.screenResolutionProfile
+ Tuple4 backwardScanRightAttendablePlaces = Configuration
+ .screenResolutionProfile
.getBackwardScanRightSideAttendablePlaces();
minX = backwardScanRightAttendablePlaces._1;
firstY = backwardScanRightAttendablePlaces._2;
diff --git a/src/main/resources/game-images/steam/buttons/invasion.accept-tp.bmp b/src/main/resources/game-images/steam/buttons/invasion.accept-tp.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..66936b9b908a89aa24cb201d47bddda28d6e2b53
GIT binary patch
literal 3834
zcmd5<+e;j06u19C^V+$sdvkJYOtv8|X##4jU9&cgt;HlZQm9>vL}L^1MF?ncQ&CzZ
zl%ir$5|Y}7(BcIIF(O8yFQHJx2l4Xa?M0tN@FB@>JkH@{XPj(GXnL6a_BZGI&H29H
zcRBOTxeGh*XY5)I%0u{-;&%YQ_cA^}nUV2iuYUJtuXwR*%gf8UuB-W{w2HW*D3g1=z^!TqQNrr#>d2o`CK3rEsL^Z!e!qWhZ7qd{+o7SMJ?5dXa_k`CuC6X8lRX6m
z1)vob6|twiy&WF?&i9#rcY9pgl^AGKQ&aTd+}s>))%aO@1p3MEtsRe)m6cUjS2s2`
zat9=6XlOufNl6Kqnx+B6*4Ni1hw$+5Fx7$yBi!5D>twR$oolbHt>w<_2P!KoA;&O`
z)z#JgIOHD~7}%ArbaZrhGg14$(vDgF*0!dmChojb`{?MXO|-{m;Xk
z$G@sRLu!{y!mX{X)=(nT2K|xWoADH`aCtF2Jdc#;1I4*i%X!`zjXd7kPu#zK+A0BZfR*j%ws>_d{gbuh4D~$XwSY|uZ99>OByD~
zReSjIc}Zg|wR8JhTU)Q4cP0aHZ~vWkyx*hI=yBW9$#rI3IV2$0J+jT2=V`x(u6~wz
z<|J~RO?-q6OY)`mSS)6@e;l>OscbZX>uB2#it);R$JvINNF6EK%^O$g!QiDL#7SB6
z{^DG!zT*%DL!AZuI+27xfIDs!e
y$+~vQyj~tCwT?rbot>^^a$=_|J|l4PoNDOM?#d+X=z#I@M+k_W=t`4L%==5j_uAh8
literal 0
HcmV?d00001
diff --git a/src/main/resources/game-images/steam/buttons/invasion.play-tp.bmp b/src/main/resources/game-images/steam/buttons/invasion.play-tp.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..37b3d89fdc7eb9fa076efdfe201008464566d585
GIT binary patch
literal 2350
zcmd6o&ubb%6vsEW_R@3K-Hi|=DTRjil8}Qz7lTOC)*M2b9Ft;cXb8w&f_N#tSkr@-
zig*y((jEj)J@#1Q4?GBh5y7*6Le)$1-F?kt+#eyt1oD`jnVt9M&1c`6nblt|J(Mh2
zM*SF%**?NEBh8|gq~QarnW)Y$C6!9avivozwaR{5IoMU9BI)&dmow~bv)Lq@OeVv+
zcs!25Pe-PQTrS7s(P-4K$$yIGT7SR!7XorH7-Vg+ScHB0y$Y=)@$eOl8@hrSKP(vx
z20X>qxd)8hZkM6{xk8_LRa(~THMyuNv%*p3!nvxa##L`Kmi62Q9!XJ$^rsn8Y!awrrcGuF0REsW&z
zd3X~TSNFeWxnsx#n@&k8W|i0F%9w4gdfE
literal 0
HcmV?d00001
diff --git a/src/main/resources/game-images/steam/buttons/invasion.town-tp.bmp b/src/main/resources/game-images/steam/buttons/invasion.town-tp.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..b9c7ad55a6bb2e92517af9e13b40f46bd72097f0
GIT binary patch
literal 2134
zcmZ?r4dY+{12Z700mP<2%nQVf3=%++fk6Q(59UCLF#orvMpcrMl9w-E{tpH{Jv~6K
zo8u0kRDjnFd3ik`7YJt0o()leOqQ3ILu6%SR3MD5t}bK+m~1O6D~L)UIe-3qh=KzL
z4gk4UX5EsKQUwJC5W%-^-!kBLpRfB_ptjP|(mQwVJbCg2)3UpF?*gT~yu5(sW@Kal
z*)Lzd#8ieX0#tMH;zfuPspdY21z)~=S%?JSw!+;97lEjH^ym>pWYwxwK#`RzS3&RdyP6
z-+xg4$WQ<1U|RzWe6;)<8N3@Pl@xseC|
zl=2yF2UdoiogK3Ku&MzHQeM7bH5rsYuu8xMA?}Ncib_vUhnMwmSsT=G^<`>(3|L&OTu@<8|VFiuV!6
zW8}E+ck4UnZuos+rm`o-qJeSM)d_I|6;2!gcfeSqz
zk3YZQ1AzeMolZxs7Mjf_#nYJ0X0eOsg7vmn#6qEf
zkktwr{fQ&x}