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

    Scripter
    • Posts

      639
    • Joined

    • Last visited

    • Days Won

      20

    Everything posted by holic

    1. What did you change? Also setMousePos is just a wrapper function for Mouse#hop basically
    2. It's been working just fine for me, haven't tried it today though. Is it just not moving or what? What's going on? Could be a client issue.
    3. Minor release: 1.05 Fixed craft leather chaps bug Fixed teleportation bug DOWNLOAD
    4. The gif at the bottom of the post you mean? Yeah it's ~11 mins sped up into 45 seconds lol
    5. Thanks, man! Looking forward to seeing yours! I probably won't develop this further than I already have, don't feel like paying for membership to make it handle easy/med clues so no worries there.
    6. Alclueholic "It's like an alcoholic, but for clue scrolls" Description A simple beginner clue scroll solver. Completes scrolls in 2 to 10 minutes, depending on complexity. Setup Have a clue scroll either in your inventory or bank Meet all item and level requirements Click start Features Quick-start support - Requires no interaction to start the script, can even be executed from within another script. Optional quick-start parameters o, open: boolean; toggles the option to open your casket at the end of the script c, check: boolean; toggles the option to check your bank for a clue scroll if there isn't one in your inventory (ideal for running in tandem with other scripts) p, plugin: boolean; set to true if run in tandem with another script to move the paint's location on screen as to not overlap the other script's paint. Teleportation - If you meet the level & item requirements for a teleport the script will cast it when appropriate. Uses home teleport only when possible. Gathers missing items - See below for full list Custom mouse movement algorithm - A combination of the two algorithms I posted which builds a "profile" for each account to create a unique play-style for each bot Anti-ban - Randomized movements, actions and sleeps to add onto the unique play-style of each bot. Start anywhere - Custom walking utility lets you start the script anywhere you'd like, even places that don't have walk nodes! Skill requirements 15 Smithing: To smith an iron dagger for Charlie 15 Mining: To mine some a iron ore for Charlie 18 Crafting: To craft a leather body/chaps for Charlie 20 Cooking: To cook a trout/pike for Charlie Will catch the required fish if not found in the bank (Note: level 25 fishing required to catch a pike) 20 Fishing: To catch a raw trout/herring for Charlie Will also be potentially required to cook Charlie a trout if you don't have any in the bank Item requirements - must be in bank or inventory Optional items - these items will be grabbed by the script if they aren't in your bank and the rest will be purchased Spade Strange device Bronze axe Bronze pickaxe Mining iron for Charlie, but first getting a pickaxe from a spawn, then fishing for a herring for Charlie, then withdrawing a Chef's hat and cheering at Iffie Changelog
    7. Glad to hear it! Yeah I realize I changed some things at the last moment which created a bug so you'll need to just change the lines of g2.setColor(cursorColor) to g2.setColor(nextCursorColor()) in the drawMouseX methods. I originally didn't have separate colour options for mouse and trail functions but decided to add them for the public release and in doing so messed that bit up hah.
    8. Thanks! Hoping to have some more fancy ones coming soon
    9. Thanks guys! Just happy to share more with the community. I think there's a bug with drawCircleMouse where it doesn't set the colour but I figure that's easy enough that I don't need to post a fix
    10. I made a nifty little mouse utility for drawing custom cursors and trails that I thought I would pass onto the community. Some of the trails are meh but I think the final product is still great and it's very straightforward to use. Credits: DarkMagican for the original mouse trails & rainbow source ENFILADE for MousePathPoint Setup functions void setCursorColor(Color cursorColor) Manually set the cursor's colour, default white void setCursorStroke(BasicStroke cursorStroke) Manually set the cursor's stroke thickness, default 2 void setTrailColor(Color trailColor) Manually set the trail's colour, default white void setRainbow(boolean RAINBOW) Set the mouse cursor & trail colour to be rainbow void setRandomColor() Set the mouse cursor & trail colour to be random, possibly rainbow Mouse functions void drawRandomMouse(Graphics g) Draws the randomly selected mouse graphic. void drawPlusMouse(Graphics g) Draws a "+" for the mouse, with shadow. void drawCrossMouse(Graphics g) Draws a "x" for the mouse, with shadow. void drawCircleMouse(Graphics g) Draws a circle for the mouse, with shadow. void drawDotMouse(Graphics g) Draws a dot for the mouse, with shadow. void drawRotatingCrossMouse(Graphics g) Draws an "x" for the mouse that rotates, with shadow. void drawRotatingCircleMouse(Graphics g) Draws a circle with rotating pie slices, with shadow. Trail functions void drawTrail(Graphics g) Draws a typical line-based mouse trail, varying size line width void drawZoomTrail(Graphics g) Draws a "ZOOM" for a trail, varying case and size void drawTextTrail(Graphics g, String trail) Draws your specified text for a trail, could work for script status? void drawDotTrail(Graphics g) Draws a series of dots as a trail, varying sizes void drawCircleTrail(Graphics g) Draws a series of circles as a trail, varying sizes void drawPlusTrail(Graphics g) Draws a series of "+" as a trail, varying sizes void drawRotatingSlashTrail(Graphics g) Draws a series of "/" as a trail that rotate, varying sizes void drawRotatingCrossTrail(Graphics g) Draws a series of "x" as a trail that rotate, varying sizes Usage example First, add DrawMouseUtil to your project by copying and pasting it into a file name DrawMouseUtil.java and importing it into your project Second, create a variable for DrawMouseUtil so you have consistency in your setup and calls. private DrawMouseUtil drawMouseUtil = new DrawMouseUtil(); Third, set your desired settings and add it to onStart. For this example we will be setting up the mouse randomly: @Override public void onStart() { drawMouseUtil.setRandomColor(); //Set a random colour and leave the stroke setting at default ..... } Fourth, call your desired mouse cursor and trail in onPaint. For this example we will be using random settings: @Override public void onPaint(Graphics g) { drawMouseUtil.drawRandomMouse(g); drawMouseUtil.drawRandomMouseTrail(g); } My favourite combination currently is either drawMouseUtil.drawRotatingCrossMouse(g) drawMouseUtil.drawRotatingCrossTrail(g) or drawMouseUtil.drawRotatingCircleMouse(g); drawMouseUtil.drawDotTrail(g); DrawMouseUtil.java: /** DrawMouseUtil by holic **/ import org.dreambot.api.Client; import org.dreambot.api.methods.Calculations; import java.awt.*; import java.awt.geom.AffineTransform; import java.awt.geom.Arc2D; import java.awt.geom.Line2D; import java.util.LinkedList; import static org.dreambot.api.methods.MethodProvider.log; public class DrawMouseUtil { LinkedList<MousePathPoint> mousePath = new LinkedList<MousePathPoint>(); private boolean RAINBOW = false; private int STROKE = 2; private int mX, mY; private long angle; private BasicStroke cursorStroke = new BasicStroke(STROKE); private int randomMouse = Calculations.random(5); private int randomMouseTrail = Calculations.random(7); private Color cursorColor = Color.WHITE; private Color trailColor = cursorColor; private Color[] cursorColors = {new Color(78, 216, 255), new Color(90, 222, 98), new Color(215, 182, 77), new Color(232, 134, 124), new Color(215, 120, 124), new Color(183, 138, 215), Color.WHITE}; private AffineTransform oldTransform; private int r = 0, g = 0, b = 0, duration = 650; public DrawMouseUtil() { Client.getInstance().setDrawMouse(false); } public void setRainbow(boolean RAINBOW) { if (RAINBOW) { g = 255; } else { g = 0; } this.RAINBOW = RAINBOW; } public void setRandomColor() { if (Calculations.random(2) != 1) { log("Rainbow mouse!"); setRainbow(true); } else { setRainbow(false); cursorColor = getRandomColour(); trailColor = cursorColor; } } private Color getRandomColour() { return cursorColors[Calculations.random(cursorColors.length - 1)]; } public void setCursorStroke(BasicStroke cursorStroke) { this.cursorStroke = cursorStroke; } public void setCursorColor(Color cursorColor) { this.cursorColor = cursorColor; } public void setTrailColor(Color trailColor) { this.trailColor = trailColor; } public void drawRandomMouse(Graphics g) { switch (randomMouse) { case 0: drawPlusMouse(g); break; case 1: drawCrossMouse(g); break; case 2: drawCircleMouse(g); break; case 3: drawDotMouse(g); break; case 4: drawRotatingCrossMouse(g); break; case 5: drawRotatingCircleMouse(g); break; } } public void drawRandomMouseTrail(Graphics g) { switch (randomMouseTrail) { case 0: drawTrail(g); break; case 1: drawZoomTrail(g); break; case 2: drawPlusTrail(g); break; case 3: drawCircleTrail(g); break; case 4: drawDotTrail(g); break; case 5: drawRotatingSlashTrail(g); break; case 6: drawRotatingCrossTrail(g); break; case 7: drawTextTrail(g, "your text here"); break; } } /** * * ** ** ** ** * Mouse cursor * * ** ** ** ** **/ public void drawPlusMouse(Graphics g) { Graphics2D g2 = (Graphics2D) g; int s = 4; Point cP = Client.getMousePosition(); int cX = (int) cP.getX(); int cY = (int) cP.getY(); g2.setColor(Color.BLACK); g2.setStroke(cursorStroke); /* + Cursor */ g2.drawLine(cX - s + 1, cY + 1, cX + s + 1, cY + 1); g2.drawLine(cX + 1, cY - s + 1, cX + 1, cY + s + 1); g2.setColor(cursorColor); g2.drawLine(cX - s, cY, cX + s, cY); g2.drawLine(cX, cY - s, cX, cY + s); g2.setStroke(new BasicStroke(1)); } public void drawCrossMouse(Graphics g) { Graphics2D g2 = (Graphics2D) g; int s = 3; Point cP = Client.getMousePosition(); int cX = (int) cP.getX(); int cY = (int) cP.getY(); g2.setStroke(cursorStroke); g2.setColor(Color.BLACK); /* X Cursor */ g2.drawLine(cX - s + 1, cY - s + 1, cX + s + 1, cY + s + 1); g2.drawLine(cX - s + 1, cY + s + 1, cX + s + 1, cY - s + 1); g2.setColor(cursorColor); g2.drawLine(cX - s, cY - s, cX + s, cY + s); g2.drawLine(cX - s, cY + s, cX + s, cY - s); g2.setStroke(new BasicStroke(1)); } public void drawCircleMouse(Graphics g) { Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); int mX = Client.getMousePosition().x; mY = Client.getMousePosition().y; g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); if (mX != -1) { g2.setStroke(cursorStroke); g2.setColor(Color.BLACK); g2.drawOval(mX - 1, mY - 1, 4, 4); g2.setColor(cursorColor); g2.drawOval(mX - 2, mY - 2, 4, 4); g2.setStroke(new BasicStroke(1)); } } public void drawDotMouse(Graphics g) { Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); int mX = Client.getMousePosition().x; mY = Client.getMousePosition().y; g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); if (mX != -1) { g2.setStroke(cursorStroke); g2.setColor(Color.BLACK); g2.drawOval(mX - 1, mY - 1, 4, 4); g2.setColor(cursorColor); g2.drawOval(mX - 2, mY - 2, 4, 4); g2.setStroke(new BasicStroke(1)); } } public void drawRotatingCircleMouse(Graphics g) { Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); int mX = Client.getMousePosition().x; mY = Client.getMousePosition().y; g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); if (mX != -1) { g2.setStroke(cursorStroke); g2.drawOval(mX - 2, mY - 2, 4, 4); g2.setColor(cursorColor); g2.rotate(Math.toRadians(angle += 6), mX, mY); g2.draw(new Arc2D.Double(mX - 6, mY - 6, 12, 12, 330, 60, Arc2D.OPEN)); g2.draw(new Arc2D.Double(mX - 6, mY - 6, 12, 12, 151, 60, Arc2D.OPEN)); g2.setTransform(oldTransform); g2.setStroke(new BasicStroke(1)); } } public void drawRotatingCrossMouse(Graphics g) { Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); Point cP = Client.getMousePosition(); int cX = (int) cP.getX(); int cY = (int) cP.getY(); int s = 4; g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); if (mX != -1) { g2.setStroke(cursorStroke); g2.setColor(Color.BLACK); //g.rotate(Math.toRadians(angle+=1), mX, mY); Line2D lineShadow = new Line2D.Double(cX - s + 1, cY + 1, cX + s + 1, cY + 1); Line2D lineShadow2 = new Line2D.Double(cX + 1, cY - s + 1, cX + 1, cY + s + 1); AffineTransform atS = AffineTransform.getRotateInstance( Math.toRadians(angle += 4), cX + 1, cY + 1); AffineTransform atS2 = AffineTransform.getRotateInstance( Math.toRadians(angle), cX + 1, cY + 1); g2.draw(atS.createTransformedShape(lineShadow)); g2.draw(atS2.createTransformedShape(lineShadow2)); g2.setColor(nextCursorColor()); Line2D line = new Line2D.Double(cX - s, cY, cX + s, cY); Line2D line2 = new Line2D.Double(cX, cY - s, cX, cY + s); AffineTransform at = AffineTransform.getRotateInstance( Math.toRadians(angle += 4), cX, cY); AffineTransform at2 = AffineTransform.getRotateInstance( Math.toRadians(angle), cX, cY); // Draw the rotated line g2.draw(at.createTransformedShape(line)); g2.draw(at2.createTransformedShape(line2)); g2.setStroke(new BasicStroke(1)); } } /** * * ** ** ** ** * Mouse trails * * ** ** ** ** **/ public void drawTrail(Graphics g) { Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); int mX = Client.getMousePosition().x; mY = Client.getMousePosition().y; g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); while (!mousePath.isEmpty() && mousePath.peek().isUp()) mousePath.remove(); Point clientCursor = Client.getMousePosition(); MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, duration); if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp)) mousePath.add(mpp); MousePathPoint lastPoint = null; for (MousePathPoint a : mousePath) { if (lastPoint != null) { Color c = nextTrailColor(); int tmpcursorStroke = STROKE; if (STROKE > 1) tmpcursorStroke = (a.getAlpha() > 175 ? STROKE : STROKE - 1); g2.setStroke(new BasicStroke(tmpcursorStroke)); g2.setColor(new Color(c.getRed(), c.getGreen(), c.getBlue(), a.getAlpha())); //trail color g2.drawLine(a.x, a.y, lastPoint.x, lastPoint.y); g2.setStroke(new BasicStroke(1)); } lastPoint = a; } } public void drawZoomTrail(Graphics g) { String zoom = "zoom zoom "; int zoomIndex = 0, zoomIndexStart = -1; Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); g2.setFont(new Font("default", Font.BOLD, 12)); g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); while (!mousePath.isEmpty() && mousePath.peek().isUp()) mousePath.remove(); Point clientCursor = Client.getMousePosition(); MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, duration * 2); if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp)) mousePath.add(mpp); MousePathPoint lastPoint = null; for (MousePathPoint a : mousePath) { if (zoomIndex >= zoom.length()) zoomIndex = 0; String toDraw = String.valueOf(zoom.toCharArray()[zoomIndex]); if (lastPoint != null) { Color c = nextTrailColor(); toDraw = a.getAlpha() > 175 ? toDraw.toUpperCase() : toDraw; g2.setColor(new Color(c.getRed(), c.getGreen(), c.getBlue(), a.getAlpha())); //trail color g2.drawString(toDraw, a.x, a.y + 5); } lastPoint = a; zoomIndex++; } g2.setFont(new Font("default", Font.PLAIN, 12)); } public void drawTextTrail(Graphics g, String trail) { int zoomIndex = 0, zoomIndexStart = -1; Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); g2.setFont(new Font("default", Font.BOLD, 12)); g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); while (!mousePath.isEmpty() && mousePath.peek().isUp()) mousePath.remove(); Point clientCursor = Client.getMousePosition(); MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, duration * 2); if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp)) mousePath.add(mpp); MousePathPoint lastPoint = null; for (MousePathPoint a : mousePath) { if (lastPoint != null) { Color c = nextTrailColor(); g2.setColor(new Color(c.getRed(), c.getGreen(), c.getBlue(), a.getAlpha())); //trail color g2.drawString(trail, a.x, a.y); } lastPoint = a; zoomIndex++; } g2.setFont(new Font("default", Font.PLAIN, 12)); } public void drawDotTrail(Graphics g) { Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); while (!mousePath.isEmpty() && mousePath.peek().isUp()) mousePath.remove(); Point clientCursor = Client.getMousePosition(); MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, duration * 2); if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp)) mousePath.add(mpp); MousePathPoint lastPoint = null; for (MousePathPoint a : mousePath) { if (lastPoint != null) { Color c = nextTrailColor(); int size = a.getAlpha() > 200 ? 6 : a.getAlpha() > 150 ? 5 : a.getAlpha() > 100 ? 4 : a.getAlpha() > 50 ? 3 : 2; g2.setStroke(cursorStroke); g2.setColor(new Color(c.getRed(), c.getGreen(), c.getBlue(), a.getAlpha())); //trail color g2.fillOval(a.x, a.y, size, size); g2.setStroke(new BasicStroke(1)); } lastPoint = a; } } public void drawCircleTrail(Graphics g) { Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); while (!mousePath.isEmpty() && mousePath.peek().isUp()) mousePath.remove(); Point clientCursor = Client.getMousePosition(); MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, duration * 2); if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp)) mousePath.add(mpp); MousePathPoint lastPoint = null; for (MousePathPoint a : mousePath) { if (lastPoint != null) { Color c = nextTrailColor(); int size = a.getAlpha() > 200 ? 6 : a.getAlpha() > 150 ? 5 : a.getAlpha() > 100 ? 4 : a.getAlpha() > 50 ? 3 : 2; g2.setStroke(cursorStroke); g2.setColor(new Color(c.getRed(), c.getGreen(), c.getBlue(), a.getAlpha())); //trail color g2.drawOval(a.x, a.y, size, size); g2.setStroke(new BasicStroke(1)); } lastPoint = a; } } public void drawPlusTrail(Graphics g) { Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); while (!mousePath.isEmpty() && mousePath.peek().isUp()) mousePath.remove(); Point clientCursor = Client.getMousePosition(); MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, duration * 2); if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp)) mousePath.add(mpp); MousePathPoint lastPoint = null; for (MousePathPoint a : mousePath) { if (lastPoint != null) { Color c = nextTrailColor(); int size = a.getAlpha() > 200 ? 5 : a.getAlpha() > 150 ? 4 : a.getAlpha() > 100 ? 3 : a.getAlpha() > 50 ? 2 : 1; g2.setStroke(cursorStroke); g2.setColor(new Color(c.getRed(), c.getGreen(), c.getBlue(), a.getAlpha())); //trail color g2.drawLine(a.x - size + 1, a.y + 1, a.x + size + 1, a.y + 1); g2.drawLine(a.x + 1, a.y - size + 1, a.x + 1, a.y + size + 1); g2.setStroke(new BasicStroke(1)); } lastPoint = a; } } public void drawRotatingSlashTrail(Graphics g) { Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); while (!mousePath.isEmpty() && mousePath.peek().isUp()) mousePath.remove(); Point clientCursor = Client.getMousePosition(); MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, duration * 2); if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp)) mousePath.add(mpp); MousePathPoint lastPoint = null; for (MousePathPoint a : mousePath) { if (lastPoint != null) { Color c = nextTrailColor(); int size = a.getAlpha() > 200 ? 5 : a.getAlpha() > 150 ? 4 : a.getAlpha() > 100 ? 3 : a.getAlpha() > 50 ? 2 : 1; g2.setStroke(cursorStroke); g2.setColor(new Color(c.getRed(), c.getGreen(), c.getBlue(), a.getAlpha())); //trail color Line2D line = new Line2D.Double(a.x - size, a.y, a.x + size, a.y); Line2D line2 = new Line2D.Double(a.x, a.y - size, a.x, a.y + size); AffineTransform at = AffineTransform.getRotateInstance( Math.toRadians(angle += 4), a.x, a.y); g2.draw(at.createTransformedShape(line)); g2.setStroke(new BasicStroke(1)); } lastPoint = a; } } public void drawRotatingCrossTrail(Graphics g) { Graphics2D g2 = (Graphics2D) g; oldTransform = g2.getTransform(); g2.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); while (!mousePath.isEmpty() && mousePath.peek().isUp()) mousePath.remove(); Point clientCursor = Client.getMousePosition(); MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, duration * 2); if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp)) mousePath.add(mpp); MousePathPoint lastPoint = null; for (MousePathPoint a : mousePath) { if (lastPoint != null) { Color c = nextTrailColor(); int size = a.getAlpha() > 200 ? 5 : a.getAlpha() > 150 ? 4 : a.getAlpha() > 100 ? 3 : a.getAlpha() > 50 ? 2 : 1; g2.setStroke(cursorStroke); g2.setColor(new Color(c.getRed(), c.getGreen(), c.getBlue(), a.getAlpha())); //trail color Line2D line = new Line2D.Double(a.x - size, a.y, a.x + size, a.y); Line2D line2 = new Line2D.Double(a.x, a.y - size, a.x, a.y + size); AffineTransform at = AffineTransform.getRotateInstance( Math.toRadians(angle += 4), a.x, a.y); g2.draw(at.createTransformedShape(line)); g2.draw(at.createTransformedShape(line2)); g2.setStroke(new BasicStroke(1)); } lastPoint = a; } } public void nextRGB() { if (r == 255 && g < 255 & b == 0) { g++; } if (g == 255 && r > 0 && b == 0) { r--; } if (g == 255 && b < 255 && r == 0) { b++; } if (b == 255 && g > 0 && r == 0) { g--; } if (b == 255 && r < 255 && g == 0) { r++; } if (r == 255 && b > 0 && g == 0) { b--; } } public Color currentCursorColor() { if (!RAINBOW) { return cursorColor; } else { return new Color(r, g, b); } } public Color currentTrailColor() { if (!RAINBOW) { return trailColor; } else { return new Color(r, g, b); } } public Color nextCursorColor() { nextRGB(); return currentCursorColor(); } public Color nextTrailColor() { if (!RAINBOW) //Don't call this if it is set to rainbow so we're not double calling nextRGB() nextRGB(); return currentTrailColor(); } public class MousePathPoint extends Point { private long finishTime; private double lastingTime; private int alpha = 255; public MousePathPoint(int x, int y, int lastingTime) { super(x, y); this.lastingTime = lastingTime; finishTime = System.currentTimeMillis() + lastingTime; } public int getAlpha() { int newAlpha = ((int) ((finishTime - System.currentTimeMillis()) / (lastingTime / alpha))); if (newAlpha > 255) newAlpha = 255; if (newAlpha < 0) newAlpha = 0; return newAlpha; } public boolean isUp() { return System.currentTimeMillis() >= finishTime; } } } Enjoy falsely tricking people into thinking your script is better than it is!
    11. Excellent! Thanks, Pixel_Life. I'm glad to hear it's working great for you
    12. Thanks, Stoned! But really all the thanks should go to BenLand100, wherever he is these days, as I just modified it to my liking and to be more human-like If anyone uses it in their scripts let me know, I'd love to see it in action. My script that uses it is simple so it's not a great demo. I have tested it thoroughly to make sure it works well, I just haven't seen it doing a lot of fast/complicated actions.
    13. Hey all, Since DB3 officially supports custom mouse algorithms I thought I would port over a classic one: WindMouse. WindMouse was written by BenLand100 for SCAR some years back (maybe 10 years?) and has been used on so many damn bots throughout the years because it functions really well so it only seemed right to bring it here. In the source code below, there are two implementations of WindMouse: Point windMouse(int x, int y) Which comes directly from the SMART github with minor adjustments to work with DB3. Better in fixed mode. void windMouse2(Point point) My tweaked version from years back that supports all screen sizes. I've added a random point between the original and the destination point if the distance between them is large to feel more human but has a 50% chance of happening. By default my implementation is the active algorithm (as it handles all sizes), swap the comments in handleMovement to change to the original. To use it, simply add the file WindMouse.java to your project and add the following to your onStart method: Client.getInstance().setMouseMovementAlgorithm(new WindMouse()); All credits go to Benjamin J. Land a.k.a. BenLand100 WindMouse.java: /** * WindMouse from SMART by Benland100 * Copyright to Benland100, (Benjamin J. Land) * * Prepped for DreamBot 3 **/ import org.dreambot.api.Client; import org.dreambot.api.input.Mouse; import org.dreambot.api.input.mouse.algorithm.MouseMovementAlgorithm; import org.dreambot.api.input.mouse.destination.AbstractMouseDestination; import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.input.mouse.MouseSettings; import java.awt.*; import static java.lang.Thread.sleep; public class WindMouse implements MouseMovementAlgorithm { private int _mouseSpeed = MouseSettings.getSpeed() > 15 ? MouseSettings.getSpeed() - 10 : 15; private int _mouseSpeedLow = Math.round(_mouseSpeed / 2); private int _mouseGravity = Calculations.random(4, 20); private int _mouseWind = Calculations.random(1, 10); @Override public boolean handleMovement(AbstractMouseDestination abstractMouseDestination) { //Get a suitable point for the mouse's destination Point suitPos = abstractMouseDestination.getSuitablePoint(); // Select which implementation of WindMouse you'd like to use // by uncommenting out the line you want to use below: //windMouse(suitPos.x, suitPos.y); //Original implementation windMouse2(suitPos); //Tweaked implementation return distance(Client.getMousePosition(), suitPos) < 2; } public static void sleep(int min, int max) { try { Thread.sleep(Calculations.random(min,max)); } catch (InterruptedException e) { log(e.getMessage()); } } public static void sleep(int ms) { try { Thread.sleep(ms); } catch (InterruptedException e) { log(e.getMessage()); } } /** * Tweaked implementation of WindMouse * Moves to a mid point on longer moves to seem a little more human-like * Remove the if statement below if you'd rather straighter movement * @param point The destination point */ public void windMouse2(Point point) { Point curPos = Client.getMousePosition(); if (distance(point, curPos) > 250 && Calculations.random(1) == 2) { Point rp = randomPoint(point, curPos); windMouse2(curPos.x, curPos.y, rp.x, rp.y, _mouseGravity, _mouseWind, _mouseSpeed, Calculations.random(5, 25)); sleep(1, 150); } windMouse2(curPos.x, curPos.y, point.x, point.y, _mouseGravity, _mouseWind, _mouseSpeed, Calculations.random(5, 25)); _mouseGravity = Calculations.random(4, 20); _mouseWind = Calculations.random(1, 10); _mouseSpeed = Calculations.random(_mouseSpeedLow, MouseSettings.getSpeed()); } /** * Tweaked implementation of WindMouse by holic * All credit to Benjamin J. Land for the original. (see below) * * @param xs The x start * @param ys The y start * @param xe The x destination * @param ye The y destination * @param gravity Strength pulling the position towards the destination * @param wind Strength pulling the position in random directions * @param targetArea Radius of area around the destination that should * trigger slowing, prevents spiraling */ private void windMouse2(double xs, double ys, double xe, double ye, double gravity, double wind, double speed, double targetArea) { double dist, veloX = 0, veloY = 0, windX = 0, windY = 0; double sqrt2 = Math.sqrt(2); double sqrt3 = Math.sqrt(3); double sqrt5 = Math.sqrt(5); int tDist = (int) distance(xs, ys, xe, ye); long t = System.currentTimeMillis() + 10000; while (!(Math.hypot((xs - xe), (ys - ye)) < 1)) { if (System.currentTimeMillis() > t) break; dist = Math.hypot((xs - xe), (ys - ye)); wind = Math.min(wind, dist); if ((dist < 1)) { dist = 1; } long d = (Math.round((Math.round(((double) (tDist))) * 0.3)) / 7); if ((d > 25)) { d = 25; } if ((d < 5)) { d = 5; } double rCnc = Calculations.random(6); if ((rCnc == 1)) { d = 2; } double maxStep = (Math.min(d, Math.round(dist))) * 1.5; if ((dist >= targetArea)) { windX = (windX / sqrt3) + ((Calculations.random((int) ((Math.round(wind) * 2) + 1)) - wind) / sqrt5); windY = (windY / sqrt3) + ((Calculations.random((int) ((Math.round(wind) * 2) + 1)) - wind) / sqrt5); } else { windX = (windX / sqrt2); windY = (windY / sqrt2); } veloX += windX + gravity * (xe - xs) / dist; veloY += windY + gravity * (ye - ys) / dist; if ((Math.hypot(veloX, veloY) > maxStep)) { maxStep = ((maxStep / 2) < 1) ? 2 : maxStep; double randomDist = (maxStep / 2) + Calculations.random((int) (Math.round(maxStep) / 2)); double veloMag = Math.sqrt(((veloX * veloX) + (veloY * veloY))); veloX = (veloX / veloMag) * randomDist; veloY = (veloY / veloMag) * randomDist; } int lastX = ((int) (Math.round(xs))); int lastY = ((int) (Math.round(ys))); xs += veloX; ys += veloY; if ((lastX != Math.round(xs)) || (lastY != Math.round(ys))) { Mouse.hop(new Point((int) Math.round(xs), (int) Math.round(ys))); } int w = Calculations.random((int) (Math.round(100 / speed))) * 6; if ((w < 5)) { w = 5; } w = (int) Math.round(w * 0.9); sleep(w); } if (((Math.round(xe) != Math.round(xs)) || (Math.round(ye) != Math.round(ys)))) { Mouse.hop(new Point(((int) (Math.round(xe))), ((int) (Math.round(ye))))); } } /** * Internal mouse movement algorithm from SMART. Do not use this without credit to either * Benjamin J. Land or BenLand100. This was originally synchronized to prevent multiple * motions and bannage but functions poorly with DB3. * * BEST USED IN FIXED MODE * * @param xs The x start * @param ys The y start * @param xe The x destination * @param ye The y destination * @param gravity Strength pulling the position towards the destination * @param wind Strength pulling the position in random directions * @param minWait Minimum relative time per step * @param maxWait Maximum relative time per step * @param maxStep Maximum size of a step, prevents out of control motion * @param targetArea Radius of area around the destination that should * trigger slowing, prevents spiraling * @result The actual end point */ private Point windMouseImpl(double xs, double ys, double xe, double ye, double gravity, double wind, double minWait, double maxWait, double maxStep, double targetArea) { final double sqrt3 = Math.sqrt(3); final double sqrt5 = Math.sqrt(5); double dist, veloX = 0, veloY = 0, windX = 0, windY = 0; while ((dist = Math.hypot(xs - xe, ys - ye)) >= 1) { wind = Math.min(wind, dist); if (dist >= targetArea) { windX = windX / sqrt3 + (2D * Math.random() - 1D) * wind / sqrt5; windY = windY / sqrt3 + (2D * Math.random() - 1D) * wind / sqrt5; } else { windX /= sqrt3; windY /= sqrt3; if (maxStep < 3) { maxStep = Math.random() * 3D + 3D; } else { maxStep /= sqrt5; } } veloX += windX + gravity * (xe - xs) / dist; veloY += windY + gravity * (ye - ys) / dist; double veloMag = Math.hypot(veloX, veloY); if (veloMag > maxStep) { double randomDist = maxStep / 2D + Math.random() * maxStep / 2D; veloX = (veloX / veloMag) * randomDist; veloY = (veloY / veloMag) * randomDist; } int lastX = ((int) (Math.round(xs))); int lastY = ((int) (Math.round(ys))); xs += veloX; ys += veloY; if ((lastX != Math.round(xs)) || (lastY != Math.round(ys))) { setMousePosition(new Point((int) Math.round(xs), (int) Math.round(ys))); } double step = Math.hypot(xs - lastX, ys - lastY); sleep((int) Math.round((maxWait - minWait) * (step / maxStep) + minWait)); } return new Point((int) xs, (int) ys); } /** * Moves the mouse from the current position to the specified position. * Approximates human movement in a way where smoothness and accuracy are * relative to speed, as it should be. * * @param x The x destination * @param y The y destination * @result The actual end point */ public Point windMouse(int x, int y) { Point c = Client.getMousePosition(); double speed = (Math.random() * 15D + 15D) / 10D; return windMouseImpl(c.x, c.y, x, y, 9D, 3D, 5D / speed, 10D / speed, 10D * speed, 8D * speed); } private void setMousePosition(Point p) { Mouse.hop(p.x, p.y); } private static double distance(double x1, double y1, double x2, double y2) { return Math.sqrt((Math.pow((Math.round(x2) - Math.round(x1)), 2) + Math.pow((Math.round(y2) - Math.round(y1)), 2))); } public double distance(Point p1, Point p2) { return Math.sqrt((p2.y - p1.y) * (p2.y - p1.y) + (p2.x - p1.x) * (p2.x - p1.x)); } public static float randomPointBetween(float corner1, float corner2) { if (corner1 == corner2) { return corner1; } float delta = corner2 - corner1; float offset = Calculations.getRandom().nextFloat() * delta; return corner1 + offset; } public Point randomPoint(Point p1, Point p2) { int randomX = (int) randomPointBetween(p1.x, p2.x); int randomY = (int) randomPointBetween(p1.y, p2.y); return new Point(randomX, randomY); } } Happy botting!
    14. What version? Is it only swordfishes in the pile? If not, is a swordfish on the top of the pile? You can most likely thank the 25+ bots looting daily. It's becoming a highly botted area so people have caught on and are reporting accounts. User reports seem to almost guarantee that you get banned. For now do everything in your power to not seem like a bot and use this script wisely. Babysit it if you're worried.
    15. 1) Yeah it's something I've noticed and am not sure why it does that. I only call toggleRun at one spot and there's a distance requirement for it to turn on running, must be within 50 tiles of the Wildy. It is set it turn it off otherwise but it will turn it off and then on again. I'm guessing it's a bug with the walk API as it only started a few builds ago. It's noted and being worked on. 2) 5 gp shouldn't lure the bot unless there are no other ground items around but I will make it more aggressive against going over there 3) Being improved but if a skeleton did kill you the bot should easily find the gravestone, so consolation for now. 4) Yes but you'll die faster and be banned very quickly. I've tested it in earlier versions which is why I didn't include it as an option but can add it in. 5) Doesn't idle if it detects a gravestone indicator on screen, its max sleep rate at that time is 1s when dead or banking. 6) Pretty much every common food item is supported and it will withdraw and eat when needed. private String[] food = new String[]{"Lobster", "Salmon", "Tuna", "Swordfish", "Anchovy pizza", "Meat pizza", "Plain pizza", "1/2 anchovy pizza", "1/2 meat pizza", "1/2 plain pizza", "Chocolate cake", "Cake", "Pike", "Trout", "Cooked meat", "Herring", "Shrimps", "Anchovies"}; 7) In what sense or to what gain? Right now it's not just clicking on items on the map, it's also looking for players in combat and approaching them to take their loot. If no players nearby are in combat it will walk to ground items on the map that aren't item spawns. 8. Are you on top of the pile when it's slow or still far away? It won't spam it unless it can get the item otherwise you're just screwing yourself out of the chance of loot by spamming. Otherwise if it's on a pile it speeds up greatly. If it's right clicking a lot it's probably because the target item is no longer available even though you see it in the list. I will see about improving it to click an alternate menu option. 9) It is but I'm not sure what are you getting at? It handles graves quite well in my experience, I've only had it fail to retrieve one grave. It might move around a bit before it actually finds it but it almost always does. Have you lost a few graves? 10) Sure, easy enough. You're welcome but how is it breaking? That would be pretty helpful to know so I could fix the issues you're having. What version are you running? What settings are you using? What issues have you run into? Not sure what you're talking about, do you mean it's failing to pick up items if the UI is hidden? What's the left click pickup "hidden" option? If the script is breaking please post your debug console so I can see the error.
    16. Shit. Got a screenshot of the console? This doesn't make sense lol.
    17. Minor Release! v0.994 ####### DOWNLOAD VERSION 0.994 ####### New: Chaotic handegg handler - removes chaotic handeggs when equipped and attempts to handoff to another player. (Semi tested) Improved: onPaint - Tweaks to colours and how it's displayed Fixed: Bug with sleeping after safing Untested: Tweaks to walk paths to prevent getting stuck between two different paths. I haven't been able to recreate the bug @PhilBox ran into but I made some changes to hopefully prevent it from happening again.
    18. Copy copy. Thank you, that's very helpful. I believe I have resolved those issues but I don't have the time to test it right now so expect an update in a bit.
    19. Shit, man. I hope things on an uptick for you and that you're doing alright. That's pretty heavy to deal with, especially in these times. If I can help in any other way, let me know @BLSDJ I'm glad my script can offer some sort of help at least. Noted, thank you. I will investigate this. Does it happen often, preventing the script from running properly or just the one time so far? This is an odd bug, that's just a sleep() call so it should resume after however much time it says in the log. I'll try to break it and see if I can get to the core of it. Would you mind including a shot of the debug console if this happens again (maybe of the error tab as well), it would be very helpful here.
    20. Hah well I feel like that's to be expected after 21+ hours but still yeah damn! I would love to see some more proggies or loot lists from you guys, I'm very curious how it's working for people. @PhilBox @BLSDJ
    21. That's impressive! I think that's the longest runtime I've seen yet. Here's hoping that your haul increases.
    22. Minor Release! v0.993 ####### DOWNLOAD 0.993 ####### Fixed: Another banking issue, no longer gets stuck at the ditch. I uncommented something I shouldn't have and it took me forever to realize. On a cursory look-over it all seemed like it should work, my bad! Here's a fix.
    23. Minor Release! v0.992 ####### DOWNLOAD 0.922 ####### New: Click the "Loot" button to hide the on screen loot log Fixed: Banking issues, may be just API related but have written my own methods as a quick fix. Fixed: Randomized walk paths are less likely to get you lost Fixed: Saving issue with preferred world Changed: Tweaked some paint colours to less harsh on your eyes. Hmm. This should fix it I hope. I haven't seen that issue occur again, can you confirm that was on version 0.991? Negative food shouldn't be a concern since you could have eaten it or lost it on death but the negative total is an issue for sure.
    24. Noted! I'll put up an update later today. I guess my random paths have gotten too random lol, I'll dial them back a bit.
    ×
    ×
    • 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.