Skip to content

Commit

Permalink
Merge pull request #528 from chsami/development
Browse files Browse the repository at this point in the history
1.6.3
  • Loading branch information
chsami authored Nov 27, 2024
2 parents eb4155c + f6df2dd commit 2baad6d
Show file tree
Hide file tree
Showing 24 changed files with 520 additions and 302 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.6.2"
automatic_release_tag: "1.6.3"
prerelease: false
title: "Release 1.6.2"
title: "Release 1.6.3"
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.2</microbot.version>
<microbot.version>1.6.3</microbot.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
@PluginDescriptor(
name = "Item Charges",
description = "Show number of item charges remaining",
tags = {"inventory", "notifications", "overlay"}
tags = {"inventory", "notifications", "overlay"},
alwaysOn = true
)
@Slf4j
public class ItemChargePlugin extends Plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ public static boolean isPluginEnabled(Class c) {
return isPluginEnabled(c.getName());
}

@Deprecated(since = "1.6.2 - Use Rs2Player variant")
public static QuestState getQuestState(Quest quest) {
return getClientThread().runOnClientThread(() -> quest.getState(client));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,28 @@ AutoLooterConfig provideConfig(ConfigManager configManager) {

@Override
protected void startUp() throws AWTException {

if(config.looterActivity() == LooterActivity.DEFAULT){
defaultScript.run(config);
} else if (config.looterActivity() == LooterActivity.FLAX) {
flaxScript.run(config);
} else if (config.looterActivity() == LooterActivity.NATURE_RUNE_CHEST) {
natureRuneChestScript.run(config);

switch (config.looterActivity()) {
case DEFAULT:
defaultScript.run(config);
break;
case FLAX:
flaxScript.run(config);
break;
case NATURE_RUNE_CHEST:
natureRuneChestScript.run(config);
break;
}

if(overlayManager != null){
overlayManager.add(autoLooterOverlay);
}
}

protected void shutDown() throws Exception {
if(config.looterActivity() == LooterActivity.DEFAULT){
defaultScript.shutdown();
} else if (config.looterActivity() == LooterActivity.FLAX) {
flaxScript.shutdown();
} else if (config.looterActivity() == LooterActivity.NATURE_RUNE_CHEST) {
natureRuneChestScript.shutdown();
}
defaultScript.shutdown();
flaxScript.shutdown();
natureRuneChestScript.shutdown();
overlayManager.remove(autoLooterOverlay);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import net.runelite.client.plugins.microbot.util.inventory.Rs2Item;
import net.runelite.client.plugins.microbot.util.player.Rs2Player;

import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -70,7 +71,6 @@ public boolean run(AutoLooterConfig config) {
if (Rs2GroundItem.lootItemBasedOnValue(valueParams)) {
Microbot.pauseAllScripts = false;
Rs2Antiban.actionCooldown();
Rs2Antiban.takeMicroBreakByChance();
}
}
if (Rs2Inventory.getEmptySlots() <= config.minFreeSlots()) {
Expand All @@ -79,8 +79,13 @@ public boolean run(AutoLooterConfig config) {
}
break;
case BANKING:
if (!Rs2Bank.bankItemsAndWalkBackToOriginalPosition(Rs2Inventory.all().stream().map(Rs2Item::getName).collect(Collectors.toList()), initialPlayerLocation, config.minFreeSlots()))
return;
if (config.looterStyle() == DefaultLooterStyle.ITEM_LIST) {
if (!Rs2Bank.bankItemsAndWalkBackToOriginalPosition(Arrays.stream(config.listOfItemsToLoot().split(",")).collect(Collectors.toList()), initialPlayerLocation, config.minFreeSlots()))
return;
} else {
if (!Rs2Bank.bankItemsAndWalkBackToOriginalPosition(Rs2Inventory.all().stream().map(Rs2Item::getName).collect(Collectors.toList()), initialPlayerLocation, config.minFreeSlots()))
return;
}
state = LooterState.LOOTING;
break;
}
Expand Down Expand Up @@ -115,7 +120,6 @@ private void applyAntiBanSettings() {
Rs2AntibanSettings.dynamicIntensity = true;
Rs2AntibanSettings.devDebug = false;
Rs2AntibanSettings.moveMouseRandomly = true;
Rs2AntibanSettings.takeMicroBreaks = true;
Rs2AntibanSettings.microBreakDurationLow = 3;
Rs2AntibanSettings.microBreakDurationHigh = 15;
Rs2AntibanSettings.actionCooldownChance = 0.4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ public boolean run(AutoLooterConfig config) {
Microbot.enableAutoRunOn = false;
initialPlayerLocation = null;

if (config.hopWhenPlayerDetected()) {
Microbot.showMessage("Make sure autologin plugin is enabled and randomWorld checkbox is checked!");
}
Rs2Antiban.resetAntibanSettings();
applyAntiBanSettings();
Rs2Antiban.setActivity(Activity.GENERAL_COLLECTING);
Expand All @@ -57,15 +54,12 @@ public boolean run(AutoLooterConfig config) {
state = LooterState.BANKING;
return;
}
if (config.hopWhenPlayerDetected()) {
Rs2Player.logoutIfPlayerDetected(1, 10);
return;
}
if (config.hopWhenPlayerDetected() && Rs2Player.hopIfPlayerDetected(1, 10, 10)) return;

GameObject flaxObject = Rs2GameObject.findObject("flax", false, config.distanceToStray(), true, initialPlayerLocation);
if (flaxObject != null) {
if(Rs2GameObject.interact(flaxObject, "pick")){
Rs2Antiban.actionCooldown();
Rs2Antiban.takeMicroBreakByChance();
}
}
break;
Expand Down Expand Up @@ -132,7 +126,6 @@ private void applyAntiBanSettings() {
Rs2AntibanSettings.dynamicIntensity = true;
Rs2AntibanSettings.devDebug = false;
Rs2AntibanSettings.moveMouseRandomly = true;
Rs2AntibanSettings.takeMicroBreaks = true;
Rs2AntibanSettings.microBreakDurationLow = 3;
Rs2AntibanSettings.microBreakDurationHigh = 15;
Rs2AntibanSettings.actionCooldownChance = 0.4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.runelite.client.plugins.microbot.util.antiban.enums.Activity;
import net.runelite.client.plugins.microbot.util.gameobject.Rs2GameObject;
import net.runelite.client.plugins.microbot.util.math.Random;
import net.runelite.client.plugins.microbot.util.math.Rs2Random;
import net.runelite.client.plugins.microbot.util.player.Rs2Player;
import net.runelite.client.plugins.microbot.util.walker.Rs2Walker;

Expand Down Expand Up @@ -60,9 +61,8 @@ public boolean run(AutoLooterConfig config) {
if (natureRuneChest.isPresent()) {
if(Rs2GameObject.interact(natureRuneChest.get(), "Search for traps")){
Rs2Antiban.actionCooldown();
Rs2Antiban.takeMicroBreakByChance();
sleepUntilTrue(() -> !Rs2Player.isInteracting(), 500, 8000);
sleep(Random.random(18000, 20000));
sleep(Rs2Random.between(18000, 20000));
}
}
break;
Expand Down Expand Up @@ -118,7 +118,6 @@ private void applyAntiBanSettings() {
Rs2AntibanSettings.dynamicIntensity = true;
Rs2AntibanSettings.devDebug = false;
Rs2AntibanSettings.moveMouseRandomly = true;
Rs2AntibanSettings.takeMicroBreaks = true;
Rs2AntibanSettings.microBreakDurationLow = 3;
Rs2AntibanSettings.microBreakDurationHigh = 15;
Rs2AntibanSettings.actionCooldownChance = 0.4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,14 @@

@ConfigGroup("GildedAltar")
public interface GildedAltarConfig extends Config {

@ConfigItem(
keyName = "Guide",
name = "How to use",
description = "How to use the script",
position = 0
)
default String GUIDE()
{
default String GUIDE() {
return "This only supports house advertisements. Use this script in w330";
}

@ConfigItem(
keyName = "Player Name",
name = "Player Name Houses",
description = "Choose the player name's house comma seperated",
position = 1
)
default String housePlayerName()
{
return "xgrace,workless";
}
}
Loading

0 comments on commit 2baad6d

Please sign in to comment.