Skip to content

Commit

Permalink
Release 1.4.7
Browse files Browse the repository at this point in the history
@everyone 

We’ve made some cool updates and fixes to improve your experience. Here’s what’s new:

**1. Removed mQuester Configuration**
    -remove outdated configurations.
**2. @See1Duck  QOL plugin changes**
    -Added Do-Last to normal anvils. Set up once and enjoy semi-AFK/one-click         functionality.
    -Added a menu option to track an NPC with the camera. Simply right-click  an NPC and select "Track" to start, and "Track" again to stop.
    -Added the option to make camera tracking smoother.
    -Added configurable Auto Eat functionality, which will eat any available food if the player's health falls below the desired percentage (%).
    -Added 4 slots for Inventory Setups. Just add the setup name and enable it.  Enjoy easy setup by right-clicking the bank and selecting the desired 
**3. Item Looting & Inventory Fixes**
    -Looting for AIO Fighter and other boss scripts should work more now. For the AIO Fighter, loot stacks that are more than      your min loot value config, will be looted.
**4. Vorkath Script fixes**
    -Natural mouse will not work with the script and will be auto disabled
    -Fixed woox walk, there was an issue that the player would die after the second trip.
**5. Animation Fixes for JAD Script**
    - Our reflection part of the client has been updated to calculate animation for bosses like 
**6. Museum Passage Restriction**
    -Rs2Walker will no longer pass through museum even if you completed the digsite quest. This is because we currently do       not support the dialogues.
**7. Thieving Script Additions**
    -Added the Wealthy Citizen feature.
    -Added Goreu as Elve:
**8. Never log out option in QOL Plugin**
    -Never logout option has been added in the QOL Plugin
**9. Rs2Walker Stepping Stone Fix**
    -Rs2Walker will now use the stepping stones correctly

People using the launcher will have the option to automatically update. Others will have to go to https://themicrobot.com to download the latest .jar.

Thanks for your continued support! We’re always working to make things better, so feel free to share any feedback or suggestions.

Happy botting!
  • Loading branch information
chsami authored Sep 12, 2024
2 parents 54b8af4 + 18d851e commit 96a6882
Show file tree
Hide file tree
Showing 31 changed files with 1,108 additions and 382 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.4.6"
automatic_release_tag: "1.4.7"
prerelease: false
title: "Release 1.4.6"
title: "Release 1.4.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.4.6</microbot.version>
<microbot.version>1.4.7</microbot.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,51 +32,14 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Table;
import com.google.inject.Provides;
import java.applet.Applet;
import java.awt.Color;
import java.awt.Rectangle;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.inject.Inject;
import javax.swing.SwingUtilities;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.Value;
import net.runelite.api.*;
import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.ItemComposition;
import net.runelite.api.ItemID;
import net.runelite.api.KeyCode;
import net.runelite.api.Menu;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.Tile;
import net.runelite.api.TileItem;
import net.runelite.api.Varbits;
import net.runelite.api.*;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.events.ClientTick;
import net.runelite.api.events.FocusChanged;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.ItemDespawned;
import net.runelite.api.events.ItemQuantityChanged;
import net.runelite.api.events.ItemSpawned;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.*;
import net.runelite.client.Notifier;
import net.runelite.client.callback.ClientThread;
import net.runelite.client.config.ConfigManager;
Expand All @@ -90,9 +53,6 @@
import net.runelite.client.plugins.grounditems.config.HighlightTier;
import net.runelite.client.plugins.grounditems.config.ItemHighlightMode;
import net.runelite.client.plugins.grounditems.config.MenuHighlightMode;
import static net.runelite.client.plugins.grounditems.config.MenuHighlightMode.BOTH;
import static net.runelite.client.plugins.grounditems.config.MenuHighlightMode.NAME;
import static net.runelite.client.plugins.grounditems.config.MenuHighlightMode.OPTION;
import net.runelite.client.ui.components.colorpicker.ColorPickerManager;
import net.runelite.client.ui.components.colorpicker.RuneliteColorPicker;
import net.runelite.client.ui.overlay.OverlayManager;
Expand All @@ -102,14 +62,18 @@
import net.runelite.client.util.Text;

import javax.inject.Inject;
import javax.swing.*;
import java.applet.Applet;
import java.awt.*;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
import java.util.Queue;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
Expand Down Expand Up @@ -512,6 +476,8 @@ public void onMenuEntryAdded(MenuEntryAdded event)
final WorldPoint worldPoint = WorldPoint.fromScene(client, sceneX, sceneY, client.getPlane());
GroundItem groundItem = collectedGroundItems.get(worldPoint, itemId);

if (groundItem == null) return;

updateItemColor(groundItem);

int quantity = groundItem.getQuantity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

import net.runelite.client.plugins.microbot.Microbot;
import net.runelite.client.plugins.microbot.Script;
import net.runelite.client.plugins.microbot.util.grounditem.LootingParameters;
import net.runelite.client.plugins.microbot.util.grounditem.Rs2GroundItem;

import java.util.concurrent.TimeUnit;


public class ExampleScript extends Script {

public static boolean test = false;
public boolean run(ExampleConfig config) {
Microbot.enableAutoRunOn = false;
mainScheduledFuture = scheduledExecutorService.scheduleWithFixedDelay(() -> {
Expand All @@ -16,7 +19,26 @@ public boolean run(ExampleConfig config) {
if (!super.run()) return;
long startTime = System.currentTimeMillis();

//CODE HERE
test = false;

LootingParameters valueParams = new LootingParameters(
5000,
Integer.MAX_VALUE,
20,
1,
0,
false,
false
);

Rs2GroundItem.loot("Vorkath's head", 20);
if (Rs2GroundItem.lootItemBasedOnValue(valueParams)) {
System.out.println("Looing succesfull!");
}
/*for (int i = 0; i < 2; i++) {
System.out.println("loop:= " + i);
Rs2Inventory.waitForInventoryChanges();
}*/

long endTime = System.currentTimeMillis();
long totalTime = endTime - startTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@
import net.runelite.client.plugins.mta.telekinetic.TelekineticRoom;
import net.runelite.client.plugins.skillcalculator.skills.MagicAction;
import net.runelite.client.ui.overlay.infobox.Counter;
import net.runelite.client.ui.overlay.infobox.Timer;

import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;

import static net.runelite.client.plugins.microbot.util.Global.sleepUntil;
import static net.runelite.client.plugins.microbot.util.Global.sleepUntilTrue;

public class MageTrainingArenaScript extends Script {
Expand Down Expand Up @@ -275,10 +273,12 @@ private void handleEnchantmentRoom() {
return;
}

if (Rs2GroundItem.loot(ItemID.DRAGONSTONE_6903) && Rs2Inventory.getEmptySlots() > 0){
Rs2Inventory.waitForInventoryChanges();
boolean successFullLoot = Rs2Inventory.waitForInventoryChanges(() -> {
Rs2GroundItem.loot(ItemID.DRAGONSTONE_6903);
});

if (successFullLoot && Rs2Inventory.getEmptySlots() > 0)
return;
}

var bonusShape = getBonusShape();
if (bonusShape == null) return;
Expand Down Expand Up @@ -315,9 +315,8 @@ private void handleEnchantmentRoom() {
Rs2Inventory.interact(itemId);

sleepUntil(() -> !Rs2Inventory.contains(itemId) || itemId != ItemID.DRAGONSTONE_6903 && bonusShape != getBonusShape(), 20_000);
} else if (Rs2GameObject.interact(object, "Take-from")) {
} else if (Rs2Inventory.waitForInventoryChanges(() -> Rs2GameObject.interact(object, "Take-from"))) {
Rs2Walker.setTarget(null);
Rs2Inventory.waitForInventoryChanges();
} else
Rs2Walker.walkFastCanvas(object.getWorldLocation());
}
Expand Down Expand Up @@ -421,8 +420,7 @@ private void handleGraveyardRoom() {
}
}

Rs2GameObject.interact(foodChute, "Deposit");
Rs2Inventory.waitForInventoryChanges();
Rs2Inventory.waitForInventoryChanges(() -> Rs2GameObject.interact(foodChute, "Deposit"));
return;
}

Expand Down Expand Up @@ -463,8 +461,7 @@ private void handleAlchemistRoom() {
sleepUntil(() -> !Rs2Player.isWalking());
}
else {
Rs2GameObject.interact(room.getSuggestion().getGameObject(), "Take-5");
Rs2Inventory.waitForInventoryChanges();
Rs2Inventory.waitForInventoryChanges(() -> Rs2GameObject.interact(room.getSuggestion().getGameObject(), "Take-5"));
}
}

Expand All @@ -477,12 +474,14 @@ private void buyReward(Rewards reward){
sleepUntil(() -> Rs2Widget.isWidgetVisible(197, 0));
sleep(400, 600);
}
var rewardWidgets = Rs2Widget.getWidget(197, 11).getDynamicChildren();
var widget = Arrays.stream(rewardWidgets).filter(x -> x.getItemId() == reward.getItemId()).findFirst().orElse(null);
Rs2Widget.clickWidgetFast(widget, Arrays.asList(rewardWidgets).indexOf(widget));
sleep(400, 600);
Rs2Widget.clickWidget(197, 9);
Rs2Inventory.waitForInventoryChanges();

Rs2Inventory.waitForInventoryChanges(() -> {
var rewardWidgets = Rs2Widget.getWidget(197, 11).getDynamicChildren();
var widget = Arrays.stream(rewardWidgets).filter(x -> x.getItemId() == reward.getItemId()).findFirst().orElse(null);
Rs2Widget.clickWidgetFast(widget, Arrays.asList(rewardWidgets).indexOf(widget));
sleep(400, 600);
Rs2Widget.clickWidget(197, 9);
});

if (reward == config.reward())
bought++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
import net.runelite.client.plugins.microbot.Script;
import net.runelite.client.plugins.microbot.playerassist.PlayerAssistConfig;
import net.runelite.client.plugins.microbot.playerassist.constants.Constants;
import net.runelite.client.plugins.microbot.util.MicrobotInventorySetup;
import net.runelite.client.plugins.microbot.util.Rs2InventorySetup;
import net.runelite.client.plugins.microbot.util.bank.Rs2Bank;
import net.runelite.client.plugins.microbot.util.inventory.Rs2Inventory;
import net.runelite.client.plugins.microbot.util.misc.Rs2Food;
import net.runelite.client.plugins.microbot.util.prayer.Rs2Prayer;
import net.runelite.client.plugins.microbot.util.walker.Rs2Walker;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -79,10 +77,11 @@ public boolean needsBanking() {

public boolean withdrawUpkeepItems(PlayerAssistConfig config) {
if (config.useInventorySetup()) {
if (!MicrobotInventorySetup.doesEquipmentMatch(config.inventorySetup())) {
MicrobotInventorySetup.loadEquipment(config.inventorySetup(), mainScheduledFuture);
Rs2InventorySetup inventorySetup = new Rs2InventorySetup(config.inventorySetup(), mainScheduledFuture);
if (!inventorySetup.doesEquipmentMatch()) {
inventorySetup.loadEquipment();
}
MicrobotInventorySetup.loadInventory(config.inventorySetup(), mainScheduledFuture);
inventorySetup.loadInventory();
return true;
}

Expand All @@ -92,11 +91,23 @@ public boolean withdrawUpkeepItems(PlayerAssistConfig config) {
log.info("Item: {} Count: {}", item.name(), count);
if (count < item.getValue(config)) {
log.info("Withdrawing {} {}(s)", item.getValue(config) - count, item.name());
for (int id : item.getIds().stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList())) {
log.info("Checking bank for item: {}", id);
if (Rs2Bank.hasBankItem(id, item.getValue(config) - count)) {
Rs2Bank.withdrawX(true, id, item.getValue(config) - count);
break;
if (item.name().equals("FOOD")) {
for (Rs2Food food : Arrays.stream(Rs2Food.values()).sorted(Comparator.comparingInt(Rs2Food::getHeal).reversed()).collect(Collectors.toList())) {
log.info("Checking bank for food: {}", food.getName());
if (Rs2Bank.hasBankItem(food.getId(), item.getValue(config) - count)) {
Rs2Bank.withdrawX(true, food.getId(), item.getValue(config) - count);
break;
}
}
} else {
ArrayList<Integer> ids = new ArrayList<>(item.getIds());
Collections.reverse(ids);
for (int id : ids) {
log.info("Checking bank for item: {}", id);
if (Rs2Bank.hasBankItem(id, item.getValue(config) - count)) {
Rs2Bank.withdrawX(true, id, item.getValue(config) - count);
break;
}
}
}
}
Expand All @@ -110,7 +121,8 @@ public boolean depositAllExcept(PlayerAssistConfig config) {
.filter(item -> item.isEnabled(config))
.flatMap(item -> item.getIds().stream())
.collect(Collectors.toList());
return Rs2Bank.isOpen() && Rs2Bank.depositAllExcept(ids.toArray(new Integer[0]));
Rs2Bank.depositAllExcept(ids.toArray(new Integer[0]));
return Rs2Bank.isOpen();
}

public boolean isUpkeepItemDepleted(PlayerAssistConfig config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,19 +204,7 @@ public class Constants {
ItemID.SUPER_RESTORE1,
ItemID.SUPER_RESTORE2,
ItemID.SUPER_RESTORE3,
ItemID.SUPER_RESTORE4,
ItemID.BLIGHTED_SUPER_RESTORE1,
ItemID.BLIGHTED_SUPER_RESTORE2,
ItemID.BLIGHTED_SUPER_RESTORE3,
ItemID.BLIGHTED_SUPER_RESTORE4,
ItemID.EGNIOL_POTION_1,
ItemID.EGNIOL_POTION_2,
ItemID.EGNIOL_POTION_3,
ItemID.EGNIOL_POTION_4,
ItemID.SANFEW_SERUM1,
ItemID.SANFEW_SERUM2,
ItemID.SANFEW_SERUM3,
ItemID.SANFEW_SERUM4
ItemID.SUPER_RESTORE4
);

public static final Set<Integer> ANTI_POISON_POTION_IDS = ImmutableSet.of(
Expand Down Expand Up @@ -1070,6 +1058,7 @@ public class Constants {
public static final Set<Integer> FOOD_ITEM_IDS = ImmutableSet.of(
ItemID.ANGLERFISH, ItemID.BLIGHTED_ANGLERFISH,
ItemID.DARK_CRAB,
ItemID.COOKED_KARAMBWAN,
ItemID.TUNA_POTATO,
ItemID.MANTA_RAY, ItemID.BLIGHTED_MANTA_RAY,
ItemID.SEA_TURTLE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public boolean run(PlayerAssistConfig config) {
currentAttackStyleChangeDelayCounter = 0;
mainScheduledFuture = scheduledExecutorService.scheduleWithFixedDelay(() -> {
if (!Microbot.isLoggedIn() || !super.run() || disableIfMaxed(config.toggleDisableOnMaxCombat())) return;
if(currentAttackStyleChangeDelayCounter-- > 0) return;
if (currentAttackStyleChangeDelayCounter-- > 0) return;

if (!initializedLevels) {
initializeLevels();
Expand Down Expand Up @@ -90,13 +90,13 @@ private void initializeLevels() {
initializedLevels = true;
}

private void changeAttackStyle(PlayerAssistConfig config,WidgetInfo componentToDisplay) {
private void changeAttackStyle(PlayerAssistConfig config, WidgetInfo attackStyleWidgetInfo) {
if (Rs2Tab.getCurrentTab() != InterfaceTab.COMBAT) {
Rs2Tab.switchToCombatOptionsTab();
sleepUntil(() -> Rs2Tab.getCurrentTab() == InterfaceTab.COMBAT, 2000);
}
log.info("Changing Attack Style to: {}", attackStyleToTrain);
Rs2Combat.setAttackStyle(componentToDisplay);
Rs2Combat.setAttackStyle(attackStyleWidgetInfo);
}

// has any of the skills leveled up
Expand Down Expand Up @@ -152,7 +152,7 @@ private AttackStyle[] getWeaponTypeStyles(int weaponType) {

// compare Players skill levels to the level target in the config
private boolean needLevel(int levelRequired, Skill skill) {
if(isMaxed()) {
if (isMaxed()) {
log.info("Maxed, switching between any combat style.");
return true;
}
Expand Down Expand Up @@ -290,9 +290,11 @@ private WidgetInfo getComponentToDisplay(PlayerAssistConfig config) {
// Return a random component if the list is not empty, otherwise return null
return componentToDisplay;
}

private boolean isMaxed() {
return getSkillLevel(Skill.ATTACK) == 99 && getSkillLevel(Skill.STRENGTH) == 99 && getSkillLevel(Skill.DEFENCE) == 99;
}

private boolean disableIfMaxed(boolean disable) {
return isMaxed() && disable;
}
Expand Down
Loading

0 comments on commit 96a6882

Please sign in to comment.