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
  • ImLife

    VIP
    • Posts

      59
    • Joined

    • Last visited

    • Days Won

      1

    Everything posted by ImLife

    1. I personally skipped taskscript and went straight to treescript. Regardless i would suggest you look at open source repos on github. just search "dreambot" with java as language and sort by newest
    2. Great script! Works for uim. Unfortunately always laggs out here https://screenrec.com/share/HF5UGBXDVW and here: https://screenrec.com/share/qyUibSRl78
    3. Made one now, let me know if you're still looking
    4. Script is broken, always fails on one of the contracts in ardougne with repairing mirror, replacing bookcase & table.
    5. I'm working towards getting my accounts there to see if I can create a bot for it.
    6. From my understanding, this script should support UIM? Great free release btw
    7. Ahh, jesus christ... its the height of the projectile 🥲 Dm me that paypal link
    8. Upping the bounty to 50$ for a solution
    9. Love posts like these! Great work, keep it up
    10. Bumping this will give 25$ to anyone with a code snippet or tips leading to a solution for dodging wintertodt brazier breaking and wintertodt dodge snowfall.
    11. Wholesome, welcome!
    12. marked in red, "Patch dreambot into launcher"
    13. As a developer fresh into the dreambot ecosystem i wasn't aware of how good the dreambot walker was/is. Tested yesterday, the native walker seamlessly walked to catherby through port sarim charter without telling it to do so.
    14. Patch runelite into jagex launcher
    15. bought it and testing now. Agreed, trying to check looting bag whenever in combat. fails 99% of the time. might as well just keep protect item prayer on edit: Bot dies because its trying to check looting bag and prayer runs out meanwhile. Unusable as of now
    16. Wow, that was fast! Just a few hours after update😯 Gz on release will test! Edit: Can vouch, this script is goated! Double edit: Script has a bug where it takes of protect from magic so the bot dies a lot
    17. im using this as a reference, its great: https://github.com/rroarings/dreambot_scripts/blob/master/src/pfcows/src/PFCows.java
    18. Tried adding the package to my project. Lot's of errors not easily buildable
    19. Could you update us on the varbits you have found so far?
    20. Great initiative! Was not working straight out of the box on java, but I made some modifications: Main.Java public class Main extends TreeScript { private Timer timer; private long startTime; private GridPainter gridPainter = new GridPainter(true, 5, 5, 100, 35, new Color(255, 255, 255, 225)); public static String formatElapsedTime(long milliseconds) { long seconds = milliseconds / 1000; long hours = seconds / 3600; long minutes = (seconds % 3600) / 60; long remainingSeconds = seconds % 60; return String.format("%02d:%02d:%02d", hours, minutes, remainingSeconds); } @Override public void onPause() { if (timer != null) { timer.pause(); } } @Override public void onStart() { timer = new Timer(); startTime = System.currentTimeMillis(); timer.start(); gridPainter.addCell( new Cell( "Time", 1, "52", 1, false, new Color(255, 255, 255, 255), new Color(255, 255, 255, 255) ) ); gridPainter.addCell( new Cell( "Woodcutting EXP", 2, "0", 2, false, new Color(255, 255, 255, 255), new Color(255, 255, 255, 255) ) ); gridPainter.addCell( new Cell( "Fletching EXP", 3, "0", 2, false, new Color(255, 255, 255, 255), new Color(255, 255, 255, 255) ) ); } @Override public int onLoop() { if (timer != null && timer.isPaused()) { timer.resume(); } return this.getRoot().onLoop(); } @Override public void onPaint(Graphics2D graphics) { gridPainter.updateCell("Time", formatElapsedTime(timer.elapsed())); gridPainter.updateCell("Woodcutting EXP", String.valueOf(SkillTracker.getGainedExperience(Skill.WOODCUTTING)) + "exp"); gridPainter.updateCell("Fletching EXP", String.valueOf(SkillTracker.getGainedExperience(Skill.FLETCHING)) + "exp"); gridPainter.draw(graphics); } } ScriptPaint.Cell.java package ScriptPaint; import java.awt.*; import java.awt.geom.Rectangle2D; public class Cell { public static final Font font = new Font("Arial", Font.PLAIN, 14); private String name; private int rowNum; private String data; private int span; private boolean prefixWithName; private Color bgColor; private Color textColor; public Cell(String name, int rowNum, String data, int span, boolean prefixWithName, Color bgColor, Color textColor) { this.name = name; this.rowNum = rowNum; this.data = data; this.span = span; this.prefixWithName = prefixWithName; this.bgColor = bgColor; this.textColor = textColor; } public void draw(Graphics2D g, double x, double y, double cellWidth, double cellHeight, Color cellBorderColor) { double w = cellWidth * span; String text = prefixWithName ? name + ": " + data : data; Rectangle2D.Double rect = new Rectangle2D.Double(x, y, w, cellHeight); g.setColor(new Color(0, 0, 0, 100)); g.fill(rect); g.setColor(cellBorderColor); g.draw(rect); g.setFont(font); FontMetrics fm = g.getFontMetrics(); float textX = (float) (x + ((w - fm.stringWidth(text)) / 2)); float textY = (float) (y + (((cellHeight - fm.getHeight()) / 2) + fm.getAscent())); g.setColor(Color.WHITE); //text color g.drawString(text, textX, textY); } public String getName() { return name; } public int getRowNum() { return rowNum; } public void setData(String data) { this.data = data; } public void setPrefixWithName(boolean prefixWithName) { this.prefixWithName = prefixWithName; } public void setBgColor(Color bgColor) { this.bgColor = bgColor; } public void setTextColor(Color textColor) { this.textColor = textColor; } } ScriptPaint.GridPainter.java package ScriptPaint; import org.dreambot.api.utilities.Logger; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.util.LinkedList; import java.util.List; public class GridPainter { public static final Color GRAY = new Color(70, 61, 50, 156); public static final Color RED = new Color(255, 61, 50, 156); public static final Color GREEN = new Color(70, 255, 50, 156); public static final Color WHITE = new Color(255, 255, 255, 156); public static final Font font = new Font("Arial", Font.PLAIN, 14); private boolean show; private double x; private double y; private double cellWidth; private double cellHeight; private Color cellBorderColor; private List<LinkedList<Cell>> grid; public GridPainter(boolean show, double x, double y, double cellWidth, double cellHeight, Color cellBorderColor) { this.show = show; this.x = x; this.y = y; this.cellWidth = cellWidth; this.cellHeight = cellHeight; this.cellBorderColor = cellBorderColor; this.grid = new LinkedList<>(); } public void draw(Graphics2D g) { if (show) { double x = this.x; double y = this.y; for (LinkedList<Cell> row : grid) { for (Cell cell : row) { cell.draw(g, x, y, cellWidth, cellHeight, cellBorderColor); x += cellWidth; } x = this.x; y += cellHeight; } } } public void addCell(Cell cell) { int targetRowIndex = cell.getRowNum() - 1; // Ensure the grid has enough rows while (grid.size() <= targetRowIndex) { grid.add(new LinkedList<>()); } // Add the cell to the appropriate row grid.get(targetRowIndex).add(cell); } public void updateCell(String name, String data) { Cell cell = findCell(name); if (cell != null) { if (data != null) { cell.setData(data); cell.setPrefixWithName(true); cell.setBgColor(new Color(70, 61, 50, 156)); cell.setTextColor(new Color(255, 0, 0, 255)); } } } public void removeCell(String name) { for (LinkedList<Cell> row : grid) { row.remove(findCell(name)); } } private Cell findCell(String name) { for (LinkedList<Cell> row : grid) { for (Cell cell : row) { if (cell.getName().equals(name)) { return cell; } else { Logger.log("UABLE TO FIND CELL " + name); } } } return null; } } The updated code is arguably less clean and worse than originally proposed. but it works
    ×
    ×
    • 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.