Skip to content

Commit

Permalink
1.5.7
Browse files Browse the repository at this point in the history
1.5.7
  • Loading branch information
chsami authored Oct 16, 2024
2 parents 5a90cab + 177b289 commit cf339b9
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "1.5.6"
automatic_release_tag: "1.5.7"
prerelease: false
title: "Release 1.5.6"
title: "Release 1.5.7"
files: |
/home/runner/work/microbot/microbot/runelite-client/target/microbot-*.jar
Expand Down
2 changes: 1 addition & 1 deletion runelite-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<git.commit.id.abbrev>nogit</git.commit.id.abbrev>
<git.dirty>false</git.dirty>
<shade.skip>false</shade.skip>
<microbot.version>1.5.6</microbot.version>
<microbot.version>1.5.7</microbot.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,12 @@ public static void drag(Rectangle start, Rectangle end) {
}

public static void click(Rectangle rectangle, NewMenuEntry entry) {

Point point = Rs2UiHelper.getClickingPoint(rectangle, true);
mouse.click(point, entry);

if (entry.getType() == MenuAction.WALK) {
mouse.click(new Point(entry.getParam0(), entry.getParam1()), entry);
} else {
Point point = Rs2UiHelper.getClickingPoint(rectangle, true);
mouse.click(point, entry);
}

if (!Microbot.getClient().isClientThread()) {
sleep(50, 100);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public class NewMenuEntry implements MenuEntry {
private Widget widget;

public NewMenuEntry(int param0, int param1, int opcode, int identifier, int itemId, String target) {
this.option = "Use";
this.target = target;
this.option = target;
this.target = "";
this.identifier = identifier;
this.type = MenuAction.of(opcode);
this.param0 = param0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,19 +316,19 @@ public static void walkFastCanvas(WorldPoint worldPoint) {
public static void walkFastCanvas(WorldPoint worldPoint, boolean toogleRun) {
Rs2Player.toggleRunEnergy(toogleRun);
Point canv;
if (Microbot.getClient().isInInstancedRegion()) {
worldPoint = WorldPoint.toLocalInstance(Microbot.getClient(), worldPoint).stream().findFirst().get();
LocalPoint localPoint = LocalPoint.fromWorld(Microbot.getClient(), worldPoint);
if (Microbot.getClient().getTopLevelWorldView().isInstance()) {
worldPoint = WorldPoint.toLocalInstance(Microbot.getClient().getTopLevelWorldView(), worldPoint).stream().findFirst().get();
LocalPoint localPoint = LocalPoint.fromWorld(Microbot.getClient().getTopLevelWorldView(), worldPoint);
canv = Perspective.localToCanvas(Microbot.getClient(), localPoint, Microbot.getClient().getPlane());
} else {
canv = Perspective.localToCanvas(Microbot.getClient(), LocalPoint.fromScene(worldPoint.getX() - Microbot.getClient().getBaseX(), worldPoint.getY() - Microbot.getClient().getBaseY(), Microbot.getClient().getTopLevelWorldView().getScene()), Microbot.getClient().getPlane());
LocalPoint localPoint = LocalPoint.fromScene(worldPoint.getX() - Microbot.getClient().getTopLevelWorldView().getBaseX(), worldPoint.getY() - Microbot.getClient().getTopLevelWorldView().getBaseY());
canv = Perspective.localToCanvas(Microbot.getClient(), localPoint, Microbot.getClient().getTopLevelWorldView().getPlane());
}

int canvasX = canv != null ? canv.getX() : -1;
int canvasY = canv != null ? canv.getY() : -1;

Microbot.doInvoke(new NewMenuEntry(canvasX, canvasY, MenuAction.WALK.getId(), 0, -1, "Walk here"), new Rectangle(1, 1, Microbot.getClient().getCanvasWidth(), Microbot.getClient().getCanvasHeight()));
//Rs2Reflection.invokeMenu(canvasX, canvasY, MenuAction.WALK.getId(), 0, -1, "Walk here", "", -1, -1);
Microbot.doInvoke(new NewMenuEntry(canvasX, canvasY, MenuAction.WALK.getId(), 0, 0, "Walk here"), new Rectangle(canvasX, canvasY, Microbot.getClient().getCanvasWidth(), Microbot.getClient().getCanvasHeight()));
}

public static WorldPoint walkCanvas(WorldPoint worldPoint) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,21 @@ private void handleAcidWalk() {
WorldPoint safeTile = findSafeTile();
WorldPoint playerLocation = Microbot.getClient().getLocalPlayer().getWorldLocation();

if (safeTile != null) {
if (playerLocation.equals(safeTile)) {
Rs2Npc.interact(vorkath, "attack");
} else {
Rs2Player.eatAt(75);
Rs2Walker.walkFastLocal(LocalPoint.fromWorld(Microbot.getClient(), safeTile));
}
}
}
//Only use this for testing purpose on sleeping vorkath
private void testWooxWalk() {
vorkath = Rs2Npc.getNpc(NpcID.VORKATH_8059);
WorldPoint safeTile = findSafeTile();
WorldPoint playerLocation = Microbot.getClient().getLocalPlayer().getWorldLocation();

if (safeTile != null) {
if (playerLocation.equals(safeTile)) {
Rs2Npc.interact(vorkath, "attack");
Expand Down

0 comments on commit cf339b9

Please sign in to comment.