Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.6.7.1 #603

Merged
merged 13 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.6.7"
automatic_release_tag: "1.6.7.1"
prerelease: false
title: "Release 1.6.7"
title: "Release 1.6.7.1"
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.6.7</microbot.version>
<microbot.version>1.6.7.1</microbot.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,20 @@ public void onConfigChanged(ConfigChanged ev) {
@Subscribe
public void onGameTick(GameTick event) {
if (client.getLocalPlayer().isInteracting()) {
if (client.getLocalPlayer().getInteracting() instanceof Player
|| client.getLocalPlayer().getInteracting() instanceof NPC) {
Actor interactingActor = client.getLocalPlayer().getInteracting();
if (interactingActor instanceof Player) {
if (ticks.get() == 2) {
ticks.set(0);
Rs2Player.updateCombatTime();
Rs2Player.lastInteractWasPlayer = true;
} else {
ticks.incrementAndGet();
}
} else if (interactingActor instanceof NPC) {
if (ticks.get() == 2) {
ticks.set(0);
if (Rs2Player.lastInteractWasPlayer) Rs2Player.lastInteractWasPlayer = false;
Rs2Player.updateCombatTime();
} else {
ticks.incrementAndGet();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public boolean run() {
Rs2Dialogue.clickCombinationOption(plugin.getJewelry().getGem().getUncutItemName());
sleepUntil(Rs2Player::isAnimating);
Rs2Antiban.actionCooldown();
Rs2Antiban.takeMicroBreakByChance();
Rs2Bank.preHover();
break;
case BANKING:
Expand Down Expand Up @@ -319,6 +320,7 @@ public boolean run() {
sleepUntilTrue(() -> Rs2Widget.isGoldCraftingWidgetOpen() || Rs2Widget.isSilverCraftingWidgetOpen(), 500, 20000);
Rs2Widget.clickWidget(plugin.getJewelry().getItemName());
Rs2Antiban.actionCooldown();
Rs2Antiban.takeMicroBreakByChance();
break;
case ALCHING:
if (!Rs2Equipment.hasEquipped(staffItemID)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void run(CraftingConfig config) {
if (!Microbot.isLoggedIn()) return;
if (!super.run()) return;

if (Rs2Player.isAnimating(2400) || Rs2Antiban.getCategory().isBusy() || Microbot.pauseAllScripts) return;
if (Rs2Player.isAnimating(3000) || Rs2Antiban.getCategory().isBusy() || Microbot.pauseAllScripts) return;
if (Rs2AntibanSettings.actionCooldownActive) return;

if (config.glassType() == Glass.PROGRESSIVE) {
Expand Down Expand Up @@ -101,8 +101,7 @@ private void craft(CraftingConfig config) {

Rs2Widget.sleepUntilHasNotWidgetText("How many do you wish to make?", 270, 5, false, 5000);
Rs2Antiban.actionCooldown();

sleepUntil(() -> !Rs2Inventory.hasItem(moltenGlass), 60000);
Rs2Antiban.takeMicroBreakByChance();
}

public ProgressiveGlassblowingModel calculateItemToCraft() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,22 @@ public void selectMould() {
Microbot.getMouse().click(forte.getBounds());
sleep(600, 1200);
MouldHelper.selectBest();
sleep(600, 1200);
}

Widget blades = Rs2Widget.findWidget("Blades", null);
if (blades != null) {
Microbot.getMouse().click(blades.getBounds());
sleep(600, 1200);
MouldHelper.selectBest();
sleep(600, 1200);
}
Widget tips = Rs2Widget.findWidget("Tips", null);
if (tips != null) {
Microbot.getMouse().click(tips.getBounds());
sleep(600, 1200);
MouldHelper.selectBest();
sleep(600, 1200);
Microbot.getMouse().click(forte.getBounds());
}
Widget setMould = Rs2Widget.getWidget(47054854);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
import net.runelite.client.config.ConfigSection;
import net.runelite.client.plugins.microbot.magic.aiomagic.enums.MagicActivity;
import net.runelite.client.plugins.microbot.magic.aiomagic.enums.SuperHeatItem;
import net.runelite.client.plugins.microbot.magic.aiomagic.enums.TeleportSpell;
import net.runelite.client.plugins.microbot.util.magic.Rs2CombatSpells;
import net.runelite.client.plugins.microbot.util.magic.Rs2Spells;
import net.runelite.client.plugins.microbot.util.magic.Rs2Staff;

@ConfigGroup(AIOMagicConfig.configGroup)
public interface AIOMagicConfig extends Config {
Expand All @@ -16,6 +19,9 @@ public interface AIOMagicConfig extends Config {
String alchItems = "alchItems";
String superHeatItem = "superHeatItem";
String npcName = "npcName";
String staff = "staff";
String teleportSpell = "teleportSpell";
String castAmount = "castAmount";

@ConfigSection(
name = "General Settings",
Expand Down Expand Up @@ -45,6 +51,13 @@ public interface AIOMagicConfig extends Config {
)
String superHeatSection = "superHeat";

@ConfigSection(
name = "Teleport Settings",
description = "Configure teleport settings",
position = 3
)
String teleportSection = "teleport";

@ConfigItem(
keyName = activity,
name = "Activity",
Expand Down Expand Up @@ -99,4 +112,37 @@ default String alchItems() {
default SuperHeatItem superHeatItem() {
return SuperHeatItem.IRON;
}

@ConfigItem(
keyName = teleportSpell,
name = "Teleport Spell",
description = "Select the teleport spell you would like to use",
position = 0,
section = teleportSection
)
default TeleportSpell teleportSpell() {
return TeleportSpell.VARROCK_TELEPORT;
}

@ConfigItem(
keyName = staff,
name = "Staff",
description = "Select the staff you would like to use",
position = 1,
section = teleportSection
)
default Rs2Staff staff() {
return Rs2Staff.STAFF_OF_AIR;
}

@ConfigItem(
keyName = castAmount,
name = "Total amount of casts",
description = "Define the amount of teleport casts",
position = 2,
section = teleportSection
)
default int castAmount() {
return 1000;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
import net.runelite.client.plugins.microbot.Microbot;
import net.runelite.client.plugins.microbot.magic.aiomagic.enums.MagicActivity;
import net.runelite.client.plugins.microbot.magic.aiomagic.enums.SuperHeatItem;
import net.runelite.client.plugins.microbot.magic.aiomagic.scripts.AlchScript;
import net.runelite.client.plugins.microbot.magic.aiomagic.scripts.SplashScript;
import net.runelite.client.plugins.microbot.magic.aiomagic.scripts.SuperHeatScript;
import net.runelite.client.plugins.microbot.magic.aiomagic.enums.TeleportSpell;
import net.runelite.client.plugins.microbot.magic.aiomagic.scripts.*;
import net.runelite.client.plugins.microbot.util.magic.Rs2CombatSpells;
import net.runelite.client.plugins.microbot.util.magic.Rs2Staff;
import net.runelite.client.ui.overlay.OverlayManager;

import javax.inject.Inject;
Expand Down Expand Up @@ -53,6 +53,10 @@ AIOMagicConfig provideConfig(ConfigManager configManager) {
private AlchScript alchScript;
@Inject
private SuperHeatScript superHeatScript;
@Inject
private TeleportScript teleportScript;
@Inject
private TeleAlchScript teleAlchScript;

public static String version = "1.0.0";

Expand All @@ -64,13 +68,22 @@ AIOMagicConfig provideConfig(ConfigManager configManager) {
private SuperHeatItem superHeatItem;
@Getter
private String npcName;
@Getter
private TeleportSpell teleportSpell;
@Getter
private Rs2Staff staff;
@Getter
private int totalCasts;

@Override
protected void startUp() throws AWTException {
combatSpell = config.combatSpell();
alchItemNames = updateItemList(config.alchItems());
superHeatItem = config.superHeatItem();
npcName = config.npcName();
teleportSpell = config.teleportSpell();
staff = config.staff();
totalCasts = config.castAmount();

if (overlayManager != null) {
overlayManager.add(aioMagicOverlay);
Expand All @@ -86,13 +99,21 @@ protected void startUp() throws AWTException {
case SUPERHEAT:
superHeatScript.run();
break;
case TELEPORT:
teleportScript.run();
break;
case TELEALCH:
teleAlchScript.run();
break;
}
}

protected void shutDown() {
splashScript.shutdown();
alchScript.shutdown();
superHeatScript.shutdown();
teleportScript.shutdown();
teleAlchScript.shutdown();
overlayManager.remove(aioMagicOverlay);
}

Expand All @@ -114,6 +135,18 @@ public void onConfigChanged(ConfigChanged event) {
if (event.getKey().equals(AIOMagicConfig.npcName)) {
npcName = config.npcName();
}

if (event.getKey().equals(AIOMagicConfig.teleportSpell)) {
teleportSpell = config.teleportSpell();
}

if (event.getKey().equals(AIOMagicConfig.staff)) {
staff = config.staff();
}

if (event.getKey().equals(AIOMagicConfig.castAmount)) {
totalCasts = config.castAmount();
}
}

@Subscribe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ public enum MagicActivity {
SPLASHING,
ALCHING,
SUPERHEAT,
TELEPORT,
TELEALCH,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package net.runelite.client.plugins.microbot.magic.aiomagic.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.runelite.client.plugins.microbot.util.magic.Rs2Spells;

@Getter
@RequiredArgsConstructor
public enum TeleportSpell {
VARROCK_TELEPORT(Rs2Spells.VARROCK_TELEPORT),
LUMBRIDGE_TELEPORT(Rs2Spells.LUMBRIDGE_TELEPORT),
FALADOR_TELEPORT(Rs2Spells.FALADOR_TELEPORT),
CAMELOT_TELEPORT(Rs2Spells.CAMELOT_TELEPORT),
ARDOUGNE_TELEPORT(Rs2Spells.ARDOUGNE_TELEPORT),
WATCHTOWER_TELEPORT(Rs2Spells.WATCHTOWER_TELEPORT),
TROLLHEIM_TELEPORT(Rs2Spells.TROLLHEIM_TELEPORT),;

private final Rs2Spells rs2Spell;
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ public boolean run() {
}

Rs2Bank.setWithdrawAsNote();
for (String item : plugin.getAlchItemNames()) {
plugin.getAlchItemNames().forEach((itemName) -> {
if (!isRunning()) return;
Rs2Bank.withdrawAll(item);
Rs2Random.waitEx(600, 100);
}
Rs2Bank.withdrawAll(itemName);
Rs2Inventory.waitForInventoryChanges(1200);
});
Rs2Bank.setWithdrawAsItem();

Rs2Bank.closeBank();
Expand All @@ -135,7 +135,7 @@ public boolean run() {
return;
}

Rs2Magic.alch(plugin.getAlchItemNames().get(0));
Rs2Magic.alch(alchItem);
Rs2Player.waitForXpDrop(Skill.MAGIC, 10000, false);
break;
}
Expand Down
Loading