diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java index 5599dba18f9..939ddd2bf1d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java @@ -33,290 +33,282 @@ "
  • Filled Bottomless compost bucket
  • \n" + "" + "
    Extra information:\n" + - "
    If you want to stop the script during your farm run (maybe it gets stuck or whatever reason), make sure to disable 'Banking' and disable patches you previously ran.
    Happy botting\n" + "
    If you want to stop the script during your farm run (maybe it gets stuck or whatever reason), make sure to disable 'Banking' and disable patches you previously ran." + + "Happy botting\n" + + "

    UI and new trees added thanks to Diogenes and T\n" + + "

    The tree order is as follows: GS Fruit → GS Tree → TGV Fruit → Farming Guild Tree → Farming Guild Fruit → Taverley → Falador → Lumbridge → Varrock → Brimhaven Fruit → Catherby Fruit → Fossil A/B/C → Lletya Fruit → Auburnvale Tree → Kastori Fruit → Avium Savannah Hardwood.

    Patches are listed in the order they will be attended filtered by type\n" ) public interface FarmTreeRunConfig extends Config { - public static final boolean DEBUG_MODE = System.getProperty("java.vm.info", "").contains("sharing"); + /* ========================= + * Sections (as requested) + * ========================= */ @ConfigSection( - name = "General", - description = "General", + name = "Sapling selection", + description = "Choose which saplings to plant", position = 1 ) - String generalSection = "general"; + String saplingSection = "saplingSection"; - // Tree patches section @ConfigSection( - name = "Tree patches", - description = "Select which tree patches to use", + name = "Protection", + description = "Configure payment (protection) per tree type", position = 2 ) + String protectionSection = "protectionSection"; + + @ConfigSection( + name = "Gear", + description = "General gear and run settings", + position = 3 + ) + String gearSection = "gearSection"; + + @ConfigSection( + name = "Tree patches", + description = "Select which regular tree patches to use", + position = 4 + ) String treePatchesSection = "treePatchesSection"; - // Fruit tree patches section @ConfigSection( name = "Fruit tree patches", description = "Select which fruit tree patches to use", - position = 3 + position = 5 ) String fruitTreePatchesSection = "fruitTreePatchesSection"; -// TODO: Not implemented yet -// @ConfigItem( -// keyName = "trackRuneLite", -// name = "Use RuneLite time tracking plugin", -// description = "When enabled it tracks RuneLite farm patch times. Only when select farm patches below are fully grown, it will start the farm run.", -// position = 1, -// section = generalSection -// ) -// default boolean trackRuneLiteTimeTracking() -// { -// return false; -// } - - @ConfigItem( - keyName = "banking", - name = "Banking", - description = "Enabling this will run to bank and reset inventory with required items.", - position = 1, - section = generalSection + @ConfigSection( + name = "Hardwood patches", + description = "Select which hardwood patches to use", + position = 6 ) - default boolean banking() { - return true; - } + String hardTreePatchesSection = "hardTreePatchesSection"; + /* ========================= + * Sapling selection + * ========================= */ @ConfigItem( keyName = "treeSapling", name = "Tree sapling", description = "Select tree sapling to use", + position = 0, + section = saplingSection + ) + default TreeEnums selectedTree() { return TreeEnums.MAPLE; } + + @ConfigItem( + keyName = "fruitTreeSapling", + name = "Fruit tree sapling", + description = "Select fruit tree sapling to use", + position = 1, + section = saplingSection + ) + default FruitTreeEnum selectedFruitTree() { return FruitTreeEnum.PAPAYA; } + + @ConfigItem( + keyName = "Fossil Island Tree", + name = "Hard sapling", + description = "Select Hard tree sapling to use", position = 2, - section = generalSection + section = saplingSection ) - default TreeEnums selectedTree() { - return TreeEnums.MAPLE; - } + default HardTreeEnums selectedHardTree() { return HardTreeEnums.MAHOGANY; } + /* ========================= + * Protection + * ========================= */ @ConfigItem( keyName = "protectTree", name = "Protect trees", description = "Do you want to protect your trees?", - position = 3, - section = generalSection - ) - default boolean protectTrees() { - return true; - } - - @ConfigItem( - keyName = "fruitTreeSapling", - name = "Fruit tree sapling", - description = "Select fruit tree sapling to use", - position = 4, - section = generalSection + position = 0, + section = protectionSection ) - default FruitTreeEnum selectedFruitTree() { - return FruitTreeEnum.PAPAYA; - } + default boolean protectTrees() { return true; } @ConfigItem( keyName = "protectFruitTree", name = "Protect fruit trees", description = "Do you want to protect your fruit trees?", - position = 5, - section = generalSection + position = 1, + section = protectionSection ) - default boolean protectFruitTrees() { - return false; - } + default boolean protectFruitTrees() { return false; } @ConfigItem( - keyName = "Fossil Island Tree", - name = "Hard sapling", - description = "Select Hard tree sapling to use", - position = 6, - section = generalSection + keyName = "protectHardTree", + name = "Protect Hard trees", + description = "Do you want to protect your hard wood ;)?", + position = 2, + section = protectionSection ) - default HardTreeEnums selectedHardTree() { - return HardTreeEnums.MAHOGANY; - } + default boolean protectHardTrees() { return false; } + /* ========================= + * Gear + * ========================= */ @ConfigItem( - keyName = "protectHardTree", - name = "Protect Hard trees", - description = "Do you want to protect your hard wood ;) ?", - position = 7, - section = generalSection + keyName = "banking", + name = "Banking", + description = "Enabling this will run to bank and reset inventory with required items.", + position = 0, + section = gearSection ) - default boolean protectHardTrees() { - return false; - } + default boolean banking() { return true; } @ConfigItem( keyName = "useCompost", name = "Use compost", description = "Only bottomless compost bucket is supported", - position = 8, - section = generalSection + position = 1, + section = gearSection ) - default boolean useCompost() { - return true; - } + default boolean useCompost() { return true; } @ConfigItem( keyName = "useGraceful", name = "Use graceful", description = "Enable if you want to wear graceful outfit", - position = 9, - section = generalSection + position = 2, + section = gearSection ) - default boolean useGraceful() { - return true; - } + default boolean useGraceful() { return true; } @ConfigItem( keyName = "useSkillsNecklace", name = "Use Skills Necklace", description = "Useful if you don't have Spirit tree or Farming cape", - position = 10, - section = generalSection + position = 3, + section = gearSection ) - default boolean useSkillsNecklace() { - return true; - } + default boolean useSkillsNecklace() { return true; } @ConfigItem( keyName = "useEnergyPotion", name = "Use Energy Potion", description = "Useful if you want to have a faster run", - position = 11, - section = generalSection + position = 4, + section = gearSection ) - default boolean useEnergyPotion() { - return true; - } + default boolean useEnergyPotion() { return true; } + /* ========================= + * Tree patches (regular) — ordered to match run: + * GS Tree → Farming Guild Tree → Taverley → Falador → Lumbridge → Varrock → Auburnvale + * ========================= */ @ConfigItem( - keyName = "falador", - name = "Falador", - description = "Falador tree patch", + keyName = "gnomeStrongholdTree", + name = "Gnome Stronghold", + description = "Gnome Stronghold tree patch", position = 0, section = treePatchesSection ) - default boolean faladorTreePatch() { - return true; - } + default boolean gnomeStrongholdTreePatch() { return true; } @ConfigItem( - keyName = "gnomeStrongholdTree", - name = "Gnome Stronghold", - description = "Gnome Stronghold tree patch", + keyName = "farmingGuildTree", + name = "Farming Guild", + description = "FarmingGuild tree patch", position = 1, section = treePatchesSection ) - default boolean gnomeStrongholdTreePatch() { - return true; - } + default boolean farmingGuildTreePatch() { return true; } @ConfigItem( - keyName = "lumbridge", - name = "Lumbridge", - description = "Lumbridge tree patch", + keyName = "taverley", + name = "Taverley", + description = "Taverley tree patch", position = 2, section = treePatchesSection ) - default boolean lumbridgeTreePatch() { - return true; - } + default boolean taverleyTreePatch() { return true; } @ConfigItem( - keyName = "taverley", - name = "Taverley", - description = "Taverley tree patch", + keyName = "falador", + name = "Falador", + description = "Falador tree patch", position = 3, section = treePatchesSection ) - default boolean taverleyTreePatch() { - return true; - } + default boolean faladorTreePatch() { return true; } @ConfigItem( - keyName = "varrock", - name = "Varrock", - description = "Varrock tree patch", + keyName = "lumbridge", + name = "Lumbridge", + description = "Lumbridge tree patch", position = 4, section = treePatchesSection ) - default boolean varrockTreePatch() { - return true; - } + default boolean lumbridgeTreePatch() { return true; } @ConfigItem( - keyName = "fossil", - name = "Fossil Island", - description = "Fossil Island tree patch x3", - position = 4, + keyName = "varrock", + name = "Varrock", + description = "Varrock tree patch", + position = 5, section = treePatchesSection ) - default boolean fossilTreePatch() { - return true; - } + default boolean varrockTreePatch() { return true; } @ConfigItem( - keyName = "farmingGuildTree", - name = "Farming Guild", - description = "FarmingGuild tree patch", - position = 5, + keyName = "AuburnvaleTree", + name = "Auburnvale", + description = "Auburnvale tree patch", + position = 6, section = treePatchesSection ) - default boolean farmingGuildTreePatch() { - return true; - } + default boolean auburnTreePatch() { return true; } + /* ========================= + * Fruit tree patches — ordered to match run: + * GS Fruit → TGV Fruit → Farming Guild Fruit → Brimhaven → Catherby → Lletya → Kastori + * ========================= */ + @ConfigItem( + keyName = "gnomeStrongholdFruitTree", + name = "Gnome Stronghold", + description = "Gnome Stronghold fruit tree patch", + position = 0, + section = fruitTreePatchesSection + ) + default boolean gnomeStrongholdFruitTreePatch() { return true; } @ConfigItem( - keyName = "brimhaven", - name = "Brimhaven", - description = "Brimhaven fruit tree patch", + keyName = "treeGnomeVillage", + name = "Tree gnome village", + description = "Tree gnome village fruit tree patch", position = 1, section = fruitTreePatchesSection ) - default boolean brimhavenFruitTreePatch() { - return true; - } + default boolean treeGnomeVillageFruitTreePatch() { return true; } @ConfigItem( - keyName = "catherby", - name = "Catherby", - description = "Catherby fruit tree patch", + keyName = "farmingGuildFruitTree", + name = "Farming Guild", + description = "Farming guild fruit tree patch", position = 2, section = fruitTreePatchesSection ) - default boolean catherbyFruitTreePatch() { - return true; - } + default boolean farmingGuildFruitTreePatch() { return false; } @ConfigItem( - keyName = "gnomeStrongholdFruitTree", - name = "Gnome Stronghold", - description = "Gnome Stronghold fruit tree patch", + keyName = "brimhaven", + name = "Brimhaven", + description = "Brimhaven fruit tree patch", position = 3, section = fruitTreePatchesSection ) - default boolean gnomeStrongholdFruitTreePatch() { - return true; - } + default boolean brimhavenFruitTreePatch() { return true; } @ConfigItem( - keyName = "treeGnomeVillage", - name = "Tree gnome village", - description = "Tree gnome village tree patch", + keyName = "catherby", + name = "Catherby", + description = "Catherby fruit tree patch", position = 4, section = fruitTreePatchesSection ) - default boolean treeGnomeVillageFruitTreePatch() { - return true; - } + default boolean catherbyFruitTreePatch() { return true; } @ConfigItem( keyName = "lletya", @@ -325,18 +317,35 @@ default boolean treeGnomeVillageFruitTreePatch() { position = 5, section = fruitTreePatchesSection ) - default boolean lletyaFruitTreePatch() { - return false; - } + default boolean lletyaFruitTreePatch() { return false; } @ConfigItem( - keyName = "farmingGuildFruitTree", - name = "Farming Guild", - description = "Farming guild fruit tree patch", + keyName = "kastoriFruitTreePatch", + name = "Kastori", + description = "Enable Kastori fruit tree patch", position = 6, section = fruitTreePatchesSection ) - default boolean farmingGuildFruitTreePatch() { - return false; - } + default boolean kastoriFruitTreePatch() { return true; } + + /* ========================= + * Hardwood patches — run uses Fossil Island (x3) then Avium Savannah + * ========================= */ + @ConfigItem( + keyName = "fossil", + name = "Fossil Island", + description = "Fossil Island tree patch x3", + position = 0, + section = hardTreePatchesSection + ) + default boolean fossilTreePatch() { return true; } + + @ConfigItem( + keyName = "aviumSavannahHardwood", + name = "Avium Savannah", + description = "Enable this hardwood tree patch", + position = 1, + section = hardTreePatchesSection + ) + default boolean aviumSavannahHardwoodPatch() { return false; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunOverlay.java index 1162ce386a0..8d1433ce59c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunOverlay.java @@ -23,7 +23,7 @@ public Dimension render(Graphics2D graphics) { try { panelComponent.setPreferredSize(new Dimension(200, 300)); panelComponent.getChildren().add(TitleComponent.builder() - .text("Acun's farm tree runner (v1.3.0)") + .text("Acun's farm tree runner (v1.3.1)") .color(Color.GREEN) .build()); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunPlugin.java index a6f2fa3f04e..c5d7c77171d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunPlugin.java @@ -24,7 +24,7 @@ */ @PluginDescriptor( name = PluginDescriptor.Default + "Farm tree runner", - description = "Acun's farm tree runner. Supports regular and fruit trees", + description = "Acun's farm tree runner. Supports regular, fruit and hardwood trees", tags = {"Farming", "Tree run"}, enabledByDefault = false ) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunScript.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunScript.java index 9d0ba9e26a4..f8e524e8585 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunScript.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunScript.java @@ -4,8 +4,6 @@ import lombok.RequiredArgsConstructor; import net.runelite.api.*; import net.runelite.api.coords.WorldPoint; -import net.runelite.client.Notifier; -import net.runelite.client.config.Notification; import net.runelite.client.plugins.microbot.farmTreeRun.enums.FarmTreeRunState; import net.runelite.client.plugins.microbot.farmTreeRun.enums.FruitTreeEnum; import net.runelite.client.plugins.microbot.farmTreeRun.enums.HardTreeEnums; @@ -16,7 +14,6 @@ import net.runelite.client.plugins.microbot.util.antiban.Rs2AntibanSettings; import net.runelite.client.plugins.microbot.util.antiban.enums.ActivityIntensity; import net.runelite.client.plugins.microbot.util.bank.Rs2Bank; -import net.runelite.client.plugins.microbot.util.bank.enums.BankLocation; import net.runelite.client.plugins.microbot.util.dialogues.Rs2Dialogue; import net.runelite.client.plugins.microbot.util.equipment.Rs2Equipment; import net.runelite.client.plugins.microbot.util.gameobject.Rs2GameObject; @@ -87,7 +84,10 @@ public enum Patch { LLETYA_FRUIT_TREE_PATCH(26579, new WorldPoint(2345, 3163, 0), TreeKind.FRUIT_TREE, 1, 0), FOSSIL_TREE_PATCH_A(30482, new WorldPoint(3718, 3835, 0), TreeKind.HARD_TREE, 1, 0), FOSSIL_TREE_PATCH_B(30480, new WorldPoint(3709, 3836, 0), TreeKind.HARD_TREE, 1, 0), - FOSSIL_TREE_PATCH_C(30481, new WorldPoint(3701, 3840, 0), TreeKind.HARD_TREE, 1, 0); + FOSSIL_TREE_PATCH_C(30481, new WorldPoint(3701, 3840, 0), TreeKind.HARD_TREE, 1, 0), + AUBURNVALE_TREE_PATCH(56953, new WorldPoint(1365, 3320, 0), TreeKind.TREE, 1, 0), + KASTORI_FRUIT_TREE_PATCH(56955, new WorldPoint(1349, 3058, 0), TreeKind.FRUIT_TREE, 1, 12765), + AVIUM_SAVANNAH_HARDWOOD_PATCH(50692, new WorldPoint(1684, 2974, 0), TreeKind.HARD_TREE,1,0); private final int id; private final WorldPoint location; @@ -301,9 +301,46 @@ public boolean run(FarmTreeRunConfig config) { if (!handledPatch) return; } - botStatus = FINISHED; + botStatus = HANDLE_AUBURNVALE_TREE_PATCH; break; - case FINISHED: + + case HANDLE_AUBURNVALE_TREE_PATCH: { + patch = Patch.AUBURNVALE_TREE_PATCH; + if (config.auburnTreePatch()) { + if (walkToLocation(patch.getLocation())) { + handledPatch = handlePatch(config, patch); + } + if (!handledPatch) return; // stay in this state until done + } + botStatus = HANDLE_KASTORI_FRUIT_TREE_PATCH; + break; + } + case HANDLE_KASTORI_FRUIT_TREE_PATCH: { + patch = Patch.KASTORI_FRUIT_TREE_PATCH; + if (config.kastoriFruitTreePatch()) { + if (walkToLocation(patch.getLocation())) { + handledPatch = handlePatch(config, patch); + } + if (!handledPatch) return; + } + botStatus = HANDLE_AVIUM_SAVANNAH_HARDWOOD_PATCH; + break; + } + + case HANDLE_AVIUM_SAVANNAH_HARDWOOD_PATCH: { + patch = Patch.AVIUM_SAVANNAH_HARDWOOD_PATCH; + if (config.aviumSavannahHardwoodPatch()) { + if (walkToLocation(patch.getLocation())) { + handledPatch = handlePatch(config, patch); + } + if (!handledPatch) return; + } + botStatus = FINISHED; + break; + } + + + case FINISHED: Microbot.getClientThread().runOnClientThreadOptional(() -> { Microbot.getClient().addChatMessage(ChatMessageType.ENGINE, "", "Tree run completed.", "Acun", false); Microbot.getClient().addChatMessage(ChatMessageType.ENGINE, "", "Made with love by Acun.", "Acun", false); @@ -839,7 +876,8 @@ private List getSelectedTreePatches(FarmTreeRunConfig config) { config::lumbridgeTreePatch, config::taverleyTreePatch, config::varrockTreePatch, - config::farmingGuildTreePatch + config::farmingGuildTreePatch, + config::auburnTreePatch ); // Filter the patches to include only those that return true @@ -853,7 +891,8 @@ private List getSelectedHardTreePatches(FarmTreeRunConfig confi List allHardTreePatches = List.of( config::fossilTreePatch, config::fossilTreePatch, - config::fossilTreePatch + config::fossilTreePatch, + config::aviumSavannahHardwoodPatch ); // Filter the patches to include only those that return true @@ -870,7 +909,8 @@ private List getSelectedFruitTreePatches(FarmTreeRunConfig conf config::farmingGuildFruitTreePatch, config::lletyaFruitTreePatch, config::gnomeStrongholdFruitTreePatch, - config::treeGnomeVillageFruitTreePatch + config::treeGnomeVillageFruitTreePatch, + config::kastoriFruitTreePatch ); // Filter the patches to include only those that return true diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/enums/FarmTreeRunState.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/enums/FarmTreeRunState.java index 9c024372da6..4febb5d3e92 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/enums/FarmTreeRunState.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/enums/FarmTreeRunState.java @@ -45,5 +45,11 @@ public enum FarmTreeRunState { HANDLE_FOSSIL_TREE_PATCH_C, + HANDLE_AUBURNVALE_TREE_PATCH, + + HANDLE_KASTORI_FRUIT_TREE_PATCH, + + HANDLE_AVIUM_SAVANNAH_HARDWOOD_PATCH, + FINISHED } diff --git a/runelite-client/src/main/java/net/runelite/client/ui/SplashScreen.java b/runelite-client/src/main/java/net/runelite/client/ui/SplashScreen.java index cb3afb850f4..3c3f4e53e94 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/SplashScreen.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/SplashScreen.java @@ -58,7 +58,7 @@ public class SplashScreen extends JFrame implements ActionListener private volatile String progressText = null; private SplashScreen() { - BufferedImage logo = ImageUtil.loadImageResource(SplashScreen.class, "runelite_splash.png"); + BufferedImage logo = ImageUtil.loadImageResource(SplashScreen.class, "microbot_splash.png"); setTitle("Microbot"); diff --git a/runelite-client/src/main/resources/net/runelite/client/ui/microbot_splash.png b/runelite-client/src/main/resources/net/runelite/client/ui/microbot_splash.png new file mode 100644 index 00000000000..aca6febde06 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/ui/microbot_splash.png differ