From 814a96a62db6cec291e956477c42fb034161649a Mon Sep 17 00:00:00 2001 From: DARE Date: Sun, 9 Apr 2023 10:53:45 -0700 Subject: [PATCH 1/3] fix expedition for idol dimension --- .../bh/bot/common/jna/MiniClientWindowsJna.java | 2 +- .../common/types/ScreenResolutionProfile.java | 8 ++++---- .../bot/common/types/images/BwMatrixMeta.java | 2 +- .../labels/expedition.idol-dimension2-tp.bmp | Bin 0 -> 21582 bytes 4 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/game-images/800x520/labels/expedition.idol-dimension2-tp.bmp diff --git a/src/main/java/bh/bot/common/jna/MiniClientWindowsJna.java b/src/main/java/bh/bot/common/jna/MiniClientWindowsJna.java index 5f3edb3..b480611 100644 --- a/src/main/java/bh/bot/common/jna/MiniClientWindowsJna.java +++ b/src/main/java/bh/bot/common/jna/MiniClientWindowsJna.java @@ -57,7 +57,7 @@ public Tuple4 locateGameScreenOffset(Desktop if (rect.width <= 0 || rect.height <= 0) return new Tuple4<>(false, "Window has minimized", null, null); - Offset offset = new Offset(rect.x, rect.y+45); + Offset offset = new Offset(rect.x+10, rect.y+32); if (offset.X < 0 || offset.Y < 0) Main.showWarningWindowMustClearlyVisible(); diff --git a/src/main/java/bh/bot/common/types/ScreenResolutionProfile.java b/src/main/java/bh/bot/common/types/ScreenResolutionProfile.java index dca8723..454ed53 100644 --- a/src/main/java/bh/bot/common/types/ScreenResolutionProfile.java +++ b/src/main/java/bh/bot/common/types/ScreenResolutionProfile.java @@ -699,22 +699,22 @@ public Offset getOffsetLabelIdolDimension() { @Override public Offset getOffsetEnterIdolDimensionBlubLix() { - return new Offset(400, 183); + return new Offset(400, 170); } @Override public Offset getOffsetEnterIdolDimensionMowhi() { - return new Offset(242, 389); + return new Offset(240, 400); } @Override public Offset getOffsetEnterIdolDimensionWizBot() { - return new Offset(559, 389); + return new Offset(555, 400); } @Override public Offset getOffsetEnterIdolDimensionAstamus() { - return new Offset(400, 311); + return new Offset(400, 320); } @Override 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 59b76a2..683cce5 100644 --- a/src/main/java/bh/bot/common/types/images/BwMatrixMeta.java +++ b/src/main/java/bh/bot/common/types/images/BwMatrixMeta.java @@ -810,7 +810,7 @@ public static void load() throws IOException { 0xFFFFFF ); Metas.Expedition.Labels.idolDimension = BwMatrixMeta.from(// - "labels/expedition.idol-dimension?", + "labels/expedition.idol-dimension2?", Configuration.screenResolutionProfile.getOffsetLabelIdolDimension(), // 0xFFFFFF ); diff --git a/src/main/resources/game-images/800x520/labels/expedition.idol-dimension2-tp.bmp b/src/main/resources/game-images/800x520/labels/expedition.idol-dimension2-tp.bmp new file mode 100644 index 0000000000000000000000000000000000000000..f268e7c18198f56104bde08313c428f4345167f6 GIT binary patch literal 21582 zcmeHPOKVg~6pp`QV$$#Kq|+U>O>5Gc7-M2Ij1$Kh4Cum*8{N1OQBZtUQ0_UERq|?4rG%s(a30TvgR?_wPJeZ{#+ilyn(c5q^z-%BcUAiQ3>Z2!5o@DW4GWq7s8;O6>qD92emQAJ- zVWN*7Ju0ysIdX*c1cSj>uU<(E`sniI%ZJ1RHE4Jgeg6EpB#7omuO!ExJb5Bifo{Zz$t6c<8-Dkaf*I$-e6!yKn$kM+puAS)ZQGUhYufS5l20% zSFd&yER;C1I0XzPcj}^{`R$YZfYU%Az_zJ9Z=v#}bo2hStT{?$GqSUN!ta2d8(FI>2w>TyiTWHRL1oLr*~NFl4i>8)G0IQQenk4x@czka=Q zFx1u#O^f*rr6Fl~Reh;&j)pU8=5jga^czlldwbb7L!yK@HOvu{AzYqBSmN~EyLbG@ zT(m)*#PbPGLxU?IV+p6RaByNW+B4mD(5vrHe>I%)qC-h=%1bIDObXFs0H<9oY5L8Y znkF~({VCX3WMO9(oeoK9aGFggS|-*Jn@xX;HIC_-deURlpH8TcvI~xcWgjYvYsS4I zPBC!8mj%L(9Xq7I{66nb7cX8sO$k&-nEUE%9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547260505a601abeb8aec64867d83d49c Mon Sep 17 00:00:00 2001 From: DARE Date: Sun, 9 Apr 2023 11:10:17 -0700 Subject: [PATCH 2/3] reselect window and offset between loops --- src/main/java/bh/bot/app/AfkApp.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/bh/bot/app/AfkApp.java b/src/main/java/bh/bot/app/AfkApp.java index 715d073..04b9aed 100644 --- a/src/main/java/bh/bot/app/AfkApp.java +++ b/src/main/java/bh/bot/app/AfkApp.java @@ -261,6 +261,11 @@ private void doLoop(// ML: while (!masterSwitch.get()) { sleep(loopSleep); + try { + adjustScreenOffset(); + } catch (Exception ex) { + err("Unable to detect screen offset: %s", ex.getMessage()); + } debug("doLoop on loop"); if (toBeRemoved.size() > 0) { From 9e8bd8f0679f1f5d98998589950b6dd593c73bdd Mon Sep 17 00:00:00 2001 From: DARE Date: Sun, 9 Apr 2023 11:12:44 -0700 Subject: [PATCH 3/3] update version --- pom.xml | 2 +- web/json/reject-versions-2.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 17d7b3c..83024aa 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 bh.bot 99bot - 3.6.2 + 3.7.0 diff --git a/web/json/reject-versions-2.json b/web/json/reject-versions-2.json index 6fb5dbd..a89e20b 100644 --- a/web/json/reject-versions-2.json +++ b/web/json/reject-versions-2.json @@ -1,5 +1,5 @@ { - "bv": ["3.6.0", "3.5.0", "3.4.0", "3.3.0","3.2.0","3.1.0","3.0.0","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"], + "bv": ["3.6.2", "3.6.0", "3.5.0", "3.4.0", "3.3.0","3.2.0","3.1.0","3.0.0","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": { "3.4.1": ["invasion"], "3.4.0": ["invasion","gvg","gauntlet"]