Skip to content

Commit

Permalink
Fix bot for new BH version (trials + gvg + world boss + AFK) (#83)
Browse files Browse the repository at this point in the history
* fixed trials

* update README

* fixed GVG plus replaced some other images

* replaced an image

* fixed world-boss (solo)

* fixed world boss (team)

* enable AFK + update version to 3.0.0

* blind fix for gauntlet and invasion

* remove un-used image "close"

* blind replace some images for expedition

* disable bribe feature

* force update v2 to v3

* replace image

* I'm ready

Co-authored-by: 9-9-9-9 <9-9-9-9>
  • Loading branch information
9-9-9-9 authored Nov 17, 2022
1 parent 79956c9 commit d866086
Show file tree
Hide file tree
Showing 73 changed files with 71 additions and 75 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
## Sadly, most functions bot no longer works with new update Nov 16th, 2022
### Fixed functions:
## Welcome Bit Verse
### Fixed functions since new BH update Nov 16, 2022:
- [x] Fishing (2.11.0)
- [x] ReRun (2.11.0)
- [x] Raid (2.12.0)
- [x] PVP (2.12.0)
- [ ] WB Solo
- [ ] WB Team
- [ ] GVG
- [x] Trials (3.0.0)
- [x] GVG (3.0.0)
- [x] WB Solo (3.0.0)
- [x] WB Team (3.0.0)
- [x] AFK (3.0.0)
- [ ] Invasion
- [ ] Idol Dimension (Expedition)
- [ ] Inferno Dimension (Expedition)
- [ ] Hallowed Dimension (Expedition)
- [ ] Jammie Dimension (Expedition)
- [ ] Battle Bards (Expedition)
- [ ] Trials
- [ ] Gauntlet
- [ ] AFK
## To the folks who using this bot but not giving this repo a Star: Fvck U

___
**Upgrade notes:** copy configuration files `user-config.properties` and `readonly.*.user-config.properties` from previous bot version's directory _(if you update the bot via auto-update method then no need to do this)_
Expand All @@ -30,7 +31,7 @@ ___
[Wiki](https://github.com/9-9-9-9/Bit-Heroes-bot/wiki)

> To the guys who using this bot but not giving this repo a Star: Fvck U
> To the folks who using this bot but not giving this repo a Star: Fvck U
___
Supports **English user interface only** of [Bit Heroes on Steam](https://github.com/9-9-9-9/Bit-Heroes-bot/wiki/Does-this-bot-supports-Steam-version-of-Bit-Heroes%3F) and [Bit Heroes on web](https://www.kongregate.com/games/Juppiomenz/bit-heroes) + [mini-client](https://github.com/9-9-9-9/Bit-Heroes-bot/wiki/Function-%22client%22-(mini-client-on-Chrome))

Expand Down
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.12.0</version>
<version>3.0.0</version>

<dependencies>
<dependency>
Expand Down
35 changes: 21 additions & 14 deletions src/main/java/bh/bot/app/AbstractApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,10 @@ protected void internalDoSmallTasks(AtomicBoolean masterSwitch, SmallTasks st) {
}
}

for (Familiar f : argumentInfo.familiarToBribeWithGems)
warn("Will persuade %s with gems", f.name());
/* // TODO enable this if Bribe feature to be enabled again
for (Familiar f : argumentInfo.familiarToBribeWithGems)
warn("Will persuade %s with gems", f.name());
*/
}

if (st.persuade && argumentInfo.disablePersuade)
Expand Down Expand Up @@ -902,19 +904,21 @@ private long doPersuade(AtomicInteger continousPersuadeScreen) {

boolean doPersuadeGold = true;

if (argumentInfo.familiarToBribeWithGems.size() > 0) {
for (Tuple2<BwMatrixMeta, Familiar> target : persuadeTargets) {
PersuadeState ps = persuade(target._1, target._2, pPersuadeButton, pBribeButton);
if (ps == PersuadeState.NotAvailable) {
doPersuadeGold = false;
break;
}
if (ps == PersuadeState.SuccessGem || ps == PersuadeState.SuccessGold) {
doPersuadeGold = false;
break;
/* // TODO enable this if Bribe feature to be enabled again
if (argumentInfo.familiarToBribeWithGems.size() > 0) {
for (Tuple2<BwMatrixMeta, Familiar> target : persuadeTargets) {
PersuadeState ps = persuade(target._1, target._2, pPersuadeButton, pBribeButton);
if (ps == PersuadeState.NotAvailable) {
doPersuadeGold = false;
break;
}
if (ps == PersuadeState.SuccessGem || ps == PersuadeState.SuccessGold) {
doPersuadeGold = false;
break;
}
}
}
}
*/

if (doPersuadeGold) {
dev("doPersuadeGold");
Expand Down Expand Up @@ -1101,8 +1105,11 @@ private long autoReactiveAuto(AtomicInteger continousRed) {
}

private long closeEnterGameDialogNews() {
if (clickImage(BwMatrixMeta.Metas.Globally.Dialogs.news))
if (clickImage(BwMatrixMeta.Metas.Globally.Dialogs.news)) {
sendEscape();
info("Ya I'm here");

}
return addSec(closeEnterGameDialogNewsSleepSecs);
}

Expand Down
5 changes: 1 addition & 4 deletions src/main/java/bh/bot/app/dev/TestApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ public class TestApp extends AbstractApplication {
protected void internalRun(String[] args) {
adjustScreenOffset();

System.out.println("Clicked play = " + clickImage(BwMatrixMeta.Metas.PvpArena.Buttons.play));
System.out.println("Clicked accept = " + clickImage(BwMatrixMeta.Metas.PvpArena.Buttons.accept));
System.out.println("Clicked fight1 = " + clickImage(BwMatrixMeta.Metas.PvpArena.Buttons.fight1));
System.out.println("Clicked tnf = " + clickImage(BwMatrixMeta.Metas.Globally.Dialogs.confirmStartNotFullTeam));
System.out.println("Clicked U = " + clickImage(BwMatrixMeta.Metas.WorldBoss.Buttons.unready));

//
}
Expand Down
82 changes: 37 additions & 45 deletions src/main/java/bh/bot/common/types/images/BwMatrixMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ public static class Buttons {
public static BwMatrixMeta autoG;
public static BwMatrixMeta autoR;
public static BwMatrixMeta radioButton;
// public static BwMatrixMeta close;
public static BwMatrixMeta mapButtonOnFamiliarUi;
public static BwMatrixMeta persuade;
public static BwMatrixMeta persuadeBribe;
Expand Down Expand Up @@ -396,13 +395,6 @@ public static void load() throws IOException {
Offset.none(), //
0x000000
);
/*
Metas.Globally.Buttons.close = BwMatrixMeta.from(//
"buttons/globally.close?",
Offset.none(), //
0x000000
);
*/
Metas.Globally.Buttons.mapButtonOnFamiliarUi = BwMatrixMeta.from(//
"buttons/globally.map-on-familiar-ui2?",
Configuration.screenResolutionProfile.getOffsetButtonMapOnFamiliarUi(), //
Expand All @@ -419,7 +411,7 @@ public static void load() throws IOException {
0xFFFFFF
);
Metas.Globally.Dialogs.confirmQuitBattle = BwMatrixMeta.from(//
"dialogs/globally.confirm-quit-battle?",
"dialogs/globally.confirm-quit-battle2?",
Configuration.screenResolutionProfile.getOffsetDialogConfirmQuitBattle(), //
0xFFFFFF
);
Expand All @@ -429,17 +421,17 @@ public static void load() throws IOException {
0xFFFFFF
);
Metas.Globally.Dialogs.areYouStillThere = BwMatrixMeta.from(//
"dialogs/globally.are-you-still-there?",
"dialogs/globally.are-you-still-there2?",
Configuration.screenResolutionProfile.getOffsetDialogAreYouStillThere(), //
0xFFFFFF
);
Metas.Globally.Dialogs.areYouSureWantToExit = BwMatrixMeta.from(//
"dialogs/globally.are-you-sure-want-to-exit?",
"dialogs/globally.are-you-sure-want-to-exit2?",
Configuration.screenResolutionProfile.getOffsetDialogAreYouSureWantToExit(), //
0xFFFFFF
);
Metas.Globally.Dialogs.news = BwMatrixMeta.from(//
"dialogs/globally.news?",
"dialogs/globally.news2?",
Configuration.screenResolutionProfile.getOffsetDialogNews(), //
0xFFFFFF
);
Expand Down Expand Up @@ -519,77 +511,77 @@ public static void load() throws IOException {

// World Boss
Metas.WorldBoss.Buttons.summonOnListingPartiesWorldBoss = BwMatrixMeta.from(//
"buttons/world-boss.summon-party?",
"buttons/world-boss.summon-party2?",
Configuration.screenResolutionProfile.getOffsetButtonSummonOnListingPartiesWorldBoss(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.summonOnListingWorldBosses = BwMatrixMeta.from(//
"buttons/world-boss.summon-boss?",
"buttons/world-boss.summon-boss2?",
Configuration.screenResolutionProfile.getOffsetButtonSummonOnListingWorldBosses(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.summonOnSelectingWorldBossTierAndAndDifficulty = BwMatrixMeta.from(//
"buttons/world-boss.summon-tier-diff?",
"buttons/world-boss.summon-tier-diff2?",
Configuration.screenResolutionProfile.getOffsetButtonSummonOnSelectingWorldBossTierAndDifficulty(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.startBoss = BwMatrixMeta.from(//
"buttons/world-boss.start-boss?",
"buttons/world-boss.start-boss2?",
Configuration.screenResolutionProfile.getOffsetButtonStartWorldBoss(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.regroup = BwMatrixMeta.from(//
"buttons/world-boss.regroup-win?",
"buttons/world-boss.regroup2?",
Configuration.screenResolutionProfile.getOffsetButtonRegroupWorldBoss(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.regroupOnDefeated = BwMatrixMeta.from(//
"buttons/world-boss.regroup-lose?",
"buttons/world-boss.regroup2?",
Configuration.screenResolutionProfile.getOffsetButtonRegroupAfterDefeatByWorldBoss(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.ready = BwMatrixMeta.from(//
"buttons/world-boss.ready?",
"buttons/world-boss.ready2?",
Configuration.screenResolutionProfile.getOffsetButtonReadyWorldBossTeam(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.unready = BwMatrixMeta.from(//
"buttons/world-boss.unready?",
"buttons/world-boss.unready2?",
Configuration.screenResolutionProfile.getOffsetButtonUnReadyWorldBossTeam(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.invite1 = BwMatrixMeta.from(//
"buttons/world-boss.invite?",
"buttons/world-boss.invite2?",
Configuration.screenResolutionProfile.getOffsetButtonInvite1WorldBossTeam(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.invite2 = BwMatrixMeta.from(//
"buttons/world-boss.invite?",
"buttons/world-boss.invite2?",
Configuration.screenResolutionProfile.getOffsetButtonInvite2WorldBossTeam(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.invite3 = BwMatrixMeta.from(//
"buttons/world-boss.invite?",
"buttons/world-boss.invite2?",
Configuration.screenResolutionProfile.getOffsetButtonInvite3WorldBossTeam(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.invite4 = BwMatrixMeta.from(//
"buttons/world-boss.invite?",
"buttons/world-boss.invite2?",
Configuration.screenResolutionProfile.getOffsetButtonInvite4WorldBossTeam(), //
0xFFFFFF
);
Metas.WorldBoss.Buttons.invite5 = BwMatrixMeta.from(//
"buttons/world-boss.invite?",
"buttons/world-boss.invite2?",
Configuration.screenResolutionProfile.getOffsetButtonInvite5WorldBossTeam(), //
0xFFFFFF
);
Metas.WorldBoss.Dialogs.notEnoughXeals = BwMatrixMeta.from(//
"dialogs/world-boss.not-enough-xeals?",
"dialogs/world-boss.not-enough-xeals2?",
Configuration.screenResolutionProfile.getOffsetDialogNotEnoughXeals(), //
0xFFFFFF
);
Metas.WorldBoss.Labels.labelInSummonDialog = BwMatrixMeta.from(//
"labels/world-boss-tp.bmp", //
"labels/world-boss.world-boss2?", //
Configuration.screenResolutionProfile.getOffsetLabelWorldBossInSummonDialog(), //
0xFFFFFF
);
Expand Down Expand Up @@ -628,29 +620,29 @@ public static void load() throws IOException {

// Invasion
Metas.Invasion.Buttons.play = BwMatrixMeta.from(//
"buttons/invasion.play?",
"buttons/invasion.play2?",
Configuration.screenResolutionProfile.getOffsetButtonPlayInvasion(), //
0xFFFFFF
);
Metas.Invasion.Buttons.accept = BwMatrixMeta.from(//
"buttons/invasion.accept?",
"buttons/invasion.accept2?",
Configuration.screenResolutionProfile.getOffsetButtonAcceptInvasion(), //
0xFFFFFF
);
Metas.Invasion.Buttons.town = BwMatrixMeta.from(//
"buttons/invasion.town?",
"buttons/invasion.town2?",
Configuration.screenResolutionProfile.getOffsetButtonTownAfterCompetedInvasion(), //
0xFFFFFF
);
Metas.Invasion.Dialogs.notEnoughBadges = BwMatrixMeta.from(//
"dialogs/invasion.not-enough-badges?",
"dialogs/invasion.not-enough-badges2?",
Configuration.screenResolutionProfile.getOffsetDialogNotEnoughInvasionBadges(), //
0xFFFFFF
);

// Expedition
Metas.Expedition.Buttons.play = BwMatrixMeta.from(//
"buttons/expedition.play?",
"buttons/expedition.play2?",
Configuration.screenResolutionProfile.getOffsetButtonPlayExpedition(), //
0xFFFFFF
);
Expand All @@ -660,12 +652,12 @@ public static void load() throws IOException {
0xFFFFFF
);
Metas.Expedition.Buttons.accept = BwMatrixMeta.from(//
"buttons/expedition.accept?",
"buttons/expedition.accept2?",
Configuration.screenResolutionProfile.getOffsetButtonAcceptExpedition(), //
0xFFFFFF
);
Metas.Expedition.Buttons.town = BwMatrixMeta.from(//
"buttons/expedition.town?",
"buttons/expedition.town2?",
Configuration.screenResolutionProfile.getOffsetButtonTownAfterCompetedExpedition(), //
0xFFFFFF
);
Expand Down Expand Up @@ -697,61 +689,61 @@ public static void load() throws IOException {

// Trials
Metas.Trials.Buttons.play = BwMatrixMeta.from(//
"buttons/trials.play?",
"buttons/trials.play2?",
Configuration.screenResolutionProfile.getOffsetButtonPlayTrials(), //
0xFFFFFF
);
Metas.Trials.Buttons.accept = BwMatrixMeta.from(//
"buttons/trials.accept?",
"buttons/trials.accept2?",
Configuration.screenResolutionProfile.getOffsetButtonAcceptTrials(), //
0xFFFFFF
);
Metas.Trials.Buttons.town = BwMatrixMeta.from(//
"buttons/trials.town?",
"buttons/trials.town2?",
Configuration.screenResolutionProfile.getOffsetButtonTownAfterCompetedTrials(), //
0xFFFFFF
);
Metas.Trials.Dialogs.notEnoughTokens = BwMatrixMeta.from(//
"dialogs/trials.not-enough-tokens?",
"dialogs/trials.not-enough-tokens2?",
Configuration.screenResolutionProfile.getOffsetDialogNotEnoughTrialsTokens(), //
0xFFFFFF
);

// GVG
Metas.Gvg.Buttons.play = BwMatrixMeta.from(//
"buttons/gvg.play?",
"buttons/gvg.play2?",
Configuration.screenResolutionProfile.getOffsetButtonPlayGvg(), //
0xFFFFFF
);
Metas.Gvg.Buttons.fight = BwMatrixMeta.from(//
"buttons/gvg.fight?",
"buttons/gvg.fight2?",
Configuration.screenResolutionProfile.getOffsetButtonFight1Gvg(), //
0xFFFFFF
);
Metas.Gvg.Buttons.accept = BwMatrixMeta.from(//
"buttons/gvg.accept?",
"buttons/gvg.accept2?",
Configuration.screenResolutionProfile.getOffsetButtonAcceptGvg(), //
0xFFFFFF
);
Metas.Gvg.Buttons.town = BwMatrixMeta.from(//
"buttons/gvg.town?",
"buttons/gvg.town2?",
Configuration.screenResolutionProfile.getOffsetButtonTownAfterCompetedGvg(), //
0xFFFFFF
);

// Gauntlet
Metas.Gauntlet.Buttons.play = BwMatrixMeta.from(//
"buttons/gauntlet.play?", //
"buttons/gauntlet.play2?", //
Configuration.screenResolutionProfile.getOffsetButtonPlayGauntlet(), //
0xFFFFFF
);
Metas.Gauntlet.Buttons.accept = BwMatrixMeta.from(//
"buttons/gauntlet.accept?", //
"buttons/gauntlet.accept2?", //
Configuration.screenResolutionProfile.getOffsetButtonAcceptGauntlet(), //
0xFFFFFF
);
Metas.Gauntlet.Buttons.town = BwMatrixMeta.from(//
"buttons/gauntlet.town?", //
"buttons/gauntlet.town2?", //
Configuration.screenResolutionProfile.getOffsetButtonTownAfterCompetedGauntlet(), //
0xFFFFFF
);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 2 additions & 3 deletions web/json/reject-versions-2.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"bv": ["2.10.1","2.10.0","2.9.3","2.9.2","2.9.1","2.9.0","2.8.6","2.8.5","2.8.4","2.8.3","2.8.2","2.8.1","2.8.0","2.7.0","2.6.0","2.5.0","2.4.0","2.3.0","2.2.0","2.1.0","2.0.1","2.0.0"],
"bv": ["2.12.0","2.11.0","2.10.1","2.10.0","2.9.3","2.9.2","2.9.1","2.9.0","2.8.6","2.8.5","2.8.4","2.8.3","2.8.2","2.8.1","2.8.0","2.7.0","2.6.0","2.5.0","2.4.0","2.3.0","2.2.0","2.1.0","2.0.1","2.0.0"],
"bf": {
"2.12.0": ["afk","world-boss","world-boss-team","expedition","invasion","gvg","trials","gauntlet"],
"2.11.0": ["afk","world-boss","world-boss-team","expedition","invasion","gvg","trials","gauntlet","raid","pvp"]
"3.0.0": ["expedition","invasion","gauntlet"]
}
}

0 comments on commit d866086

Please sign in to comment.