Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Dexter Bots

    VIP
    • Posts

      185
    • Joined

    • Last visited

    • Days Won

      4

    Dexter Bots last won the day on June 17 2024

    Dexter Bots had the most liked content!

    5 Followers

    About Dexter Bots

    Contact Methods

    • Discord
      killerpurplequeen1100

    Recent Profile Visitors

    1893 profile views

    Dexter Bots's Achievements

    1. As far as I know, I get a new public IP after resetting, so why should I use a proxy if this IP is recognized as trustworthy? I can do as much as I want with it "Free". proxies are always suspicious in my experience and also logically speaking. Yes, I have one unlimited subscription. For each main subscription, I can get an additional SIM for 2 CHF , which has the same internet performance (unlimited). Each SIM has a separate IP (tested includes new start and more) . Well, it depends on how many accounts you are running Real IPs are still more trustworthy than some that are linked through shady niches or have other sketchy associations. That obviously doesn't work if you're running an army of accounts. In that case, you would need to set up a massive server infrastructure through a company or something similar to ensure it runs reliably, but definitely not rent anything somewhere or anything like that.
    2. Sorry, I mixed something up. I've been in IT school for 9 months. It's limited but possible to change IPs. For example, I work with a router setup that assigns a new public IP every time it restarts (manually or automatically). Depending on how many accounts you want to use, this method becomes impractical, but on a small scale, it works , especially if you have 2-3 additional SIM cards for mobile phones. As long as they stay connected to the network, they keep the same IP, but a restart results in a new one. add* If you buy proxies, it’s never really worth it since about 80% of them are flagged. Personally, I think it’s just a cycle to make money.
    3. To get a new public IP for a SOCKS5 proxy, you can set up a dynamic IP router that disconnects and reconnects automatically, triggering a new IP. This can be automated with a script restarting the WAN connection or using a VPS with a SOCKS5 server like Dante combined with a dynamic IP service. But that works for one active connection. Eg. I use my Home Network, and two Mobiles with each one sim. that are 3 Ips, with a code can u "reset" the connection each Acc switch or fix each acc,.
    4. dont't waste your time with buy proxys.. create your own virtual proxys.. the stupides buisiness.
    5. Now works with a special Scanner Class who scan every thing, everywhere and just now its very easy to create imaginar pathes for reactions walking eg, thank you
    6. Nice tutorial! This works only in unmapped normal maps. Does anyone know how to fix this in instances? Every new entry generates new IDs and tiles.
    7. enjoy.. create a package Woodcutter. then every chapter from my last post is an class (classname shows under the imports) this is an aio WC script with an ui, custom location eg more
    8. package Woodcutter; import org.dreambot.api.Client; import org.dreambot.api.methods.container.impl.Inventory; import org.dreambot.api.methods.dialogues.Dialogues; import org.dreambot.api.methods.interactive.GameObjects; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.methods.skills.Skill; import org.dreambot.api.methods.skills.Skills; import org.dreambot.api.methods.walking.impl.Walking; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.utilities.Logger; import org.dreambot.api.utilities.Sleep; import org.dreambot.api.utilities.Timer; import org.dreambot.api.wrappers.interactive.GameObject; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.io.IOException; import java.net.URL; import java.util.concurrent.TimeUnit; @ScriptManifest(category = Category.WOODCUTTING, name = "Dexters AIO Woodcutter priv ", author = "Dex Bot", version = 1.2) public class WoodcutterScript extends AbstractScript { private WoodcutterGUI gui; private boolean startScript; private static Timer timeRun; private boolean showPaint = true; private boolean leaderupboolean; private Image mainPaint = getImage("https://i.ibb.co/TkXmywv/Dexter-Free-Woodcutter-Paint.png"); boolean hasBanked = false; private long timeBegan; private int beginningXP; private int beginningLevel; private static final int[] XP_TABLE = { 0, 0, 83, 174, 276, 388, 512, 650, 801, 969, 1154, 1358, 1584, 1833, 2107, 2411, 2746, 3115, 3523, 3973, 4470, 5018, 5624, 6291, 7028, 7842, 8740, 9730, 10824, 12031, 13363, 14833, 16456, 18247, 20224, 22406, 24815, 27473, 30408, 33648, 37224, 41171, 45529, 50339, 55649, 61512, 67983, 75127, 83014, 91721, 101333, 111945, 123660, 136594, 150872, 166636, 184040, 203254, 224466, 247886, 273742, 302288, 333804, 368599, 407015, 449428, 496254, 547953, 605032, 668051, 737627, 814445, 899257, 992895, 1096278, 1210421, 1336443, 1475581, 1629200, 1798808, 1986068, 2192818, 2421087, 2673114, 2951373, 3258594, 3597792, 3972294, 4385776, 4842295, 5346332, 5902831, 6517253, 7195629, 7944614, 8771558, 9684577, 10692629, 11805606, 13034431, 200000000 }; @Override public void onStart() { SwingUtilities.invokeLater(() -> { gui = new WoodcutterGUI(this); gui.setVisible(true); }); timeRun = new Timer(); beginningXP = Skills.getExperience(Skill.WOODCUTTING); beginningLevel = Skills.getRealLevel(Skill.WOODCUTTING); timeBegan = System.currentTimeMillis(); } @Override public int onLoop() { if (startScript) { if (!Inventory.isFull()) { Methods.inventoryOpen(); Methods.runEnergy(); if (gui.getSelectedLocation().equals("Falador") && gui.getTreeType().equals("Yew tree")) { if (!Locations.faladorYew.contains(Players.getLocal().getTile())) { Walking.walk(Locations.faladorYew); Sleep.sleepUntil(() -> Locations.faladorYew.contains(Players.getLocal().getTile()), 2000, 3000); Walking.walk(Locations.faladorYewW); Sleep.sleepUntil(() -> Locations.faladorYewW.contains(Players.getLocal().getTile()), 1800, 3400); } else { Chop.chopYewFalador(); } } else if (gui.getSelectedLocation().equals("Castle Wars")) { if (!Locations.castleWarsChop.contains(Players.getLocal().getTile())) { Walking.walk(Locations.castleWarsChop); Sleep.sleepUntil(() -> Locations.castleWarsChop.contains(Players.getLocal().getTile()), 1500, 2800); } else { Chop.castleChop(); } }else if(gui.getSelectedLocation().equals("Ape Atoll")) { if (!Locations.apeAtoll.contains(Players.getLocal().getTile())) { Logger.log("Please start the Script in Ape Atoll"); } else if (!Locations.apeAtollchop.contains(Players.getLocal().getTile())) { Walking.walk(Locations.apeAtollchop); Sleep.sleepUntil(() -> Locations.apeAtollchop.contains(Players.getLocal().getTile()), 2000, 3000); } else { Chop.chopTree("Teak tree"); } } else if (gui.getSelectedLocation().equals("Woodcutting Guild")) { if(!Locations.woodcuttingGuild.contains(Players.getLocal().getTile()) && !Locations.redwoodUpArea.contains(Players.getLocal().getTile())){ log("Please start the Script in the Woodcutting Guild"); } else if (Locations.woodcuttingGuild.contains(Players.getLocal().getTile())){ Walking.walk(Locations.redwoodTreeArea); Sleep.sleepUntil(() -> Locations.redwoodTreeArea.contains(Players.getLocal().getTile()), 1500,2200); if(Locations.redwoodTreeArea.contains(Players.getLocal().getTile())){ GameObject leaderup = GameObjects.closest(Locations.leaderUp); if(leaderup != null){ leaderup.interact("Climb-up"); Sleep.sleep(2000,4000); } } } else if (Locations.redwoodUpArea.contains(Players.getLocal().getTile()) ){ Chop.chopRedwood(); } } else if (gui.getSelectedLocationArea().contains(Players.getLocal().getTile())) { Chop.chopTree(gui.getTreeType()); Dialogues.canContinue(); Antiban.lootBirdNest(); } else { if (Walking.walk(gui.getSelectedLocationArea().getRandomTile())) { Antiban.randomizeCamera(); Methods.runEnergy(); Dialogues.canContinue(); Sleep.sleepUntil(() -> gui.getSelectedLocationArea().contains(Players.getLocal().getTile()), 1000, 2600); } } } } if (Inventory.isFull()) { if (gui.getSelectedLocation().equals("Camelot")) { // log("Bank cami"); Banking.bankCamelot(); Methods.inventoryOpen(); Methods.runEnergy(); } else if (gui.getSelectedLocation().equals("Ape Atoll")) { Inventory.dropAll(item -> item != null && item.getName().contains("log")); } else if (gui.getSelectedLocation().equals("Varrock")) { // log("Bank varrock"); Banking.bankVarrock(); Methods.inventoryOpen(); Methods.runEnergy(); } else if (gui.getSelectedLocation().equals("Port Sarim")) { Banking.bankPortSarim(); Methods.inventoryOpen(); Methods.runEnergy(); } else if (gui.getSelectedLocation().equals("Castle Wars")) { Banking.bankCastle(); Methods.inventoryOpen(); Methods.runEnergy(); }else if (gui.getSelectedLocation().equals("Prifddinas")) { Banking.bankPrifddinas(); Methods.inventoryOpen(); Methods.runEnergy(); } else if (gui.getSelectedLocation().equals("Woodcutting Guild")) { Banking.bankGuild(); Methods.inventoryOpen(); Methods.runEnergy(); } else if (gui.getSelectedLocation().equals("Draynor")) { Banking.bankDraynor(); Methods.inventoryOpen(); Methods.runEnergy(); }else { // log("bank automatic"); Banking.bank(); Methods.inventoryOpen(); Methods.runEnergy(); } } return 200; } @Override public void onExit(){ super.onExit(); } @Override public void onPaint(Graphics g) { int currentLevel = 0; int xpGained = 0; int levelsGained = 0; long timeTNL = 0; if (showPaint) { int currentXp = Skills.getExperience(Skill.WOODCUTTING); xpGained = currentXp - beginningXP; currentLevel = Skills.getRealLevel(Skill.WOODCUTTING); levelsGained = currentLevel - beginningLevel; double nextLevelXp = XP_TABLE[currentLevel + 1]; // Stellen Sie sicher, dass currentLevel + 1 nicht außerhalb des Bereichs ist double xpTillNextLevel = nextLevelXp - currentXp; int xpPerHour = (int) (xpGained / ((System.currentTimeMillis() - this.timeBegan) / 3600000.0D)); timeTNL = (long) ((xpTillNextLevel / xpPerHour) * 3600000); g.drawImage(mainPaint, 0, 0, null); Font font = new Font("Times new roman", Font.BOLD, 13); g.setFont(font); g.setColor(Color.GRAY); breakHandlerPause(); int logsPerHour = (int) (Methods.logsCut / (timeRun.elapsed() / 3600000D)); g.drawString("" + timeRun.formatTime(), 128, 23); g.drawString("" + logsPerHour, 128, 95); g.drawString("" + Methods.logsCut, 128, 59); } g.drawString("XP Gained " + xpGained, 1, 130); g.drawString("Current Lvl: " + currentLevel + "/ Lvl Gained: " + levelsGained, 1, 145); g.drawString("TTL :" + ft(timeTNL), 1, 160); } private String ft(long duration) { long hours = TimeUnit.MILLISECONDS.toHours(duration); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) % 60; long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) % 60; return String.format("%02d:%02d:%02d", hours, minutes, seconds); } private Image getImage (String url){ try { return ImageIO.read(new URL(url)); }catch (IOException e){ return null; } } public static void breakHandlerPause() { if (!Client.isLoggedIn()) { timeRun.pause(); }else if(Client.isLoggedIn()){ timeRun.resume(); } } public boolean getStartScript(){ return startScript; } public void setStartScript(boolean startScript){ this.startScript = startScript; } } package Woodcutter; import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.combat.Combat; import org.dreambot.api.methods.container.impl.Inventory; import org.dreambot.api.methods.container.impl.equipment.Equipment; import org.dreambot.api.methods.container.impl.equipment.EquipmentSlot; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.methods.walking.impl.Walking; import org.dreambot.api.wrappers.items.Item; public class Methods { public static int logsCut; public static int previousLogCount; private static WoodcutterGUI gui; public Methods(WoodcutterGUI gui) { this.gui = gui; } public static boolean dropLogs() { if (gui.getDropLogs().isSelected() && Inventory.isFull()) { // Hier kannst du den Code ausführen, wenn die CheckBox ausgewählt ist Inventory.dropAll(item -> item != null && item.getName().contains("log")); return true; // Gib true zurück, da die Bedingung erfüllt ist und Logs fallen gelassen wurden } return false; // Gib false zurück, wenn die Bedingung nicht erfüllt ist oder das Inventar nicht voll ist } public static void runEnergy() { int howEnergy = Walking.getRunEnergy(); if (!Walking.isRunEnabled()) { if (howEnergy > 35 && howEnergy <= 100 && Calculations.random(0, 100) < 35) { Walking.toggleRun(); } } } public static void specialAttack(){ Item weapon = Equipment.getItemInSlot(EquipmentSlot.WEAPON); if (weapon != null && weapon.getName().contains("Dragon")) { if (Combat.getSpecialPercentage() == 100 && !Combat.isSpecialActive() && (Players.getLocal().getAnimation() == 10071 || Players.getLocal().getAnimation() == 2846)) { Calculations.random(2000, 5000); Combat.toggleSpecialAttack(true); Antiban.moveMouseRandom(); } } } public static void inventoryOpen(){ if(!Inventory.isOpen()){ Antiban.checkLevel(); Inventory.open(); } } public static void countLogs() { Item[] logs = Inventory.all(item -> item != null && item.getName().contains("ogs")).toArray(new Item[0]); int currentLogCount = logs.length; int logsToAdd = currentLogCount - previousLogCount; if (logsToAdd > 0) { logsCut += logsToAdd; } // Aktualisiere die vorherige Log-Anzahl previousLogCount = currentLogCount; } } package Woodcutter; import org.dreambot.api.input.Mouse; import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.input.Camera; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.methods.item.GroundItems; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.skills.Skills; import org.dreambot.api.utilities.Sleep; import org.dreambot.api.wrappers.items.GroundItem; import org.dreambot.api.utilities.Timer; import java.awt.*; public class Antiban { public static int probabilityLimit = Calculations.random(2, 15); public static int randomizeLimit = Calculations.random(0, 120); public static void moveMouseOutDelay() { int maxAnimationDuration = Calculations.random(2000, 6000); int animationTimer = 0; while (Players.getLocal().getAnimation() != -1 && animationTimer < maxAnimationDuration) { Sleep.sleep(100); // Kurze Pause, um die Schleife nicht zu überlasten animationTimer += 100; } if (animationTimer >= maxAnimationDuration) { Mouse.moveOutsideScreen(); } } public static void randomizeCamera() { if (randomizeLimit < probabilityLimit) { // Zufällige Kamerabewegung int randomYaw = Calculations.random(0, 2000); int randomPitch = Calculations.random(224, 383); Camera.rotateTo(randomYaw, randomPitch); Sleep.sleep(200, 400); } } public static void randomizeCamerarare() { if (Calculations.random(0, 260) < 1) { // Zufällige Kamerabewegung int randomYaw = Calculations.random(0, 1000); int randomPitch = Calculations.random(128, 383); Camera.rotateTo(randomYaw, randomPitch); moveMouseRandom(); moveMouseOutDelay(); Sleep.sleep(200, 400); } } public static void moveMouseRandom() { int chance = Calculations.random(0, 100); if (chance < 30) { // 30% chance int x = Calculations.random(0, 1200); int y = Calculations.random(0, 760); Mouse.move(new Point(x, y)); int clickChance = Calculations.random(0, 100); if (clickChance < 10) // 10% chance of right-clicking Mouse.click(true); else if (clickChance < 5) // 5% chance of left-clicking Mouse.click(); } } public static void lootBirdNest() { GroundItem item = GroundItems.closest(bird -> bird != null && bird.getName().contains("nest") && bird.getID() != 5075); if (item != null) { item.interact("Take"); Sleep.sleep(1500, 2200); } } public static void checkLevel() { int chance = Calculations.random(0, 100); if (chance < 1) { if (!Skills.open()) { Skills.open(); } } } public static final Area cooksGuild = new Area(3136, 3454, 3153, 3442); // Anti Ban lagging Bank Area Cooks Guild!: } package Woodcutter; import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.container.impl.Inventory; import org.dreambot.api.methods.container.impl.Shop; import org.dreambot.api.methods.container.impl.bank.Bank; import org.dreambot.api.methods.container.impl.bank.BankLocation; import org.dreambot.api.methods.container.impl.bank.BankType; import org.dreambot.api.methods.container.impl.equipment.Equipment; import org.dreambot.api.methods.container.impl.equipment.EquipmentSlot; import org.dreambot.api.methods.depositbox.DepositBox; import org.dreambot.api.methods.dialogues.Dialogues; import org.dreambot.api.methods.interactive.GameObjects; import org.dreambot.api.methods.interactive.NPCs; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.map.Tile; import org.dreambot.api.methods.walking.impl.Walking; import org.dreambot.api.methods.widget.Widgets; import org.dreambot.api.utilities.Logger; import org.dreambot.api.utilities.Sleep; import org.dreambot.api.wrappers.interactive.GameObject; import org.dreambot.api.wrappers.interactive.NPC; import org.dreambot.api.wrappers.widgets.WidgetChild; import static Woodcutter.Locations.*; import static Woodcutter.WoodcutterGUI.*; public class Banking { public static void bankVarrock(){ boolean logsDropped = Methods.dropLogs(); if (Bank.isOpen() && !logsDropped) { if (Inventory.onlyContains(item -> item != null && item.getName().contains("axe")) || Bank.depositAllExcept(item -> item != null && item.getName().contains("axe"))) { Sleep.sleep(400, 900); if (Sleep.sleepUntil(() -> !Inventory.isFull(), 8000)) { Sleep.sleep(500, 800); if (Bank.close()) { Sleep.sleepUntil(() -> !Bank.isOpen(), 8000); } } } } else { GameObject bankBooth = GameObjects.closest(object -> object != null && object.getName().contains("booth")); if(!getBankArea_Varrock.contains(Players.getLocal())&& !logsDropped) { Walking.walk(getBankArea_Varrock); Sleep.sleepUntil(() -> getBankArea_Varrock.contains(Players.getLocal().getTile()), 1800, 2400); }else if (getBankArea_Varrock.contains(Players.getLocal().getTile()) && !logsDropped) { bankBooth.interact("Bank"); Sleep.sleepUntil(() -> Bank.isOpen(), 5500); if(Dialogues.canContinue()){ bankBooth.interact("Bank"); Sleep.sleepUntil(() -> Bank.isOpen(), 5500); } } } } public static void bankPortSarim(){ boolean logsDropped = Methods.dropLogs(); if (DepositBox.isOpen() && !logsDropped) { if (Inventory.onlyContains(item -> item != null && item.getName().contains("axe")) || DepositBox.depositAllExcept(item -> item != null && item.getName().contains("axe"))) { Sleep.sleep(400, 900); if (Sleep.sleepUntil(() -> !Inventory.isFull(), 8000)) { Sleep.sleep(500, 800); if (DepositBox.close()) { Sleep.sleepUntil(() -> !DepositBox.isOpen(), 8000); } } } } else { GameObject bankDepositBox = GameObjects.closest(object -> object != null && object.getName().contains("Bank deposit box")); if(!Locations.portSarimBox.contains(Players.getLocal())&& !logsDropped) { Walking.walk(Locations.portSarimBox.getRandomTile()); Sleep.sleepUntil(() -> Locations.portSarimBox.contains(Players.getLocal().getTile()), 1200, 1900); }else if (Locations.portSarimBox.contains(Players.getLocal().getTile()) && !logsDropped) { bankDepositBox.interact("Deposit"); Sleep.sleepUntil(() -> DepositBox.isOpen(), 5500); } } } public static void bankGuild(){ boolean logsDropped = Methods.dropLogs(); if (Bank.isOpen() && !logsDropped) { if (Inventory.onlyContains(item -> item != null && item.getName().contains("axe")) || Bank.depositAllExcept(item -> item != null && item.getName().contains("axe"))) { Sleep.sleep(400, 900); if (Sleep.sleepUntil(() -> !Inventory.isFull(), 8000)) { Sleep.sleep(500, 800); if (Bank.close()) { Sleep.sleepUntil(() -> !Bank.isOpen(), 8000); } } } } else { GameObject bankDepositBox = GameObjects.closest(object -> object != null && object.getName().contains("Bank chest")); if(!woodcuttingGuildBank.contains(Players.getLocal())&& !logsDropped) { GameObject leaderDown = GameObjects.closest(Locations.leaderDown); if (leaderDown != null){ leaderDown.interact("Climb-down"); Sleep.sleepUntil(() -> redwoodTreeArea.contains(Players.getLocal().getTile()), 2000,3000); } Walking.walk(woodcuttingGuildBank.getRandomTile()); Sleep.sleepUntil(() -> woodcuttingGuildBank.contains(Players.getLocal().getTile()), 1200, 1900); }else if (woodcuttingGuildBank.contains(Players.getLocal().getTile()) && !logsDropped) { bankDepositBox.interact("Use"); Sleep.sleepUntil(() -> DepositBox.isOpen(), 5500); } } } public static void bankCamelot(){ boolean logsDropped = Methods.dropLogs(); if (Bank.isOpen() && !logsDropped) { if (Inventory.onlyContains(item -> item != null && item.getName().contains("axe")) || Bank.depositAllExcept(item -> item != null && item.getName().contains("axe"))) { Sleep.sleep(400, 900); if (Sleep.sleepUntil(() -> !Inventory.isFull(), 8000)) { Sleep.sleep(500, 800); if (Bank.close()) { Sleep.sleepUntil(() -> !Bank.isOpen(), 8000); } } } } else { GameObject bankBooth = GameObjects.closest(object -> object != null && object.getName().contains("Bank booth") && !logsDropped); if(!bankArea_Camelot.contains(Players.getLocal())&& !logsDropped) { Walking.walk(bankArea_Camelot.getRandomTile()); Sleep.sleepUntil(() -> bankArea_Camelot.contains(Players.getLocal().getTile()), 1200, 1900); }else if (bankArea_Camelot.contains(Players.getLocal().getTile()) && !logsDropped) { bankBooth.interact("Bank"); Sleep.sleepUntil(() -> Bank.isOpen(), 5500); } } } public static void bankDraynor(){ boolean logsDropped = Methods.dropLogs(); if (Bank.isOpen() && !logsDropped) { if (Inventory.onlyContains(item -> item != null && item.getName().contains("axe")) || Bank.depositAllExcept(item -> item != null && item.getName().contains("axe"))) { Sleep.sleep(400, 900); if (Sleep.sleepUntil(() -> !Inventory.isFull(), 8000)) { Sleep.sleep(500, 800); if (Bank.close()) { Sleep.sleepUntil(() -> !Bank.isOpen(), 8000); } } } } else { GameObject bankBooth = GameObjects.closest(object -> object != null && object.getName().contains("Bank booth") && !logsDropped); if(!bankArea_Draynor.contains(Players.getLocal())&& !logsDropped) { Walking.walk(bankArea_Draynor); Sleep.sleepUntil(() -> bankArea_Draynor.contains(Players.getLocal().getTile()), 1200, 1900); }else if (bankArea_Draynor.contains(Players.getLocal().getTile()) && !logsDropped) { bankBooth.interact("Bank"); Sleep.sleepUntil(() -> Bank.isOpen(), 5500); } } } public static void bankPrifddinas(){ boolean logsDropped = Methods.dropLogs(); if (Bank.isOpen() && !logsDropped) { if (Inventory.onlyContains(item -> item != null && item.getName().contains("axe")) || Bank.depositAllExcept(item -> item != null && item.getName().contains("axe"))) { Sleep.sleep(400, 900); if (Sleep.sleepUntil(() -> !Inventory.isFull(), 8000)) { Sleep.sleep(500, 800); if (Bank.close()) { Sleep.sleepUntil(() -> !Bank.isOpen(), 8000); } } } } else { NPC banker = NPCs.closest(npc -> npc != null && npc.hasAction("Bank") && !logsDropped); if(!prifddinas_Bank.contains(Players.getLocal())&& !logsDropped) { Walking.walk(prifddinas_Bank); Sleep.sleepUntil(() -> prifddinas_Bank.contains(Players.getLocal().getTile()), 900, 1500); }else if (prifddinas_Bank.contains(Players.getLocal().getTile()) && !logsDropped) { banker.interact("Bank"); Sleep.sleepUntil(() -> Bank.isOpen(), 4000); } } } public static void bank() { boolean logsDropped = Methods.dropLogs(); if (Bank.isOpen() && !logsDropped) { if (Inventory.onlyContains(item -> item != null && item.getName().contains("axe")) || Bank.depositAllExcept(item -> item != null && item.getName().contains("axe"))) { Sleep.sleep(400, 900); if (Sleep.sleepUntil(() -> !Inventory.isFull(), 8000)) { Sleep.sleep(500, 800); if (Bank.close()) { Sleep.sleepUntil(() -> !Bank.isOpen(), 8000); } } } } else { GameObject bankBooth = GameObjects.closest(object -> object != null && (object.getName().contains("Bank booth") || object.getName().contains("Bank chest")) && object.canReach()); Tile nearestBankTile = BankLocation.getNearest().getTile(); if (!nearestBankTile.getArea(4).contains(Players.getLocal()) && !logsDropped) { Walking.walk(nearestBankTile); Sleep.sleepUntil(() -> Players.getLocal().getTile().equals(nearestBankTile), 1800, 2300); } else if (nearestBankTile.getArea(4).contains(Players.getLocal()) && !logsDropped) { bankBooth.interact(); Sleep.sleepUntil(() -> Bank.isOpen(), 3000); } } } public static void bankCastle() { boolean logsDropped = Methods.dropLogs(); int DuelRing = 2552; if (Bank.isOpen() && !logsDropped) { if (Inventory.onlyContains(item -> item != null && item.getName().contains("axe")) || Bank.depositAllExcept(item -> item != null && item.getName().contains("axe"))) { Sleep.sleep(400, 900); if (Sleep.sleepUntil(() -> !Inventory.isFull(), 8000)) { if(getUseRings().isSelected() && Equipment.getItemInSlot(EquipmentSlot.RING) == null && !Inventory.contains(DuelRing)){ if (Bank.withdraw(DuelRing, 1)) { Sleep.sleepUntil(() -> Inventory.contains(DuelRing), 2000); if (Inventory.contains(DuelRing)) { // Duellring erfolgreich abgehoben, Ausrüsten und Bank schließen Inventory.interact(DuelRing, "Wear"); //Logger.log("Ring ausgerüstet"); Calculations.random(1000, 1500); // Setzen Sie state auf den nächsten gewünschten Zustand (zum Beispiel State.WalkingToBrun) } } } Sleep.sleep(500, 800); if (Bank.close()) { Sleep.sleepUntil(() -> !Bank.isOpen(), 8000); } } } } else { GameObject bankBooth = GameObjects.closest(object -> object != null && object.getName().contains("chest") && !Antiban.cooksGuild.contains(Players.getLocal().getTile())); if (!castleWarsArea.contains(Players.getLocal()) && !logsDropped) { Walking.walk(castleWarsArea); Sleep.sleepUntil(() -> castleWarsArea.contains(Players.getLocal().getTile()), 1200, 1900); } else if (castleWarsArea.contains(Players.getLocal()) && !logsDropped) { bankBooth.interact("Use"); Sleep.sleepUntil(() -> Bank.isOpen(), 3000); } } }} // public static void bankTai() { // Logger.log("Methode start bank"); // boolean logsDropped = Methods.dropLogs(); // GameObject doorThai = GameObjects.closest(doorTai); // WidgetChild depotTitel = Widgets.get(323, 1); // ParentID, Child ID // WidgetChild depotKacheln = Widgets.get(669, 3, 0-28); // ParentID, Child ID 0-27 für normale abheben! // // Area outChop = new Area(2816, 3095, 2801, 3077); // Area midleChop = new Area(2800, 3099, 2788, 3084); // Area westChop = new Area(2787, 3101, 2777, 3090); // // if(!chopArea_Wanai.contains(Players.getLocal().getTile()) && !logsDropped) { // Walking.walk(midleChop); // Sleep.sleepUntil(() -> midleChop.contains(Players.getLocal().getTile()), 3400, 4500); // // Walking.walk(westChop); // Sleep.sleepUntil(() -> westChop.contains(Players.getLocal().getTile()), 2300); // // // NPC parcel = NPCs.closest(npc -> npc != null && npc.getName().contains("Rionasta")); // parcel.interact("Send-parcel"); // Sleep.sleepUntil(() -> depotTitel != null && depotTitel.isVisible(), 7000); // if (depotTitel != null && depotTitel.isVisible()) { // depotKacheln.interact("pack-ALL"); // Sleep.sleepUntil(() -> !Inventory.isFull(), 3000); // } // // }else{ // doorThai.interact(); // Sleep.sleepUntil(() -> outChop.contains(Players.getLocal().getTile()), 10000); // // } // // } package Woodcutter; import org.dreambot.api.input.Mouse; import org.dreambot.api.methods.container.impl.Inventory; import org.dreambot.api.methods.dialogues.Dialogues; import org.dreambot.api.methods.interactive.GameObjects; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.methods.walking.impl.Walking; import org.dreambot.api.methods.world.World; import org.dreambot.api.methods.world.Worlds; import org.dreambot.api.methods.worldhopper.WorldHopper; import org.dreambot.api.utilities.Logger; import org.dreambot.api.utilities.Sleep; import org.dreambot.api.wrappers.interactive.GameObject; import static Woodcutter.Methods.*; import static Woodcutter.Locations.*; public class Chop { public static void chopTree(String nameOfTree) { countLogs(); Antiban.lootBirdNest(); runEnergy(); GameObject tree = GameObjects.closest(gameObject -> gameObject != null && gameObject.getName().equals(nameOfTree)); if (Players.getLocal().getAnimation() == -1) { Dialogues.canContinue(); if (tree != null && Players.getLocal().getAnimation() == -1) { Dialogues.canContinue(); tree.interact("Chop down"); Dialogues.canContinue(); Sleep.sleepUntil(() -> Players.getLocal().getAnimation() != -1, 15000); Dialogues.canContinue(); Antiban.moveMouseRandom(); Antiban.moveMouseOutDelay(); specialAttack(); Antiban.randomizeCamerarare(); } } } public static void chopRedwood() { countLogs(); Antiban.lootBirdNest(); runEnergy(); Antiban.randomizeCamerarare(); GameObject tree = GameObjects.closest(gameObject -> gameObject != null && gameObject.hasAction("Cut")); if (Players.getLocal().getAnimation() == -1) { if (tree != null && tree.interact("Cut")) { Sleep.sleepUntil(() -> Players.getLocal().getAnimation() != -1, 15000); Antiban.moveMouseRandom(); Antiban.moveMouseOutDelay(); specialAttack(); Antiban.randomizeCamerarare(); } } } // public static void chopTai() {Logger.log("Start chop thai"); // countLogs(); // Antiban.lootBirdNest(); // runEnergy(); // GameObject doorThai = GameObjects.closest(doorTai); // GameObject tree = GameObjects.closest(gameObject -> gameObject != null && gameObject.getName().equals("Mahogany tree")); // Logger.log("chop"); // // if (chopArea_Wanai.contains(Players.getLocal().getTile()) && thaiArea.contains(Players.getLocal().getTile()) && !Inventory.isFull()){ // if (Players.getLocal().getAnimation() == -1 && !Inventory.isFull()){ Logger.log("chop bedingungen vor chop"); // // if (tree != null && tree.interact("Chop down")&& !Inventory.isFull()) { // Logger.log("start chop tree"); // Sleep.sleepUntil(() -> Players.getLocal().getAnimation() != -1, 15000); // Antiban.moveMouseRandom(); // Antiban.moveMouseOutDelay(); // specialAttack(); // Antiban.randomizeCamerarare(); // } // } // }else { Logger.log("chop ist nicht in area start door interact"); // Walking.walk(thaiDoor.getRandomTile()); // Sleep.sleepUntil(() -> thaiDoor.contains(Players.getLocal().getTile()),1200, 2600); // doorThai.interact("Quick-Pay(100)"); // Sleep.sleepUntil(() -> chopArea_Wanai.contains(Players.getLocal().getTile()), 4000); // } // } public static void castleChop(){ countLogs(); Antiban.lootBirdNest(); runEnergy(); GameObject tree = GameObjects.closest(gameObject -> gameObject != null && gameObject.getName().equals("Teak tree")); if(castleWarsChop.contains(tree)){ if (Players.getLocal().getAnimation() == -1) { countLogs(); if (tree != null && tree.interact("Chop down")) { Sleep.sleepUntil(() -> Players.getLocal().getAnimation() != -1, 15000); Antiban.moveMouseRandom(); Antiban.moveMouseOutDelay(); specialAttack(); Antiban.randomizeCamerarare(); countLogs(); } } }else{ // World randomMemberWorld = Worlds.getRandomWorld(w -> w.isMembers() && w.getMinimumLevel() < 500 && w.isNormal()); // WorldHopper.hopWorld(randomMemberWorld); // Sleep.sleep(3800,5500); Mouse.moveOutsideScreen(); Sleep.sleepUntil(() -> castleWarsChop.contains(tree),3500,5500); } } public static void chopYewFalador() { countLogs(); Antiban.lootBirdNest(); runEnergy(); GameObject tree = GameObjects.closest(gameObject -> gameObject != null && gameObject.getName().equals("Yew tree")); if (tree != null && Locations.faladorYewW.contains(Players.getLocal().getTile())) { if (Players.getLocal().getAnimation() == -1 && Locations.faladorYewW.contains(tree)) { chopTreeSpecific(); } else { Walking.walk(Locations.faladorY.getRandomTile()); Sleep.sleepUntil(() -> Locations.faladorY.contains(Players.getLocal().getTile()), 2500, 3400); } } else if (tree != null && Locations.faladorY.contains(Players.getLocal().getTile()) ) { if (Players.getLocal().getAnimation() == -1 && Locations.faladorY.contains(tree)) { chopTreeSpecific(); } else { Walking.walk(Locations.faladorYo.getRandomTile()); Sleep.sleepUntil(() -> Locations.faladorYo.contains(Players.getLocal().getTile()), 2500, 3400); } } else if (tree != null && Locations.faladorYo.contains(Players.getLocal().getTile())) { if (Players.getLocal().getAnimation() == -1 && Locations.faladorYo.contains(tree)) { chopTreeSpecific(); }else{ Walking.walk(Locations.faladorYewW.getRandomTile()); Sleep.sleepUntil(() -> Locations.faladorYewW.contains(Players.getLocal().getTile()), 2500, 3400); } } } private static void chopTreeSpecific() { countLogs(); // Test TODO GameObject tree = GameObjects.closest(gameObject -> gameObject != null && gameObject.getName().equals("Yew tree")); tree.interact("Chop down"); Sleep.sleepUntil(() -> Players.getLocal().getAnimation() != -1, 15000); Antiban.moveMouseRandom(); Antiban.moveMouseOutDelay(); specialAttack(); Antiban.randomizeCamerarare(); Sleep.sleepUntil(() -> Players.getLocal().getAnimation() == -1, 5000000); } } package Woodcutter; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.map.Tile; public class Locations { // LUMBRIDGE:___________________________________________________________________________________________________________ public static final Area lumbridgeTree = new Area(3199, 3229, 3169, 3209); // public static final Area lumbridgeYew = new Area(3148, 3234, 3187, 3216); public static final Area lumbridgeOak = new Area(3207, 3237, 3185, 3255); public static final Area lumbridgeWillow = new Area( new Tile(3234, 3233), new Tile(3234, 3243), new Tile(3226, 3243), new Tile(3226, 3249), new Tile(3234, 3249), new Tile(3237, 3246), new Tile(3235, 3243), new Tile(3238, 3237) ); // DRAYNOR______________________________________________________________________________________________________________ public static final Area draynorTree = new Area(3073, 3275, 3086, 3264); // public static final Area draynorOak = new Area( new Tile(3130, 3247), new Tile(3131, 3252), new Tile(3131, 3258), new Tile(3128, 3260), new Tile(3120, 3260), new Tile(3114, 3258), new Tile(3113, 3254), new Tile(3111, 3249), new Tile(3108, 3241), new Tile(3111, 3236), new Tile(3119, 3236), new Tile(3121, 3240), new Tile(3121, 3247) ); public static final Area draynorWillow = new Area( new Tile(3087, 3240), new Tile(3092, 3240), new Tile(3094, 3233), new Tile(3091, 3224), new Tile(3087, 3224), new Tile(3085, 3233), new Tile(3078, 3240), new Tile(3087, 3243) ); // Port Sarim:__________________________________________________________________________________________________________ public static final Area portSarimWillow = new Area(3056, 3256, 3064, 3251); public static final Area portSarimOak = new Area(3013, 3279, 3042, 3271); // Falador:_____________________________________________________________________________________________________________ public static final Area faladorYew = new Area( // full Area Yew Falador new Tile(3003, 3321), new Tile(2991, 3313), new Tile(2997, 3308), new Tile(3014, 3314), new Tile(3021, 3314), new Tile(3023, 3315), new Tile(3048, 3314), new Tile(3045, 3324) ); public static final Area faladorY = new Area(3031, 3325, 3015, 3314); // middle public static final Area faladorYo = new Area(3048, 3325, 3032, 3314); //ost public static final Area faladorYewW = new Area( //west new Tile(3015, 3312), new Tile(3015, 3321), new Tile(3000, 3321), new Tile(2992, 3313), new Tile(2993, 3308) ); public static final Area faladorOak = new Area(3044, 3311, 3064, 3326); // Varrock:_____________________________________________________________________________________________________________ public static final Area varrockMhTree = new Area( // new Tile(3145, 3464), new Tile(3145, 3456), new Tile(3149, 3456), new Tile(3152, 3446), new Tile(3164, 3451), new Tile(3173, 3451), new Tile(3173, 3457), new Tile(3161, 3461), new Tile(3152, 3466) ); public static final Area varrockTreeWest = new Area(3147, 3443, 3131, 3420); // public static final Area varrockOakWest = new Area(3172, 3423, 3161, 3411); public static final Area varrockOakMH = new Area(3188, 3464, 3196, 3458); public static final Area varrockOak = new Area(3160, 3422, 3170, 3411); public static final Area varrockYew = new Area( new Tile(3207, 3498), new Tile(3225, 3498), new Tile(3225, 3507), new Tile(3201, 3507), new Tile(3201, 3501), new Tile(3205, 3501) ); // Camelot______________________________________________________________________________________________________________ public static final Area camelotTree = new Area(2697, 3469, 2680, 3483); public static final Area camelotMaple = new Area(2719, 3499, 2733, 3505); public static final Area camelotWillow = new Area(2704, 3514, 2713, 3506); public static final Area camelotOak = new Area(2697, 3469, 2677, 3483); public static final Area camelotYew = new Area(2704, 3466, 2716, 3458); public static final Area camelotMagic = new Area(2707, 3400, 2698, 3395); // Tai Bwo Wanai________________________________________________________________________________________________________ public static final Area chopArea_Wanai = new Area( new Tile(2828, 3090), new Tile(2818, 3090), new Tile(2817, 3089), new Tile(2817, 3078), new Tile(2818, 3077), new Tile(2828, 3077), new Tile(2829, 3079), new Tile(2829, 3089) ); public static final Area thaiDoor = new Area(2816, 3088, 2813, 3077); public static final Area taiShop = new Area(2776, 3090, 2790, 3097); public static final Area thaiArea = new Area(2830, 3095, 2773, 3075); // Castel Wars________________________________________________________________________________________________________ public static final Area castleWarsChop = new Area(2331, 3051, 2336, 3046); public static final Area castleWarsArea = new Area( new Tile(2436, 3095), new Tile(2445, 3095), new Tile(2445, 3084), new Tile(2446, 3084), new Tile(2447, 3082), new Tile(2446, 3081), new Tile(2444, 3081), new Tile(2443, 3082), new Tile(2438, 3082), new Tile(2437, 3082), new Tile(2437, 3095) ); // Custom:______________________________________________________________________________________________________________ public static final Area bankArea_Camelot = new Area(2721, 3493, 2729, 3490); // Camelot Manual-Banking-Method public static final Area bankArea_Draynor = new Area(3092, 3246, 3092, 3240); // Draynor Manual-Banking-Method public static final Area getBankArea_Varrock = new Area(3160, 3493, 3169, 3486); // GE Manual-Banking-Method public static final Area portSarimBox = new Area(3043, 3237, 3050, 3234); // Ape_Atoll:______________________________________________________________________________________________________________ public static final Area apeAtollchop = new Area(2771, 2701, 2779, 2693); public static final Area apeAtoll = new Area(2689, 2813, 2815, 2687); // Soul_Wars:______________________________________________________________________________________________________________ public static final Area soulWars = new Area(2184, 2994, 2189, 2987); // Prifddinas:______________________________________________________________________________________________________________ public static final Area prifddinas_Bank = new Area(3255, 6103, 3259, 6107); public static final Area prifddinas_Teak = new Area( new Tile(3314, 6121), new Tile(3310, 6125), new Tile(3306, 6121), new Tile(3310, 6117) ); // WC_Guild:______________________________________________________________________________________________________________ public static final Area woodcuttingGuild = new Area(1559, 3519, 1657, 3472); public static final Area woodcuttingGuildBank = new Area(1590, 3478, 1592, 3475); public static int BankBox = 26254; //Deposit public static int leaderUp = 28857; // Climb-up public static int leaderDown = 28858; // Climb-up //Redwood tree "Cut" public static final Area redwoodUpArea = new Area( new Tile(1574,3483,1),//First plateau new Tile(1574,3482,1), new Tile(1574,3481,1), new Tile(1574,3480,1), new Tile(1574,3479,1), new Tile(1573,3479,1), new Tile(1572,3479,1), new Tile(1571,3479,1), new Tile(1570,3479,1), new Tile(1569,3479,1), new Tile(1568,3479,1), new Tile(1567,3479,1), new Tile(1567,3480,1), new Tile(1567,3481,1), new Tile(1567,3482,1), new Tile(1567,3483,1), new Tile(1567,3484,1), new Tile(1567,3485,1), new Tile(1567,3486,1), new Tile(1568,3486,1), new Tile(1569,3486,1), new Tile(1570,3486,1), new Tile(1571,3486,1), new Tile(1572,3486,1), new Tile(1573,3486,1), new Tile(1574,3486,1), new Tile(1574,3485,1), new Tile(1574,3484,1), new Tile(1571,3487,1),//middle plateau new Tile(1570,3487,1), new Tile(1570,3488,1), new Tile(1571,3488,1), new Tile(1574,3489,1),//right plateau new Tile(1573,3489,1), new Tile(1572,3489,1), new Tile(1571,3489,1), new Tile(1570,3489,1), new Tile(1569,3489,1), new Tile(1568,3489,1), new Tile(1567,3489,1),// new Tile(1567,3490,1), new Tile(1567,3491,1), new Tile(1567,3492,1), new Tile(1567,3493,1), new Tile(1567,3494,1), new Tile(1567,3495,1), new Tile(1567,3496,1),// new Tile(1568,3496,1), new Tile(1569,3496,1), new Tile(1570,3496,1), new Tile(1571,3496,1), new Tile(1572,3496,1), new Tile(1573,3496,1), new Tile(1574,3496,1),// new Tile(1574,3495,1), new Tile(1574,3494,1), new Tile(1574,3493,1), new Tile(1574,3492,1), new Tile(1574,3491,1), new Tile(1574,3490,1) ); public static final Area redwoodTreeArea = new Area(1574, 3487, 1576, 3479); } package Woodcutter; import java.awt.*; import java.awt.event.*; import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import java.util.Objects; import javax.imageio.ImageIO; import javax.swing.*; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.map.Tile; import org.dreambot.api.wrappers.interactive.Player; import javax.swing.ImageIcon; import java.net.URL; import static org.dreambot.api.utilities.Logger.log; /** * @author Dexter */ public class WoodcutterGUI extends JFrame { private final WoodcutterScript classswitch; private Map<String, String[]> locationMap; private Map<String, Map<String, Area>> locationTreeMap; public WoodcutterGUI(WoodcutterScript main) { this.classswitch = main; initComponents(); initTreeImageLabel(); initLocationMap(); initLocationTreeMap(); updateLocationComboBox(); // default? pack(); // Adjust all components to fit well setLocationRelativeTo(null); // Center on screen setVisible(true); // Finally, make the GUI visible } private void button1(ActionEvent e) { classswitch.setStartScript(true); this.setVisible(false); } private void initComponents() { button1 = new JButton(); label1 = new JLabel(); label2 = new JLabel(); treeTypeComboBox = new JComboBox<>(); comboBox2 = new JComboBox(); treeImageLabel = new JLabel(); dropLogs = new JCheckBox(); useRings = new JCheckBox(); updateTreeImage(); initTreeImageLabel(); initLocationMap(); treeTypeComboBox.setSelectedItem("Tree");//default? //======== this ======== setIconImage(null); setTitle("Settings Dexter Woodcutter"); Container contentPane = getContentPane(); contentPane.setLayout(null); //---- button1 ---- button1.setText("Run Woodcutting"); button1.addActionListener(e -> button1(e)); contentPane.add(button1); button1.setBounds(220, 400, 170, button1.getPreferredSize().height); //---- label1 ---- label1.setText("Select your tree Type:"); contentPane.add(label1); label1.setBounds(5, 20, 140, label1.getPreferredSize().height); //---- label2 ---- label2.setText("Select your Location:"); contentPane.add(label2); label2.setBounds(5, 200, 140, 17); //---- treeTypeComboBox ---- treeTypeComboBox.setModel(new DefaultComboBoxModel<>(new String[] { "Tree", "Oak tree", "Willow tree", "Maple tree", "Yew tree", "Teak tree", "Mahogany tree", "Magic tree", "Redwood tree" })); treeTypeComboBox.addActionListener(e -> { updateTreeImage(); updateLocationComboBox(); }); treeTypeComboBox.addActionListener(this::updateTreeAndLocationComboBoxes); contentPane.add(treeTypeComboBox); treeTypeComboBox.setBounds(150, 15, 225, treeTypeComboBox.getPreferredSize().height); //---- comboBox2 ---- comboBox2.setModel(new DefaultComboBoxModel<>(new String[]{"Custom"})); // Include "Custom" as an option comboBox2.addActionListener(this::comboBox2ActionPerformed); getContentPane().add(comboBox2); comboBox2.setBounds(150, 195, 230, comboBox2.getPreferredSize().height); //---- treeImageLabel ---- contentPane.add(treeImageLabel); treeImageLabel.setBounds(5, 50, 60, 50); //---- dropLogs ---- dropLogs.setText("Drop Logs"); contentPane.add(dropLogs); dropLogs.setBounds(new Rectangle(new Point(5, 125), dropLogs.getPreferredSize())); //-----useRings-------- useRings.setText("Use Ring of dueling"); contentPane.add(useRings); useRings.setBounds(new Rectangle(new Point(5, 145), useRings.getPreferredSize())); { // compute preferred size Dimension preferredSize = new Dimension(); for(int i = 0; i < contentPane.getComponentCount(); i++) { Rectangle bounds = contentPane.getComponent(i).getBounds(); preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width); preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height); } Insets insets = contentPane.getInsets(); preferredSize.width += insets.right; preferredSize.height += insets.bottom; contentPane.setMinimumSize(preferredSize); contentPane.setPreferredSize(preferredSize); } pack(); setLocationRelativeTo(getOwner()); } private JButton button1; private JLabel label1; private JLabel label2; private JComboBox<String> treeTypeComboBox; private JComboBox comboBox2; private JLabel treeImageLabel; private static JCheckBox dropLogs; private static JCheckBox useRings; private void openRadiusInputDialog() { JFrame radiusInputFrame = new JFrame("Custom Location Radius"); radiusInputFrame.setLayout(new FlowLayout()); JTextField radiusField = new JTextField(5); JButton setRadiusButton = new JButton("Set Radius"); setRadiusButton.addActionListener(e -> { try { int radius = Integer.parseInt(radiusField.getText()); Player player = Players.getLocal(); if (player != null) { Tile playerTile = player.getTile(); // Get current player's tile Area customArea = new Area(playerTile.getX() - radius, playerTile.getY() - radius, playerTile.getX() + radius, playerTile.getY() + radius); // Create area around player // Ensure Custom Location map is initialized if (!locationTreeMap.containsKey("Custom Location")) { locationTreeMap.put("Custom Location", new HashMap<>()); } // Set this area for all tree types for (String treeType : locationMap.keySet()) { locationTreeMap.get("Custom Location").put(treeType, customArea); } log("Custom Tile Area set for" + getTreeType() + " : Center at " + playerTile + " with radius " + radius); radiusInputFrame.dispose(); // Close the window upon successful operation } else { JOptionPane.showMessageDialog(radiusInputFrame, "Player not found, cannot set location.", "Error", JOptionPane.ERROR_MESSAGE); } } catch (NumberFormatException ex) { JOptionPane.showMessageDialog(radiusInputFrame, "Please enter a valid number for radius.", "Error", JOptionPane.ERROR_MESSAGE); } }); radiusInputFrame.add(new JLabel("Enter Radius:")); radiusInputFrame.add(radiusField); radiusInputFrame.add(setRadiusButton); radiusInputFrame.pack(); radiusInputFrame.setLocationRelativeTo(null); // Center the dialog on the screen radiusInputFrame.setVisible(true); } public Area getCustomLocationArea() { Map<String, Area> customLocations = locationTreeMap.get("Custom Location"); if (customLocations != null) { return customLocations.get("Custom"); // Gibt die gespeicherte Area zurück } return null; // Keine gespeicherte Area vorhanden } private void comboBox2ActionPerformed(ActionEvent e) { String selected = (String) comboBox2.getSelectedItem(); if ("Custom Location".equals(selected)) { openRadiusInputDialog(); } } private void updateTreeAndLocationComboBoxes(ActionEvent e) { updateTreeImage(); updateLocationComboBox(); } public void initTreeImageLabel(){ treeImageLabel = new JLabel(); getContentPane().add(treeImageLabel); treeImageLabel.setBounds(5, 50, 60, 50); updateTreeImage(); } public void updateTreeImage() { SwingUtilities.invokeLater(() -> { String selectedTreeType = getTreeType(); ImageIcon icon = getTreeImage(selectedTreeType); treeImageLabel.setIcon(icon); }); } private void initLocationMap() { // Füge weitere Baumarten mit den zugehörigen Locations hinzu locationMap = new HashMap<>(); locationMap.put("Tree", new String[]{"Lumbridge", "Draynor", "Varrock GE", "Varrock West", "Camelot" , "Custom Location"}); locationMap.put("Oak tree", new String[]{"Lumbridge", "Draynor", "Port Sarim","Falador", "Varrock GE", "Varrock West", "Camelot" , "Custom Location"}); locationMap.put("Willow tree", new String[]{"Lumbridge", "Draynor", "Port Sarim", "Camelot", "Custom Location"}); locationMap.put("Maple tree", new String[]{"Camelot", "Custom Location"}); locationMap.put("Yew tree", new String[]{"Lumbridge", "Falador", "Varrock", "Camelot", "Custom Location"}); locationMap.put("Magic tree", new String[]{"Camelot", "Custom Location"}); locationMap.put("Teak tree", new String[]{"Castle Wars", "Ape Atoll", "Isle of Souls", "Prifddinas", "Custom Location"}); locationMap.put("Redwood tree", new String[]{"Woodcutting Guild"}); locationMap.put("Mahogany tree", new String[]{"Custom Location"}); // locationMap.put("Mahogany tree", new String[]{"Tai Bwo Wannai"}); } private void initLocationTreeMap() { locationTreeMap = new HashMap<>(); Map<String, Area> lumbridgeTrees = new HashMap<>(); lumbridgeTrees.put("Tree", Locations.lumbridgeTree); lumbridgeTrees.put("Oak tree", Locations.lumbridgeOak); lumbridgeTrees.put("Willow tree", Locations.lumbridgeWillow); lumbridgeTrees.put("Yew tree", Locations.lumbridgeYew); Map<String, Area> custom = new HashMap<>(); custom.put("Tree", getCustomLocationArea()); Map<String, Area> draynorTrees = new HashMap<>(); draynorTrees.put("Tree", Locations.draynorTree); draynorTrees.put("Oak tree", Locations.draynorOak); draynorTrees.put("Willow tree", Locations.draynorWillow); Map<String, Area> faladorTrees = new HashMap<>(); faladorTrees.put("Oak tree", Locations.faladorOak); faladorTrees.put("Yew tree", Locations.faladorYew); Map<String, Area> portSarim = new HashMap<>(); portSarim.put("Oak tree", Locations.portSarimOak); portSarim.put("Willow tree", Locations.portSarimWillow); Map<String, Area> varrock = new HashMap<>(); varrock.put("Yew tree", Locations.varrockYew); varrock.put("Oak tree", Locations.varrockOak); varrock.put("Tree", Locations.varrockTreeWest); Map<String, Area> varrockWest = new HashMap<>(); varrockWest.put("Oak tree", Locations.varrockOakWest); varrockWest.put("Tree", Locations.varrockTreeWest); Map<String, Area> varrocGe = new HashMap<>(); varrocGe.put("Tree", Locations.varrockMhTree); varrocGe.put("Oak tree", Locations.varrockOakMH); Map<String, Area> camelotTrees = new HashMap<>(); camelotTrees.put("Tree", Locations.camelotTree); camelotTrees.put("Maple tree", Locations.camelotMaple); camelotTrees.put("Willow tree", Locations.camelotWillow); camelotTrees.put("Oak tree", Locations.camelotOak); camelotTrees.put("Yew tree", Locations.camelotYew); camelotTrees.put("Magic tree", Locations.camelotMagic); Map<String, Area> castleWars = new HashMap<>(); castleWars.put("Teak tree", Locations.castleWarsChop); Map<String, Area> apeAtoll = new HashMap<>(); apeAtoll.put("Teak tree", Locations.apeAtollchop); Map<String, Area> woodcuttingGuild = new HashMap<>(); woodcuttingGuild.put("Redwood tree", Locations.woodcuttingGuild); Map<String, Area> isleOfSouls = new HashMap<>(); isleOfSouls.put("Teak tree", Locations.soulWars); Map<String, Area> prifddinas = new HashMap<>(); prifddinas.put("Teak tree", Locations.prifddinas_Teak); Map<String, Area> customLocation = new HashMap<>(); customLocation.put(getTreeType(), getCustomLocationArea()); locationTreeMap.put("Lumbridge", lumbridgeTrees); locationTreeMap.put("Draynor", draynorTrees); locationTreeMap.put("Falador", faladorTrees); locationTreeMap.put("Port Sarim", portSarim); locationTreeMap.put("Varrock", varrock); locationTreeMap.put("Varrock GE", varrocGe); locationTreeMap.put("Varrock West", varrockWest); locationTreeMap.put("Camelot", camelotTrees); locationTreeMap.put("Castle Wars", castleWars); locationTreeMap.put("Ape Atoll", apeAtoll); locationTreeMap.put("Woodcutting Guild", woodcuttingGuild); locationTreeMap.put("Isle of Souls",isleOfSouls); locationTreeMap.put("Prifddinas", prifddinas); locationTreeMap.put("Custom Location", customLocation); } public WoodcutterScript getClassswitch() { return classswitch; } public Area getSelectedLocationArea() { if (comboBox2 != null && comboBox2.getSelectedItem() != null) { String selectedLocation = comboBox2.getSelectedItem().toString(); String selectedTreeType = getTreeType(); // Get the map for the selected location Map<String, Area> treesAtLocation = locationTreeMap.get(selectedLocation); if (treesAtLocation != null) { // Get the Area for the selected tree type Area selectedArea = treesAtLocation.get(selectedTreeType); if (selectedArea != null) { return selectedArea; // Ensure it is not null before using } } } return null; // Handle this case in your calling code to avoid NullPointerException } private void updateLocationComboBox() { SwingUtilities.invokeLater(() -> { String selectedTreeType = getTreeType(); String[] locations = locationMap.get(selectedTreeType); if (locations != null) { comboBox2.setModel(new DefaultComboBoxModel<>(locations)); } else { // Wenn die Locations für den ausgewählten Baumtyp nicht vorhanden sind, setze die ComboBox zurück comboBox2.setModel(new DefaultComboBoxModel<>()); } }); } private ImageIcon getTreeImage(String treeType) { String imageUrl; // Entscheiden Sie basierend auf dem Baumtyp, welches Bild geladen werden soll switch (treeType) { case "Tree": imageUrl = "https://imgur.com/KArlrlJ.png"; break; case "Oak tree": imageUrl = "https://imgur.com/Ojqz9Rn.png"; break; case "Willow tree": imageUrl = "https://imgur.com/oOduKdc.png"; break; case "Maple tree": imageUrl = "https://imgur.com/Hpbmw5s.png"; break; case "Yew tree": imageUrl = "https://imgur.com/rLoUC5V.png"; break; case "Teak tree": imageUrl = "https://imgur.com/rLoUC5V.png"; break; case "Magic tree": imageUrl = "https://imgur.com/h73hgmj.png"; break; default: // Standardbild, falls der Baumtyp nicht erkannt wird imageUrl = "https://imgur.com/KArlrlJ.png"; break; } try { // Bild als ImageIcon zurückgeben return new ImageIcon(new URL(imageUrl)); } catch (MalformedURLException e) { e.printStackTrace(); // Hier könntest du die Fehlermeldung auch anders behandeln, je nach Anforderungen. return null; } } public String getTreeType() { Object selectedItem = treeTypeComboBox.getSelectedItem(); if (selectedItem != null) { return selectedItem.toString(); } return "Tree"; // Standardwert, wenn nichts ausgewählt ist } public String getSelectedLocation() { return Objects.requireNonNull(comboBox2.getSelectedItem()).toString(); } public static JCheckBox getDropLogs() { return dropLogs; } public static JCheckBox getUseRings(){ return useRings; } }
    9. This Bot craft runes in the aby. support CLI and a pk/death system is included. Create a package "Abyss" and fill the classes into the package. class MainScript: package Abyss; import org.dreambot.api.methods.container.impl.Inventory; import org.dreambot.api.methods.container.impl.bank.Bank; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.methods.walking.impl.Walking; import org.dreambot.api.methods.walking.pathfinding.impl.web.WebFinder; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.utilities.Timer; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.io.IOException; import java.net.URL; import static Abyss.Res.*; import static Abyss.Methods.*; @ScriptManifest(author = "Dexter Bots", category = Category.RUNECRAFTING, name = "Dexter Abyssal quick", version = 0.01) public class MainScript extends AbstractScript{ State state; public static final WebFinder webFinder = WebFinder.getWebFinder(); private DextersAbyssBetaGui gui; public static boolean lootItems = false; public static boolean runesCraftet = false; public static boolean banked = false; public static boolean restock = true; public static boolean normalBank = true; private boolean startScript; public static boolean crossBarrier = false; public static boolean testwalkArea = false; public static boolean isZamiOut = false; public static boolean pouchesFilled = false; public static Timer timeRun; public boolean showPaint = true; public Image mainPaint = getImage("https://i.ibb.co/Pjx8Lks/RcPaint.png"); private boolean quickStart = false; @Override public void onStart() { if (!quickStart) { SwingUtilities.invokeLater(() -> { gui = new DextersAbyssBetaGui(this); gui.setVisible(true); }); timeRun = new Timer(); } } @Override public void onStart(String... params) { quickStart = true; SwingUtilities.invokeLater(() -> { gui = new DextersAbyssBetaGui(this); gui.setVisible(false); if (params.length > 0 && DextersAbyssBetaGui.comboBox1 != null) { String param = params[0].toLowerCase(); int indexToSelect; switch (param) { case "air": indexToSelect = 0; break; case "mind": indexToSelect = 1; break; case "water": indexToSelect = 2; break; case "earth": indexToSelect = 3; break; case "fire": indexToSelect = 4; break; case "body": indexToSelect = 5; break; case "cosmic": indexToSelect = 6; break; case "chaos": indexToSelect = 7; break; case "nature": indexToSelect = 8; break; case "death": indexToSelect = 9; break; case "blood": indexToSelect = 10; break; default: indexToSelect = -1; // Ungültiger Parameter log("Ungültiger Parameter: " + param); break; } if (indexToSelect != -1) { // Setze den Wert in der ComboBox DextersAbyssBetaGui.comboBox1.setSelectedIndex(indexToSelect); log("ComboBox wurde auf '" + DextersAbyssBetaGui.comboBox1.getItemAt(indexToSelect) + "' gesetzt."); } else { log("Ungültiger Parameter: " + param); } startScript = true; timeRun = new Timer(); } else { log("Fehler: Keine Parameter übergeben oder ComboBox ist null."); } }); } @Override public int onLoop() { if (startScript) { try { switch (getState()) { case WalkingToBank: handleWalkingToBank(); break; case UseBank: handleUseBank(); break; case Banking: handleBanking(); break; case WalkingToBrun: handleWalkingToBrun(); break; case WalkingToBarrier: handleWalkingToBarrier(); break; case WalkToMagier1: handleWalkToMagier1(); break; case IntaractWithMagier: handleInteractWithMagier(); break; case FindRockorGap: handleFindRockorGap(); break; case WalkingToAirRiss: processWalkingToRiss(AbyPassed_Area, AirAltar_Area, "Air", Air_Rift_Area, "Air rift"); break; case InteractWithAirAltar: processInteractWithAltar("Air", "Altar"); break; case WalkingToMindRiss: processWalkingToRiss(AbyPassed_Area, MindAltar_Area, "Mind", Mind_Rift_Area, "Mind rift"); break; case InteractWithMindAltar: processInteractWithAltar("Mind", "Altar"); break; case WalkingToWaterRiss: processWalkingToRiss(AbyPassed_Area, WaterAltar_Area, "Water", Water_Rift_Area, "Water rift"); break; case InteractWithWaterAltar: processInteractWithAltar("Water", "Altar"); break; case WalkingToEarthRiss: processWalkingToRiss(AbyPassed_Area, ErdAltar_Area, "Earth", Erd_Rift_Area, "Earth rift"); break; case InteractWithEarthAltar: processInteractWithAltar("Earth", "Altar"); break; case WalkingToBodyRiss: processWalkingToRiss(AbyPassed_Area, BodyAltar_Area, "Body", Body_Rift_Area, "Body rift"); break; case InteractWithBodyAltar: processInteractWithAltar("Body", "Altar"); break; case WalkingToCosmicRiss: processWalkingToRiss(AbyPassed_Area, CosmoAltar_Area, "Cosmic", Cosmo_Rift_Area, "Cosmic rift"); break; case InteractWithCosmicAltar: processInteractWithAltar("Cosmic", "Altar"); break; case WalkingToLawRiss: processWalkingToRiss(AbyPassed_Area, LawAltar_Area, "Law", Law_Rift_Area, "Law rift"); break; case InteractWithLawAltar: processInteractWithAltar("Law", "Altar"); break; case WalkingToDeathRiss: processWalkingToRiss(AbyPassed_Area, DeadAltar_Area, "Death", Dead_Rift_Area, "Death rift"); break; case InteractWithDeathAltar: processInteractWithAltar("Death", "Altar"); break; case WalkingToBloodRiss: processWalkingToRiss(AbyPassed_Area, BloodAltar_Area, "Blood", Blood_Rift_Area, "Blood rift"); break; case InteractWithBloodAltar: processInteractWithAltar("Blood", "Altar"); break; case WalkingToNatureRiss: processWalkingToRiss(AbyPassed_Area, NatureAltar_Area, "Nature", Nature_Rift_Area, "Nature rift"); break; case InteractWithNatureAltar: processInteractWithAltar("Nature", "Altar"); break; case WalkingToChaosRiss: processWalkingToRiss(AbyPassed_Area, ChaosAltar_Area, "Chaos", Chaos_Rift_Area, "Chaos rift"); break; case InteractWithChaosAltar: processInteractWithAltar("Chaos", "Altar"); break; case WalkingToFireRiss: processWalkingToRiss(AbyPassed_Area, FireAltar_Area, "Fire", Fire_Rift_Area, "Fire rift"); break; case InteractWithFireAltar: processInteractWithAltar("Fire", "Altar"); break; case TeleportBack: handleTeleportBack(); break; case DiedAttention: handleDiedAttention(); break; case Killed: handleKilled(); break; } } catch (NullPointerException n) { log("Switch 0 Pointer encountered. Error: " + n); resetALL(); lootItems = false; itemsLooted = false; normalBank = true; runesCraftet = false; banked = false; } return 1; } return 200; } private State getState () { if (Ferox.contains(Players.getLocal().getTile()) && !banked && !Bank_Area.contains(Players.getLocal().getTile()) && !Bank.isOpen() && !Killed_Area_Lumbridge.contains(Players.getLocal().getTile())) { return State.WalkingToBank; } else if (!banked && !Killed_Area_Lumbridge.contains(Players.getLocal().getTile()) && Bank_Area.contains(Players.getLocal().getTile()) && !Bank.isOpen()) { return State.UseBank; } else if (Players.getLocal().isInCombat() && angriffArea.contains(Players.getLocal().getTile())) { return State.DiedAttention; } else if (Bank.isOpen() && !banked && normalBank) { return State.Banking; } else if (Inventory.contains(PURE_ESSENCE) && Ferox.contains(Players.getLocal().getTile()) && !(Walking.getRunEnergy() >= 75 && Walking.getRunEnergy() <= 100) && !Brunnen_Area.contains(Players.getLocal().getTile()) && banked) { return State.WalkingToBrun; } else if ((Killed_Area_Lumbridge.contains(Players.getLocal().getTile()) || lootItems || !restock) && !Ferox.contains(Players.getLocal().getTile())) { return State.Killed; } else if (!Barriere_Area.contains(Players.getLocal().getTile()) && Ferox.contains(Players.getLocal().getTile()) && banked) { return State.WalkingToBarrier; } else if (banked && crossBarrier && !isZamiOut) { return State.WalkToMagier1; } else if (ZamorakMagier_Area.contains(Players.getLocal().getTile())) { return State.IntaractWithMagier; // Inventory.contains(Navigation.PURE_ESSENCE) && } else if (Abys_Area.contains(Players.getLocal().getTile()) && !AbyPassed_Clean.contains(Players.getLocal().getTile())) { return State.FindRockorGap; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Nature")) { return State.WalkingToNatureRiss; } else if (NatureAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Nature")))) { return State.InteractWithNatureAltar; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Blood")) { return State.WalkingToBloodRiss; } else if (BloodAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Blood")))) { return State.InteractWithBloodAltar; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Death")) { return State.WalkingToDeathRiss; } else if (DeadAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Death")))) { return State.InteractWithDeathAltar; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Chaos")) { return State.WalkingToChaosRiss; } else if (ChaosAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Chaos")))) { return State.InteractWithChaosAltar; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Cosmic")) { return State.WalkingToCosmicRiss; } else if (CosmoAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Cosmic")))) { return State.InteractWithCosmicAltar; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Body")) { return State.WalkingToBodyRiss; } else if (BodyAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Body")))) { return State.InteractWithBodyAltar; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Fire")) { return State.WalkingToFireRiss; } else if (FireAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Fire")))) { return State.InteractWithFireAltar; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Earth")) { return State.WalkingToEarthRiss; } else if (ErdAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Earth")))) { return State.InteractWithEarthAltar; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Water")) { return State.WalkingToWaterRiss; } else if (WaterAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Water")))) { return State.InteractWithWaterAltar; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Mind")) { return State.WalkingToMindRiss; } else if (MindAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Mind")))) { return State.InteractWithMindAltar; } else if (AbyPassed_Clean.contains(Players.getLocal().getTile()) && gui.getRuneType().equals("Air")) { return State.WalkingToAirRiss; } else if (AirAltar_Area.contains(Players.getLocal().getTile()) && (!Inventory.contains(item -> item != null && item.getName().contains("une") && gui.getRuneType().equals("Air")))) { return State.InteractWithAirAltar; } else if (Inventory.contains(item -> item != null && item.getName().contains("une")) && runesCraftet && !Ferox.contains(Players.getLocal().getTile())) return State.TeleportBack; return state; } @Override public void onExit(){ super.onExit(); } @Override public void onPaint(Graphics g) { if (showPaint){ g.drawImage(mainPaint, 0, 0, null); Font font = new Font("Times new roman", Font.BOLD, 13); g.setFont(font); g.setColor(Color.GRAY); breakHandlerPause(); int logsPerHour = (int) (Methods.currentRunesCount / (timeRun.elapsed() / 3600000D)); g.drawString("" + timeRun.formatTime(), 128, 22); g.drawString("" + logsPerHour, 128, 91); g.drawString("" + currentRunesCount, 128, 57);} } private Image getImage (String url){ try { return ImageIO.read(new URL(url)); }catch (IOException e){ return null; } } void setStartScript(boolean startScript){ this.startScript = startScript; } public static void resetStats(){ crossBarrier = false; testwalkArea = false; isZamiOut = false; } } class Methods: package Abyss; import org.dreambot.api.Client; import org.dreambot.api.input.Keyboard; import org.dreambot.api.input.Mouse; import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.container.impl.Inventory; import org.dreambot.api.methods.container.impl.bank.Bank; import org.dreambot.api.methods.container.impl.bank.BankLocation; import org.dreambot.api.methods.container.impl.equipment.Equipment; import org.dreambot.api.methods.container.impl.equipment.EquipmentSlot; import org.dreambot.api.methods.dialogues.Dialogues; import org.dreambot.api.methods.interactive.GameObjects; import org.dreambot.api.methods.interactive.NPCs; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.map.Tile; import org.dreambot.api.methods.walking.impl.Walking; import org.dreambot.api.methods.walking.web.node.AbstractWebNode; import org.dreambot.api.methods.widget.Widgets; import org.dreambot.api.methods.world.World; import org.dreambot.api.methods.world.Worlds; import org.dreambot.api.methods.worldhopper.WorldHopper; import org.dreambot.api.randoms.RandomEvent; import org.dreambot.api.utilities.Sleep; import org.dreambot.api.wrappers.interactive.GameObject; import org.dreambot.api.wrappers.interactive.NPC; import org.dreambot.api.wrappers.items.Item; import org.dreambot.api.wrappers.widgets.WidgetChild; import static Abyss.MainScript.*; import static Abyss.Antiban.*; import static Abyss.Antiban.moveMouseRandom; import static Abyss.Res.*; import static org.dreambot.api.utilities.Logger.log; public class Methods { public static int previousRunesCount; public static int KilledCount = 0; public static boolean itemsLooted = false; public static int currentRunesCount = 0; public static void pouches(){ if (Inventory.contains("Colossal pouch")) { Inventory.interact("Colossal pouch", "Fill"); Sleep.sleep(400, 1000); Bank.withdrawAll(PURE_ESSENCE); Sleep.sleep(400, 1000); Inventory.interact("Colossal pouch", "Fill"); Sleep.sleep(400, 1000); Bank.withdrawAll(PURE_ESSENCE); Sleep.sleep(400, 1000); Sleep.sleepUntil(() -> Inventory.contains(PURE_ESSENCE), 400, 600); Bank.close(); MainScript.pouchesFilled = true; }else if(Inventory.contains("Small pouch") && !Inventory.contains("Medium pouch") && !Inventory.contains("Large pouch") && !Inventory.contains("Giant pouch")){ Inventory.interact("Small pouch","Fill"); Sleep.sleep(400, 1000); Bank.withdrawAll(PURE_ESSENCE); Sleep.sleep(400, 1000); Bank.close(); MainScript.pouchesFilled = true; }else if(Inventory.contains("Small pouch") && Inventory.contains("Medium pouch") && !Inventory.contains("Large pouch") && !Inventory.contains("Giant pouch")){ Inventory.interact("Small pouch","Fill"); Sleep.sleep(400, 1000); Inventory.interact("Medium pouch","Fill"); Sleep.sleep(400, 1000); Bank.withdrawAll(PURE_ESSENCE); Sleep.sleep(400, 1000); Bank.close(); MainScript.pouchesFilled = true; }else if(Inventory.contains("Small pouch") && Inventory.contains("Medium pouch") && Inventory.contains("Large pouch") && !Inventory.contains("Giant pouch")){ Inventory.interact("Small pouch","Fill"); Sleep.sleep(400, 1000); Inventory.interact("Medium pouch","Fill"); Sleep.sleep(400, 1000); Inventory.interact("Large pouch","Fill"); Sleep.sleep(400, 1000); Bank.withdrawAll(PURE_ESSENCE); Sleep.sleep(400, 1000); Bank.close(); MainScript.pouchesFilled = true; }else if(Inventory.contains("Small pouch") && Inventory.contains("Medium pouch") && Inventory.contains("Large pouch") && Inventory.contains("Giant pouch")){ Inventory.interact("Small pouch","Fill"); Sleep.sleep(600, 1200); Inventory.interact("Medium pouch","Fill"); Sleep.sleep(600, 1200); Inventory.interact("Large pouch","Fill"); Sleep.sleep(600, 1200); Bank.withdrawAll(PURE_ESSENCE); Sleep.sleep(800, 1400); Inventory.interact("Giant pouch","Fill"); Sleep.sleep(600, 1200); Bank.withdrawAll(PURE_ESSENCE); Sleep.sleep(800, 1400); Bank.close(); MainScript.pouchesFilled = true; }else if(!Inventory.contains("Small pouch") && !Inventory.contains("Medium pouch") && !Inventory.contains("Large pouch") && !Inventory.contains("Giant pouch")){ Bank.close(); MainScript.pouchesFilled = true; } } public static void emptyPouches(){ GameObject Altars = GameObjects.closest(I -> I != null && I.hasAction("Craft-rune")); if (Inventory.contains("Colossal pouch")) { Sleep.sleep(1950, 2400); Inventory.open(); Keyboard.pressShift(); Sleep.sleep(100); // kurze Pause, um sicherzustellen, dass die Shift-Taste gedrückt wird // Linksklick auf den Colossal Pouch Item pouch = Inventory.get("Colossal pouch"); if (pouch != null) { Mouse.click(pouch.getDestination()); Sleep.sleep(300, 500); } // Shift-Taste loslassen Keyboard.releaseShift(); Altars.interact(); Sleep.sleep(400, 1000); Keyboard.pressShift(); Sleep.sleep(100); // kurze Pause, um sicherzustellen, dass die Shift-Taste gedrückt wird // Linksklick auf den Colossal Pouch if (pouch != null) { Mouse.click(pouch.getDestination()); Sleep.sleep(300, 500); } // Shift-Taste loslassen Keyboard.releaseShift(); Altars.interact(); Sleep.sleep(400, 1000); getTotalRuneCount(); MainScript.runesCraftet = true; MainScript.pouchesFilled = false; }else if(Inventory.contains("Small pouch") && !Inventory.contains("Medium pouch") && !Inventory.contains("Large pouch") && !Inventory.contains("Giant pouch")){ Sleep.sleep(1600, 2100); Inventory.interact("Small pouch","Empty"); Sleep.sleep(400, 1000); Altars.interact(); Sleep.sleep(400, 1000); getTotalRuneCount(); MainScript.runesCraftet = true; MainScript.pouchesFilled = false; }else if(Inventory.contains("Small pouch") && Inventory.contains("Medium pouch") && !Inventory.contains("Large pouch") && !Inventory.contains("Giant pouch")){ Sleep.sleep(1600, 2300); Inventory.interact("Small pouch","Empty"); Sleep.sleep(400, 1000); Inventory.interact("Medium pouch","Empty"); Sleep.sleep(400, 1000); Altars.interact(); Sleep.sleep(400, 1000); getTotalRuneCount(); MainScript.runesCraftet = true; MainScript.pouchesFilled = false; }else if(Inventory.contains("Small pouch") && Inventory.contains("Medium pouch") && Inventory.contains("Large pouch") && !Inventory.contains("Giant pouch")){ Sleep.sleep(1600, 2250); Inventory.interact("Small pouch","Empty"); Sleep.sleep(400, 1000); Inventory.interact("Medium pouch","Empty"); Sleep.sleep(400, 1000); Inventory.interact("Large pouch","Empty"); Sleep.sleep(400, 1000); Altars.interact(); Sleep.sleep(400, 1000); getTotalRuneCount(); MainScript.runesCraftet = true; MainScript.pouchesFilled = false; }else if(Inventory.contains("Small pouch") && Inventory.contains("Medium pouch") && Inventory.contains("Large pouch") && Inventory.contains("Giant pouch")){ Sleep.sleep(1600, 2400); Inventory.interact("Small pouch","Empty"); Sleep.sleep(600, 1200); Inventory.interact("Medium pouch","Empty"); Sleep.sleep(600, 1200); Inventory.interact("Large pouch","Empty"); Sleep.sleep(600, 1200); Altars.interact(); Sleep.sleep(800, 1400); Inventory.interact("Giant pouch","Empty"); Sleep.sleep(600, 1200); Altars.interact(); Sleep.sleep(800, 1400); getTotalRuneCount(); MainScript.runesCraftet = true; MainScript.pouchesFilled = false; }else if (!Inventory.contains("Small pouch") && !Inventory.contains("Medium pouch") && !Inventory.contains("Large pouch") && !Inventory.contains("Giant pouch")){ getTotalRuneCount(); MainScript.runesCraftet = true; MainScript.pouchesFilled = false; } } public static void resetALL(){ Equipment.interact(EquipmentSlot.RING,"Ferox Enclave"); Sleep.sleepUntil(()->Ferox.contains(Players.getLocal().getTile()), 8000); if(Ferox.contains(Players.getLocal().getTile())){ MainScript.resetStats(); } } public static void emptyDeathOffice() { WidgetChild container = Widgets.get(669, 3); if (container != null && container.isVisible()) { boolean continueInteracting = true; while (continueInteracting) { continueInteracting = false; WidgetChild[] items = container.getChildren(); for (WidgetChild itemChild : items) { if (itemChild != null && itemChild.isVisible()) { Item item = itemChild.getItem(); if (item != null && item.getName() != null && !Inventory.isFull()) { String itemName = item.getName().trim(); if (!itemName.isEmpty() && !"Pure essence".equalsIgnoreCase(itemName)) { log("Attempting to interact with item '" + itemName + "'"); if (itemChild.interact("Select")) { log("Interaction successful with item '" + itemName + "'"); Sleep.sleep(1000); continueInteracting = true; break; // Breche die innere Schleife ab und starte sie neu, um erneut zu prüfen } else { log("Failed to interact with item '" + itemName + "'"); } } else { log("Skipping 'Pure essence'"); } } } } if (!continueInteracting && Inventory.contains("Pure essence")) { dropAndCollectEssence(); } else if (!continueInteracting) { equipItems(); } } } else { log("Widget child is not visible or does not exist."); } } public static void dropAndCollectEssence() { Sleep.sleep(2300, 3200); Keyboard.pressEsc(); Sleep.sleep(2300, 3200); Inventory.drop("Pure essence"); Sleep.sleep(2300, 3200); Dialogues.clickContinue(); Sleep.sleep(2300, 3200); Dialogues.chooseOption("Put it down."); Sleep.sleep(2300, 3200); Inventory.dropAll("Pure essence"); Sleep.sleep(2300, 3200); NPC death = NPCs.closest(d -> d != null && d.hasAction("Collect")); if (death != null && death.interact("Collect")) { log("Interacted with Death to collect items."); Sleep.sleep(2000, 3400); // Nach der Interaktion mit dem Tod wieder auf Items prüfen emptyDeathOffice(); // Ruft die Methode erneut auf, um weitere verbleibende Items zu sammeln } } public static void equipItems() { for (Item gear : Inventory.all(i -> i.hasAction("Wear"))) { if (gear.interact("Wear")) { Sleep.sleepUntil(() -> Inventory.count(gear.getID()) == 0, 2000, 2600); } } for (Item axe : Inventory.all(i -> i.hasAction("Wield"))) { if (axe.interact("Wield")) { Sleep.sleepUntil(() -> Inventory.count(axe.getID()) == 0, 2000, 2600); } } } public static int getTotalRuneCount() { Item[] runes = Inventory.all(item -> item != null && item.getName().contains("une")).toArray(new Item[0]); for (Item rune : runes) { currentRunesCount += rune.getAmount(); // Addiere die Anzahl der Runen im Stapel zur Gesamtanzahl hinzu } int runesToAdd = currentRunesCount - previousRunesCount; // Berechne die Anzahl der neu hinzugefügten Runen previousRunesCount = currentRunesCount; // Aktualisiere die vorherige Anzahl der Runen für den nächsten Durchgang return currentRunesCount + runesToAdd; } public static void inventoryOpen(){ if(!Inventory.isOpen()){ Inventory.open(); } } public static void breakHandlerPause() { if (!Client.isLoggedIn()) { timeRun.pause(); }else if(Client.isLoggedIn()){ timeRun.resume(); } } public static void addAndConnectNodes() { // Angenommene Koordinaten für die neuen Nodes Tile[] tiles = { new Tile(3129, 2593, 0), new Tile(3119, 3585, 0), new Tile(3128,3600,0),new Tile(3120,3592,0),new Tile(3119,3575,0),new Tile(3114,3566,0) }; AbstractWebNode previousNode = null; for (Tile tile : tiles) { AbstractWebNode newNode = webFinder.createAndAddNode(tile); if (newNode != null) { webFinder.addWebNode(newNode); // Verbinde die neue Node mit der vorherigen Node if (previousNode != null) { // Verbindungen manuell hinzufügen previousNode.addDualConnections(newNode); } previousNode = newNode; } } // Verbinden mit einer bestehenden Node, falls benötigt if (previousNode != null) { AbstractWebNode existingNode = webFinder.getNearest(previousNode, 10); // Suchradius anpassen if (existingNode != null) { previousNode.addDualConnections(existingNode); } } } public static void repairPouches() { if (Inventory.contains(bag4damage) || Inventory.contains(colossalPounchDestroy) || Inventory.contains(5513) || Inventory.contains(5511)) { Walking.walk(ZamorakMagierIn); Sleep.sleep(3500, 4500); NPC MagierIn = NPCs.closest(Zamorak_Magier_Schlund); if (MagierIn != null) { MagierIn.interact("Repairs"); Sleep.sleep(2500, 5000); } } } public static void handleWalkingToBank() { if (Ferox.contains(Players.getLocal().getTile()) && !Res.Killed_Area_Lumbridge.contains(Players.getLocal().getTile()) && !banked) { runesCraftet = false; Walking.walk(Bank_Area); Antiban.moveChest(); Sleep.sleepUntil(() -> Bank_Area.contains(Players.getLocal().getTile()), 750, 1350); log("random chance: " + probabilityLimit); } } public static void handleUseBank() { if (!Bank.isOpen() || !Players.getLocal().isMoving() && !banked && normalBank) { GameObject bankChest = GameObjects.closest(Bank_Chest); if (bankChest != null) { bankChest.interact("Use"); Sleep.sleepUntil(Bank::isOpen, 1800, 2500); } } } public static void handleBanking() { if (normalBank && Equipment.getItemInSlot(EquipmentSlot.RING) == null && !Inventory.contains(Duel_Ring) && !banked && !Killed_Area_Lumbridge.contains(Players.getLocal().getTile())) { if (!Bank.isOpen()) { Bank.open(); afkStatus(); } else { if (Bank.withdraw(Duel_Ring, 1)) { Sleep.sleepUntil(() -> Inventory.contains(Duel_Ring), 2000); if (Inventory.contains(Duel_Ring)) { Inventory.interact(Duel_Ring, "Wear"); Calculations.random(1000, 1500); } } } } else { if (Bank.isOpen() && Bank.contains("Pure essence")) { Bank.depositAll(item -> item != null && item.getName().contains("une")); Sleep.sleepUntil(() -> !Inventory.contains(item -> item != null && item.getName().contains("une")), 900, 1200); if (!pouchesFilled) { Bank.withdrawAll(PURE_ESSENCE); Sleep.sleepUntil(() -> Inventory.contains(PURE_ESSENCE), 900, 1300); pouches(); pouchesFilled = true; } banked = true; if (Inventory.contains(PURE_ESSENCE)) { Bank.close(); } } else { Bank.open(); } } } public static void handleWalkingToBrun() { if (Inventory.contains(PURE_ESSENCE) && banked && !(Walking.getRunEnergy() >= 75 && Walking.getRunEnergy() <= 100) && !Brunnen_Area.contains(Players.getLocal().getTile()) && !Players.getLocal().isMoving()) { Walking.walk(Brunnen_Area); randomizeCamera(); GameObject pool = GameObjects.closest("Pool of Refreshment"); if (pool != null) { pool.interact("Drink"); moveMouseRandom(); Sleep.sleep(6500, 7000); afkStatus(); } } } public static void handleWalkingToBarrier() { if (!Players.getLocal().isMoving()) { Walking.walk(Barriere_Area); moveBarrier(); Sleep.sleepUntil(() -> Barriere_Area.contains(Players.getLocal().getTile()), 5000, 6000); GameObject Barriere = GameObjects.closest(Barrier1); if (Barriere != null && Players.getLocal().getTile().distance(Barriere) <= 7) { Barriere.interact(); moveMouseRandom(); Sleep.sleepUntil(() -> afterBarrier.contains(Players.getLocal().getTile()), 6000); } if (afterBarrier.contains(Players.getLocal().getTile()) || afterBarrier1.contains(Players.getLocal().getTile()) || afterBarrier2.contains(Players.getLocal().getTile())) { crossBarrier = true; } } } public static void handleWalkToMagier1() { log("Start ZwischenWalk"); if (crossBarrier && !isZamiOut) { addAndConnectNodes(); Walking.walk(ZamorakMagier_Area); randomizeCamera(); Sleep.sleepUntil(() -> ZamorakMagier_Area.contains(Players.getLocal().getTile()), 1700, 2200); moveMage(); NPC Magier = NPCs.closest(Zamorak_Magier); if (Magier != null) { Magier.interact("Teleport"); moveMouseRandom(); isZamiOut = true; Sleep.sleepUntil(() -> Abys_Area.contains(Players.getLocal()), 3500, 6300); } else { Walking.walk(ZamorakMagier_Area); Sleep.sleepUntil(() -> ZamorakMagier_Area.contains(Players.getLocal().getTile()), 1700, 2200); } } } public static void handleInteractWithMagier() { if (!Players.getLocal().isAnimating() && !Players.getLocal().isMoving()) { NPC Magier = NPCs.closest(Zamorak_Magier); if (Magier != null) { Magier.interact("Teleport"); moveMouseRandom(); Sleep.sleep(4000, 6000); } } } public static void handleFindRockorGap() { if (Abys_Area.contains(Players.getLocal().getTile()) && !AbyPassed_Clean.contains(Players.getLocal().getTile())) { GameObject rock = GameObjects.closest(obj -> obj != null && obj.getName().contains("Rock") && Abys_Area.contains(obj)); GameObject gap = GameObjects.closest(obj -> obj != null && obj.getName().contains("Gap") && Abys_Area.contains(obj)); randomizeCamera(); int minTimeout = 1500; int maxTimeout = 2200; int randomTimeout = Calculations.random(minTimeout, maxTimeout); GameObject targetObject = (rock != null && gap != null) ? (rock.distance() < gap.distance() ? rock : gap) : (rock != null ? rock : gap); if (targetObject != null) { targetObject.interact(); moveMouseRandom(); Sleep.sleepUntil(() -> !Players.getLocal().isAnimating() && AbyPassed_Area.contains(Players.getLocal().getTile()), randomTimeout); } else { Sleep.sleepUntil(() -> AbyPassed_Area.contains(Players.getLocal().getTile()), 5000); } } } public static void handleTeleportBack() { if (!Players.getLocal().isAnimating() && !Players.getLocal().isMoving() && (Inventory.contains(item -> item != null && item.getName().contains("une")) && runesCraftet)) { if (Inventory.contains(item -> item != null && item.getName().contains("une")) && !Ferox.contains(Players.getLocal().getTile())) { Equipment.interact(EquipmentSlot.RING, "Ferox Enclave"); Sleep.sleep(2200, 3200); banked = false; resetStats(); afkStatus(); } } } public static void handleDiedAttention() { if (Players.getLocal().isInCombat() && angriffArea.contains(Players.getLocal().getTile())) { if (Equipment.getItemInSlot(EquipmentSlot.RING) != null && !Ferox.contains(Players.getLocal().getTile())) { Equipment.interact(EquipmentSlot.RING, "Ferox Enclave"); Sleep.sleep(7000, 9000); World world = Worlds.getRandomWorld(w -> w.isMembers() && w.getMinimumLevel() < 500 && w.isNormal()); WorldHopper.hopWorld(world); Sleep.sleep(12000, 20000); if (Ferox.contains(Players.getLocal().getTile()) && Inventory.contains(PURE_ESSENCE)) { resetStats(); Walking.walkOnScreen(Brunnen_Area.getTile()); randomizeCamera(); GameObject pool = GameObjects.closest("Pool of Refreshment"); if (pool != null) { pool.interact("Drink"); Sleep.sleep(5200, 6000); } } } } } public static void handleKilled() { if ((Killed_Area_Lumbridge.contains(Players.getLocal().getTile()) || lootItems || !restock) && !Ferox.contains(Players.getLocal().getTile())) { lootItems = true; inventoryOpen(); if (!itemsLooted) { Walking.walk(deathDomain); moveMouseRandom(); Sleep.sleepUntil(() -> deathDomain.contains(Players.getLocal().getTile()), 1000, 1400); if (deathDomain.contains(Players.getLocal().getTile())) { GameObject deathdoor = GameObjects.closest(D -> D != null && D.getName().equals("Death's Domain")); Client.getInstance().getRandomManager().disableSolver(RandomEvent.DEATHS_DOOR); if (deathdoor != null) { deathdoor.interact("Enter"); Sleep.sleep(4000, 6000); Dialogues.clickContinue(); Sleep.sleep(700, 1300); Dialogues.chooseOption("Can I collect the items from that gravestone now?"); Sleep.sleep(800, 1300); log("passed 1"); Dialogues.clickContinue(); log("passed 2"); Sleep.sleep(800, 1300); Dialogues.clickContinue(); log("passed 3"); Sleep.sleep(900, 1300); Dialogues.chooseOption("Bring my items here now; I'll pay your fee."); log("passed 4"); Sleep.sleep(900, 1300); Dialogues.clickContinue(); Sleep.sleep(900, 1300); emptyDeathOffice(); log("collect finished"); itemsLooted = true; log("set itemsLooted to true"); normalBank = false; log("set normalBank to false"); } } } if (itemsLooted && restock && !normalBank) { log("use portal?"); GameObject portal = GameObjects.closest("Portal"); if (portal != null) { portal.interact("Use"); moveMouseRandom(); Sleep.sleep(5000, 6300); } Tile nearestBankTile = BankLocation.getNearest().getTile(); if (!nearestBankTile.getArea(4).contains(Players.getLocal())) { Walking.walk(nearestBankTile); Sleep.sleepUntil(() -> Players.getLocal().getTile().equals(nearestBankTile), 1200, 1900); log("walking to bank"); } else if (nearestBankTile.getArea(4).contains(Players.getLocal())) { GameObject bankBooth = GameObjects.closest(b -> b != null && b.hasAction("Bank")); if (!Equipment.contains((item -> item != null && item.getName().contains("Ring of dueling")))) { bankBooth.interact(); Sleep.sleepUntil(Bank::isOpen, 3400, 5000); if (Bank.isOpen()) { if (!Equipment.slotContains(EquipmentSlot.WEAPON, "Rune pickaxe")) { Bank.withdraw("Rune pickaxe", 1); Sleep.sleep(1100, 2200); Inventory.interact("Rune pickaxe", "Wield"); Sleep.sleep(1100, 2200); } if (!Equipment.contains((item -> item != null && item.getName().contains("Ring of dueling")))) { Bank.withdraw("Ring of dueling(8)", 1); Sleep.sleep(1100, 2200); Inventory.interact("Ring of dueling(8)", "Wear"); Sleep.sleep(1100, 2200); Bank.close(); Sleep.sleepUntil(() -> !Bank.isOpen(), 3400, 5000); } } } else { Equipment.interact(EquipmentSlot.RING, "Ferox Enclave"); Sleep.sleep(6000, 9000); World randomMemberWorld = Worlds.getRandomWorld(w -> w.isMembers() && w.getMinimumLevel() < 500 && w.isNormal()); WorldHopper.hopWorld(randomMemberWorld); restock = false; Sleep.sleep(15000, 20000); KilledCount++; lootItems = false; restock = true; itemsLooted = false; normalBank = true; runesCraftet = false; banked = false; MainScript.pouchesFilled = false; resetStats(); } } } } } public static void processInteractWithAltar(String runeType, String altarName) { if (!Players.getLocal().isAnimating() && !Players.getLocal().isMoving() && DextersAbyssBetaGui.getRuneType().equals(runeType)) { checkRunecraftingLevel(); GameObject altar = GameObjects.closest(altarName); if (altar != null) { altar.interact(); emptyPouches(); } } } public static void processWalkingToRiss(Area abyssArea, Area altarArea, String runeType, Area riftArea, String riftName) { if (abyssArea.contains(Players.getLocal().getTile()) && !altarArea.contains(Players.getLocal().getTile()) && DextersAbyssBetaGui.getRuneType().equals(runeType)) { if (Inventory.contains(bag4damage) || Inventory.contains(colossalPounchDestroy) || Inventory.contains(5513) || Inventory.contains(5511)) { repairPouches(); } else { walkToRiss(riftArea, riftName, altarArea); } } } public static void walkToRiss(Area targetArea, String riftName, Area riftArea) { randomizeCamera(); Walking.walk(targetArea); Sleep.sleep(3000, 4000); GameObject rift = GameObjects.closest(riftName); if (rift != null && Players.getLocal().getTile().distance(rift) <= 15) { rift.interact(); randomizeCamera(); Sleep.sleepUntil(() -> riftArea.contains(Players.getLocal()), 6500,7600); } } } class GUI: package Abyss; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * @author dex */ public class DextersAbyssBetaGui extends JFrame { private final MainScript classSwitch; public DextersAbyssBetaGui(MainScript main) { this.classSwitch = main; initComponents(); } private void button1(ActionEvent e) { classSwitch.setStartScript(true); this.setVisible(false); } public static void setComboBox1(JComboBox<String> comboBox1) { DextersAbyssBetaGui.comboBox1 = comboBox1; } private void initComponents() { button1 = new JButton(); comboBox1 = new JComboBox<>(); label1 = new JLabel(); comboBox1.setSelectedItem("Air"); setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); setTitle("Settings"); Container contentPane = getContentPane(); contentPane.setLayout(null); //---- button1 ---- button1.setText("Run"); button1.addActionListener(this::button1); contentPane.add(button1); button1.setBounds(10, 205, 140, button1.getPreferredSize().height); //---- comboBox1 ---- comboBox1.setModel(new DefaultComboBoxModel<>(new String[] { "Air", "Mind", "Water", "Earth", "Fire", "Body", "Cosmic", "Chaos", "Nature", "Death", "Blood" })); contentPane.add(comboBox1); comboBox1.setBounds(185, 10, 195, comboBox1.getPreferredSize().height); //---- label1 ---- label1.setText("Select your Runetype:"); contentPane.add(label1); label1.setBounds(10, 15, 165, 22); { // compute preferred size Dimension preferredSize = new Dimension(); for(int i = 0; i < contentPane.getComponentCount(); i++) { Rectangle bounds = contentPane.getComponent(i).getBounds(); preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width); preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height); } Insets insets = contentPane.getInsets(); preferredSize.width += insets.right; preferredSize.height += insets.bottom; contentPane.setMinimumSize(preferredSize); contentPane.setPreferredSize(preferredSize); } pack(); setLocationRelativeTo(getOwner()); } private JButton button1; public static JComboBox<String> comboBox1; private JLabel label1; public static String getRuneType(){ Object selectedItem = comboBox1.getSelectedItem(); if(selectedItem != null){ return selectedItem.toString(); }return "Air"; } } class Res (game datas): package Abyss; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.map.Tile; public class Res { // Pounches---------------------------------------------------------------------------------------------------------- public static final int colossalPounch = 26784; public static final int colossalPounchDestroy = 26786; public static final int bag4damage = 5515; public static final int bag1 = 5509; public static final int bag2 = 5510; public static final int bag3 = 5512; public static final int bag4 = 5514; // Items------------------------------------------------------------------------------------------------------------- public static final int Duel_Ring = 2552; // rub public static final int pickAxe = 0; //TODO public static final int PURE_ESSENCE = 7936; // Objects------------------------------------------------------------------------------------------------------------- public static final int Barrier1 = 39652; public static final Area afterBarrier = new Area(3132, 3616, 3136, 3615); public static final Area afterBarrier1 = new Area(3132, 3640, 3135, 3641); public static final Area afterBarrier2 = new Area(3122, 3629, 3121, 3628); public static final int Bank_Chest = 26711; // "Use" public static final int Pool = 39651; // "Drink" public static final int Treppe = 16671; // Climb-up public static final int Treppe2 = 16672; // Climb-up public static final int Bank_Booth =18491;//Lumbridge // NPCs---------------------------------------------------------------------------------------------------------------- public static final int Zamorak_Magier = 3228; public static final int Zamorak_Magier_Schlund = 2583; // Area---------------------------------------------------------------------------------------------------------------- public static final Area zwischenLocation = new Area(3121, 3604, 3096, 3590); public static final Area up = new Area(3136, 3616, 3104, 3605); public static final Area down = new Area(3096, 3589, 3116, 3555); public static final Area testWalk = new Area(3114, 3595, 3121, 3589); public static final Area deathDoor = new Area(3238, 3194, 3240, 3191); public static final Area Brunnen_Area = new Area(3127, 3637, 3130, 3636); public static final Area Barriere_Area = new Area(3133, 3617, 3136, 3617); public static final Area angriffArea = new Area( new Tile(3124, 3639) , new Tile(3078, 3639), new Tile(3077, 3585), new Tile(3124, 3585), new Tile(3150, 3585), new Tile(3149, 3616), new Tile(3123, 3616) ); public static Area ZamorakMagierIn = new Area( new Tile(3039, 4837 ), new Tile(3040, 4837 ), new Tile(3042, 4836), new Tile(3042, 4833 ), new Tile(3042, 4831 ), new Tile(3038, 4831 ), new Tile(3036, 4832 ), new Tile(3037, 4835 ) ); public static final Area Ferox = new Area( new Tile(3125, 3639), new Tile(3146, 3639), new Tile(3146, 3641), new Tile(3155, 3641), new Tile(3155, 3628), new Tile(3143, 3628), new Tile(3143, 3626), new Tile(3138, 3626), new Tile(3138, 3617), new Tile(3131, 3617), new Tile(3132, 3625), new Tile(3125, 3626) ); public static final Area Died_Area = new Area(3145, 3616, 3091, 3553); public static final Area Killed_Area_Lumbridge = new Area(3217, 3226, 3246, 3189); public static final Area Killed_Area_Treppe = new Area(3206, 3208, 3205, 3209); public static final Area beforeBarrier = new Area(3133, 3620, 3135, 3617); public static final Area Bank_Area = new Area(3128, 3632, 3137, 3627); public static final Area ZamorakMagier_Area = new Area(3099, 3564, 3115, 3552); public static final Area Abys_Area = new Area(3012, 4862, 3069, 4804); public static final Area AbyPassed_Area = new Area( new Tile(3031, 4845, 0), new Tile(3025, 4840, 0), new Tile(3023, 4834, 0), new Tile(3024, 4828, 0), new Tile(3028, 4821, 0), new Tile(3035, 4818, 0), new Tile(3041, 4816, 0), new Tile(3046, 4819, 0), new Tile(3052, 4822, 0), new Tile(3055, 4831, 0), new Tile(3052, 4841, 0), new Tile(3046, 4847, 0), new Tile(3038, 4848, 0) ); public static final Area AbyPassed_Clean = new Area( new Tile(3030, 4844), new Tile(3026, 4840), new Tile(3023, 4834), new Tile(3027, 4823), new Tile(3029, 4820), new Tile(3040, 4817), new Tile(3050, 4821), new Tile(3052, 4823), new Tile(3055, 4830), new Tile(3054, 4836), new Tile(3052, 4841), new Tile(3048, 4845), new Tile(3043, 4847), new Tile(3037, 4847), new Tile(3031, 4845) ); //Altars________________________________________________________________________________________________________________ public static final Area NatureAltar_Area = new Area( new Tile(2394, 4848, 0), new Tile(2390, 4843, 0), new Tile(2391, 4838, 0), new Tile(2395, 4834, 0), new Tile(2399, 4832, 0), new Tile(2404, 4833, 0), new Tile(2407, 4834, 0), new Tile(2409, 4838, 0), new Tile(2410, 4844, 0), new Tile(2407, 4849, 0), new Tile(2402, 4851, 0), new Tile(2399, 4852, 0), new Tile(2396, 4850, 0) ); public static final Area Nature_Rift_Area = new Area(3033, 4843, 3036, 4841); public static final Area ChaosAltar_Area = new Area( new Tile(2269, 4847, 0), new Tile(2274, 4847, 0), new Tile(2276, 4845, 0), new Tile(2276, 4840, 0), new Tile(2274, 4838, 0), new Tile(2269, 4838, 0), new Tile(2267, 4840, 0), new Tile(2267, 4845, 0) ); public static final Area Chaos_Rift_Area = new Area(3042, 4843, 3045, 4841); public static final Area Law_Rift_Area = new Area(3048, 4839, 3049, 4840); public static final Area LawAltar_Area = new Area(2441, 4853, 2486, 4810); public static final Area Dead_Rift_Area = new Area(3049, 4838, 3050, 4836); public static final Area DeadAltar_Area = new Area(2182, 4860, 2232, 4814); public static final Area Water_Rift_Area = new Area(3050, 4834, 3051, 4832); public static final Area WaterAltar_Area = new Area(2732, 4846, 2705, 4823); public static final Area Soul_Rift_Area = new Area(3049, 4831, 3050, 4829); public static final Area SoulAltar_Area = new Area(); public static final Area Air_Rift_Area = new Area(3048, 4828, 3049, 4826); public static final Area AirAltar_Area = new Area( new Tile(2839, 4841), new Tile(2849, 4841), new Tile(2851, 4838), new Tile(2851, 4830), new Tile(2850, 4829), new Tile(2846, 4827), new Tile(2842, 4826), new Tile(2839, 4826), new Tile(2839, 4830), new Tile(2837, 4832), new Tile(2836, 4835) ); public static final Area Body_Rift_Area = new Area(3045, 4825, 3046, 4823); public static final Area BodyAltar_Area = new Area(2504, 4856, 2537, 4823); public static final Area Mind_Rift_Area = new Area(3037, 4822, 3042, 4820); public static final Area MindAltar_Area = new Area(2758, 4857, 2806, 4816); public static final Area Erd_Rift_Area = new Area(3031, 4826, 3033, 4823); public static final Area ErdAltar_Area = new Area(2626, 4862, 2685, 4813); public static final Area Fire_Rift_Area = new Area(3028, 4831, 3030, 4828); public static final Area FireAltar_Area = new Area(2567, 4856, 2599, 4822); public static final Area Blood_Rift_Area = new Area(3026, 4836, 3028, 4834); public static final Area BloodAltar_Area = new Area(3244, 4825, 3220, 4845); public static final Area Cosmo_Rift_Area = new Area(3029, 4841, 3030, 4839); public static final Area CosmoAltar_Area = new Area(2117, 4856, 2165, 4810); public static final Area deathDomain = new Area(3238, 3194, 3240, 3191); // ID Altar------------------------------------------------------------------------------------------------------------- public static final int Nature_Altar = 34768; public static final int Chaos_Altar = 34769; public static final int Body_Alter = 0; public static final int Mind_Altar = 0; public static final int Erd_Altar = 0; public static final int Fire_Altar = 34764; public static final int Blood_Altar = 43479; public static final int Cosmo_Altar = 34766; //Maybe walking to altar public static final int Law_Altar = 34767; public static final int Dead_Altar = 34770; public static final int Water_Altar = 34762; public static final int Soul_Altar = 27980; public static final int Air_Altar = 34760; //Rifts------------------------------------------------------------------------------------------------------------- public static final int Law_Rift = 25034; public static final int Death_Rift = 25035; public static final int Water_Rift = 25376; public static final int Soul_Rift = 25377; public static final int Air_Rift = 25378; public static final int Mind_Rift = 24975; public static final int Body_Rift = 24973; public static final int Earth_Rift = 24972; public static final int Fire_Rift = 24971; public static final int Blood_Rift = 43848; public static final int Comsic_Rift = 24974; public static final int Chaos_Rift = 24976; public static final int Nature_Rift = 24975; } class Antiban: package Abyss; import org.dreambot.api.input.Mouse; import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.filter.Filter; import org.dreambot.api.methods.input.Camera; import org.dreambot.api.methods.interactive.GameObjects; import org.dreambot.api.methods.interactive.NPCs; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.methods.map.Tile; import org.dreambot.api.methods.skills.Skill; import org.dreambot.api.methods.skills.Skills; import org.dreambot.api.methods.tabs.Tab; import org.dreambot.api.methods.widget.Widgets; import org.dreambot.api.utilities.Sleep; import org.dreambot.api.wrappers.interactive.GameObject; import org.dreambot.api.wrappers.interactive.NPC; import org.dreambot.api.wrappers.widgets.WidgetChild; import java.awt.*; import java.util.Random; import static org.dreambot.api.utilities.Logger.log; public class Antiban { public static int probabilityLimit = Calculations.random(2, 15); public static int minimalAntiban = Calculations.random(0, 200); public static void randomizeCamera() { if (Calculations.random(0, 100) < probabilityLimit) { // Zufällige Kamerabewegung int randomYaw = Calculations.random(0, 2000); int randomPitch = Calculations.random(224, 383); Camera.rotateTo(randomYaw, randomPitch); Sleep.sleep(400, 1000); } } public static void featureAntiban() { if (Calculations.random(0, 100) < probabilityLimit) { final Point[] STAT_WIDGET = { new Point(320, 1), new Point(320, 2), new Point(320, 3), new Point(320, 4), new Point(320, 5), new Point(320, 6), new Point(320, 7), new Point(320, 8), new Point(320, 9), new Point(320, 10), new Point(320, 11), new Point(320, 12), new Point(320, 13), new Point(320, 14), new Point(320, 15), new Point(320, 16), new Point(320, 17), new Point(320, 18), new Point(320, 19), new Point(320, 20), new Point(320, 21), new Point(320, 22), new Point(320, 23) }; Random random = new Random(); int randomIndex = random.nextInt(STAT_WIDGET.length); Point randomStat = STAT_WIDGET[randomIndex]; int mouseCounter = Calculations.random(1000, 4000); // Öffnet das SKILLS-Tab Tab.SKILLS.open(); // Holt das Widget entsprechend der zufälligen Indexposition WidgetChild skill = Widgets.getWidget(320).getChild(randomIndex); WidgetChild closeSkills = Widgets.get(214, 28); //Close action if (skill != null && skill.isVisible()) { skill.interact(); Sleep.sleep(Calculations.random(400, 1300)); if (closeSkills.hasAction("Close")) { Sleep.sleep(mouseCounter); closeSkills.interact("Close"); Sleep.sleepUntil(() -> !closeSkills.hasAction("Close"), 1000); } } } } public static Tile getClosestNPCPosition(int npcId) { NPC closestNPC = NPCs.closest(npcId); if (closestNPC != null) { return closestNPC.getTrueTile(); } return null; // Rückgabe null, falls kein NPC gefunden wurde } public static void moveMage() { if(Calculations.random(0,100) < probabilityLimit) { Tile closestNPCPosition = getClosestNPCPosition(3228); if (closestNPCPosition != null && !Players.getLocal().isInCombat()) { Camera.rotateToTile(closestNPCPosition); } } } public static void afkStatus(){ if(minimalAntiban < probabilityLimit){ log("Sleep Antiban"); Sleep.sleep(12000, 100000); } } public static Tile getClosestChestPosition(int chestID) { GameObject closestChest = GameObjects.closest(chestID); if (closestChest != null) { return closestChest.getTile(); } return null; // Sichert die Methode durch Rückgabe von null, wenn kein GameObject gefunden wird. } public static void moveChest() { if (Calculations.random(0, 100) < probabilityLimit) { Tile closestChestPosition = getClosestChestPosition(26711); // Korrekte Methodenbezeichnung if (closestChestPosition != null) { Camera.rotateToTile(closestChestPosition); // Korrektes Argument } } } public static Tile getClosestBarrierPosition(int barrierID) { GameObject closestBarrier = GameObjects.closest(barrierID); if (closestBarrier != null) { return closestBarrier.getTile(); } return null; // Sichert die Methode durch Rückgabe von null, wenn kein GameObject gefunden wird. } public static void moveBarrier() { if(Calculations.random(0,100) < probabilityLimit) { Tile closestBarrierPosition = getClosestBarrierPosition(15817); // Korrekte Methodenbezeichnung if (closestBarrierPosition != null) { Camera.rotateToTile(closestBarrierPosition); // Korrektes Argument } } } public static void checkRunecraftingLevel() { if (Calculations.random(0, 300) < probabilityLimit) { // Fertigkeiten-Tab öffnen Skills.open(); moveMouseRandom(); // Überprüfe das Runecrafting-Level int runecraftingLevel = Skills.getRealLevel(Skill.RUNECRAFTING); // Fertigkeiten-Tab schließen } } public static void moveMouseRandom() { int chance = Calculations.random(0, 100); if (chance < probabilityLimit) { // 30% chance log("Sleep moveMouseRandom"); int x = Calculations.random(0, 1200); int y = Calculations.random(0, 760); Mouse.move(new Point(x, y)); int clickChance = Calculations.random(0, 100); if (clickChance < 3) // 10% chance of right-clicking Mouse.click(true); else if (clickChance < 5) // 5% chance of left-clicking Mouse.click(); } } } enum class State: package Abyss; public enum State { WalkingToBank, UseBank, Banking, WalkingToBrun, WalkingToBarrier, WalkToMagier1, WalkingToMagier, IntaractWithMagier, FindRockorGap, TeleportBack, DiedAttention, WalkingToAirRiss, InteractWithAirAltar, WalkingToMindRiss, InteractWithMindAltar, WalkingToNatureRiss, InteractWithNatureAltar, WalkingToWaterRiss, InteractWithWaterAltar, WalkingToEarthRiss, InteractWithEarthAltar, WalkingToFireRiss, InteractWithFireAltar, WalkingToBodyRiss, InteractWithBodyAltar, WalkingToCosmicRiss, InteractWithCosmicAltar, WalkingToLawRiss, InteractWithLawAltar, WalkingToDeathRiss, InteractWithDeathAltar, WalkingToBloodRiss, InteractWithBloodAltar, WalkingToChaosRiss, InteractWithChaosAltar, Killed; }
    10. Yes, write your own script. every public script have a banrate from 100%. And dont use DB for Tutorial. 100 % banrate same. Have fun with collect experience ^^
    11. Phosani, But when you use that script, look that have you a account tree system it works fine
    12. i was run db via runelite, but now i work with EF. but the "issue" was because the many worldhoppings in runite mining.. u cant endless worldhopping, eg in 4 hr can u eg hop 200x then are the hoppings blocket for few hrs
    13. Its funy... EF fixet it for me with the same proxys.. i think ur Browser is tagged from Jagex or not not good enough for this. I think make better more fake Browser to fix this.
    14. Hey i use socks 5 proxys, the client load and i can botting, when i connect my browser with the same proxy i can create accs in original RD website. But the acc add browser in the client is only white, why?
    15. Is the switch case bug fixed? Walking Blast furnace and the switch from antiban to normalstate/world hopping to normal state?
    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.