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

    Reputation Activity

    1. Like
      holic got a reaction from GingerBread in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      Thanks for the info, forgot to include extra improvements in this most recent update so there will be another one soon.
    2. Thonking
      holic got a reaction from Sikovit in Walkaholic - Map walker - Walk almost anywhere in Gielinor - Now with improved accuracy!   
      If you keep starting and stopping the script, it will hang and not open. I'm working on a fix for it.
      If it's not opening at all give it more memory.
    3. Like
      holic got a reaction from GingerBread in Walkaholic - Map walker - Walk almost anywhere in Gielinor - Now with improved accuracy!   
      If you keep starting and stopping the script, it will hang and not open. I'm working on a fix for it.
      If it's not opening at all give it more memory.
    4. Like
      holic got a reaction from Drumvez in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      Thanks guys for kind words and suggestions. It actually already has a tolerance range built in so no need to worry there. I use percentage so you can easily switch it between characters. If you put 30% it might eat between 25-35 or so. 
      In fact, almost every setting you can set a number for has a tolerance range built in so things don't happen immediately like a bot, hopefully giving you guys longer runs!
    5. Like
      holic got a reaction from GingerBread in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      Thanks guys for kind words and suggestions. It actually already has a tolerance range built in so no need to worry there. I use percentage so you can easily switch it between characters. If you put 30% it might eat between 25-35 or so. 
      In fact, almost every setting you can set a number for has a tolerance range built in so things don't happen immediately like a bot, hopefully giving you guys longer runs!
    6. Like
      holic reacted to GingerBread in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      I appreciate the speedy response. It was apparently the client that particular evening, none of my scripts were functioning properly. I apologize for the confusion, your script is 100%, thanks again!
    7. Like
      holic got a reaction from Bruhuh in DrawMouseUtil - Draw mouse trails and custom cursors   
      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!
    8. Like
      holic got a reaction from apnasus in Walkaholic - Map walker - Walk almost anywhere in Gielinor - Now with improved accuracy!   
      Walkaholic - Walk almost anywhere in Gielinor


      [add script]
      Description
      This is a very simple automated walking script but the big difference is there are no preset locations, you decide where to go and go basically anywhere! Simply select your desired location on the pop-out map and watch your player navigate across the world Gielinor.
      Features
      Teleporting: almost every kind of teleporting is now supported thanks to DaxWalker and @LostVirt as mine was far from complete Shift-click to start: you can automatically start walking to a destination by holding down shift while selecting a location from the "Jump to" menu Checks the map: opens the world map like a human would to figure out where to go"(i.e. human-like reading the map) Dungeon handling: Supports Edgeville, Asgarnian, etc. although the map doesn't show dungeons...yet View WebNodes: check all webnodes at once as you browse the map Anti-ban: general anti-ban while walking Smart obstacle handling: most common uncommon obstacles added to WebWalker (e.g. Large door, Web, etc) Wilderness handling: can cross the ditch in or out of the wilderness Snap to player: follows the player on the pop-out map as they move Center on player: jumps the pop-out map to the player's current location Logout on arrival: logs out once destination is reached Quick-locations: jumps the pop-out map to the selected location Will add more locations on request Troubleshooting
      Stuck at "Loading map...": Use at least 512MB of RAM GUI
      As of version 0.12
       

      Coming Soon
      Automatic eating for dangerous zones Zooming map Dungeon maps Second level maps Known Bugs
      Map image fails to load if you start and stop the script 4+ times currently Increase the amount of memory DB uses to prevent this. It happens because Java runs out of memory. "Snap to Player" doesn't always change values  
      Bug Reports
      To submit a bug report, please:
      Ensure you're on the latest version first Explain your problem as clearly and concise as possible



    9. Like
      holic reacted to romanaka3 in Alclueholic - A beginner clue scroll solver - Re-written!   
      Love this scipt
      Just in 1 day got 2 parrots
    10. Like
      holic reacted to ChaosKilla in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      I've used this about 5 times on the same character this week. Still works great, and no ban.
    11. Like
      holic got a reaction from learntobot123 in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      Major Update - v0.999
      Added prayers: needs improvement and to add the ability to setup quick prayer Added potions: don't include the number of doses ("Strength potion", not "Strength potion(4)"), won't use Prayer potions until your prayer is almost drained Added required items: these items will be retrieved if missing, unlike its neighbouring "Don't deposit" Improved rune handling: now withdraws the required amount per rune type per spell (Air rune x3, Fire rune x2, Mind rune x1) Improved banking Improved safe-spotting Improved general speed Reverted kill counter to estimate Probably more, busy past few weeks Bug fixes
    12. Like
      holic got a reaction from beatyersocks in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      Major Update - v0.999
      Added prayers: needs improvement and to add the ability to setup quick prayer Added potions: don't include the number of doses ("Strength potion", not "Strength potion(4)"), won't use Prayer potions until your prayer is almost drained Added required items: these items will be retrieved if missing, unlike its neighbouring "Don't deposit" Improved rune handling: now withdraws the required amount per rune type per spell (Air rune x3, Fire rune x2, Mind rune x1) Improved banking Improved safe-spotting Improved general speed Reverted kill counter to estimate Probably more, busy past few weeks Bug fixes
    13. Like
      holic got a reaction from romanaka3 in Alclueholic - A beginner clue scroll solver - Re-written!   
      Noted, I'll fix this next week.
    14. Like
      holic reacted to beatyersocks in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      Didn't see the console at that time, sorry about that 😕 Will let send you a screenshot when I encounter that again. Cheers!  
    15. Upvote
      holic reacted to floggun in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      Script does not cut the web in the Varrock sewer. 
    16. Upvote
      holic reacted to peregrinesava in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      https://gyazo.com/5f7b95b66b293e90a6e79345c741d5dc
      got an error, nothing happened though script continued on
    17. Upvote
      holic reacted to mefikk in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      U set it to eat but at 10%, not 10 health, maybe thats the problem?
    18. Like
      holic reacted to mefikk in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      Great script! I was shocked it auto equipped arrows again, really love it
    19. Like
      holic got a reaction from Hawz in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      It'll do that automatically, no need to do anything.
    20. Like
      holic reacted to BagelChef in Behavior Trees For Dummies - Basic Woodcutting Script   
      Behavior Trees For Dummies
      I'm not a pro at anything and take everything I say with a grain of salt. I have no idea what i'm doing and my opinions here are mostly preference. Make your own decisions, disagree with me, tell me why, and lets make better bots. Also, can't take credit for the idea of behavior trees in bots. I read @jgs95's post about them a week ago.
      Introduction
      The most popular type of scripts I have found during my time scripting is the `Node` based system. Node based systems split up their code into sections called Nodes (duh). Each Node is comprised of a condition that checks whether or not the node should run, and a action to perform if the condition passes. If you don't yet know about Node based systems I highly suggest checking out This post. You should know about other methodologies of bot scripting so you can weigh the pros and cons of both for yourself.
      Code That A Computer Can Read Is Useless.
      At a very high level Behavior Trees are used to handle triggering actions based on conditions. Sound a lot like the Node system mentioned earlier? Both methodologies are just ways to handle triggering actions based on conditions. That's what most if not all bots do. So why choose Behavior Trees? There are two things that need to be able to understand your code. The computer, and humans (yourself included). Writing code that the computer understands is easy. Take a look at the following JavaScript code.
      var _0x49e6=['1JEFwRC','5222dXsJWJ','92FVLqzU','1365284gtsOMo','1614886gtbOhP','3648908RUJhLp','Hello\x20World!','74944THxNfO','412769AyhqCE','log','1402906gnphcE'];(function(_0xf7574b,_0x59a0fa){var _0x3a1092=_0x3bf3;while(!![]){try{var _0x2ce5f6=parseInt(_0x3a1092(0x182))+parseInt(_0x3a1092(0x185))*parseInt(_0x3a1092(0x184))+parseInt(_0x3a1092(0x17f))+parseInt(_0x3a1092(0x186))+-parseInt(_0x3a1092(0x183))*parseInt(_0x3a1092(0x180))+parseInt(_0x3a1092(0x187))+-parseInt(_0x3a1092(0x17d));if(_0x2ce5f6===_0x59a0fa)break;else _0xf7574b['push'](_0xf7574b['shift']());}catch(_0x46c630){_0xf7574b['push'](_0xf7574b['shift']());}}}(_0x49e6,0xd60df));function hi(){var _0x221f00=_0x3bf3;console[_0x221f00(0x181)](_0x221f00(0x17e));}function _0x3bf3(_0x3c1132,_0x58570b){_0x3c1132=_0x3c1132-0x17d;var _0x49e678=_0x49e6[_0x3c1132];return _0x49e678;}hi(); This runs. The computer is absolutely fine with this. But what about the poor sap that has to maintain this code? Or what if you need to go back and change something. I guarantee if you even step away to shit after writing this you will comeback and have no fucking idea what this does and probably blame someone else for writing it insisting they are an idiot and should be killed immediately (personal experience). This is why coding for humans is more important that coding for the computers. Take a look at the following code that does the exact same thing as the above example.
      function helloWorld() { console.log("Hello World!"); } Tell me that doesn't make one thousand times more sense than the other example. Clean, readable code is the backbone of a good program. How fast, or efficient it is should be the second thing you think about. You can always go back and optimize. It's much harder to go back and make it understandable. If the topic of clean code has given you a boner/wet vagina I highly suggest reading Clean Code by Robert C. Martin. Now that we understand that we should prioritize writing code that humans can understand we can start looking at why we should choose Behavior Trees over everything else.
      Why Choose Behavior Trees Over Everything Else?
      Lets take a look at a node based wood chopper main script class. This is based off of This really great tutorial on the Node system by @GoldenGates. Great read, go read it if you aren't that solid with the node system yet.
      public class WoodChopper extends AbstractScript { private final Node[] array = new Node[] { new WalkToTrees(this), new ChopWood(this), new WalkToBank(this), new OpenBank(this), new DepositLogs(this) }; @Override public int onLoop() { for (final Node node : array) if (node.activate()) { node.execute(); } return Calculations.random(250, 500); } } The main con I have for the Node based system is how it reads, reuse, and how you handle more complex conditions. Correctly naming your Node instances is a great start. but we are left wondering what conditions do these nodes run on. If we wanted to get a bit more flexible we could abstract out our conditions and actions using two new classes. a `Action` class and a `Condition` class. Then our main script class would look like this.
      public class WoodChopper extends AbstractScript { private final Node[] array = new Node[] { new Node(new ShouldMoveToTrees(), new WalkToTrees()), new Node(new ShouldChopWood(), new ChopWood()), new Node(new ShouldWalkToBank(), new WalkToBank()), new Node(new ShouldOpenBank(), new OpenBank()), new Node(new ShouldDepositLogs(), new DepositLogs()) }; @Override public int onLoop() { for (final Node node : array) if (node.activate()) { node.execute(); } return Calculations.random(250, 500); } } This is pretty good. The logic flow is pretty obvious and its clear what conditions trigger what actions, in what order. For a basic script id be happy with this assuming your conditions and actions names aren't complete trash. Lets pretend that we want to chop trees behind Lumbridge castle and there is that obnoxious asshole mugger back there that attacks us all the time. We need to add some combat nodes to our Node array. Lets take a look at what that might look like now.
      public class WoodChopper extends AbstractScript { private final Node[] array = new Node[] { new Node(new IsUnderAttackWithEnoughHealth(), new FightBack()), new Node(new IsUnderAttackWithoutEnoughHealthAndHasFood(), new Eat()), new Node(new IsUnderAttackWithoutEnoughHealthAndDoesNotHaveFood(), new RunAway()), new Node(new ShouldMoveToTrees(), new WalkToTrees()), new Node(new ShouldChopWood(), new ChopWood()), new Node(new ShouldWalkToBank(), new WalkToBank()), new Node(new ShouldOpenBank(), new OpenBank()), new Node(new ShouldDepositLogs(), new DepositLogs()) }; @Override public int onLoop() { for (final Node node : array) if (node.activate()) { node.execute(); } return Calculations.random(250, 500); } } We can see now that our conditions start to contain a lot of the same wording and logic. All of our combat nodes check to see if the player is under attack. Then we make a decision about the current health of our player. Then we make a decision on if we have food or not. It's as if each of these decisions are sub decisions. Sounds a whole lot like a tree to me. Now you could only have a `IsUnderAttack` condition and then have your other conditions inside the `FightBack` action but then we are hiding logic that someone might miss while also making it harder to dynamically add more behaviors, and also adding conditions to an action which goes against the name of "action". Actions should only be exactly what they are, actions. So what are we going to do about this? JESUS CHRIST GET TO BEHAVIOR TREES ALREADY YOU FUCK. Fine here we go.

      First off, Watch the following Videos if you have never heard of behavior trees or have no idea how they work.
      Data structures: Introduction to Trees - mycodeschool
      Introduction To Behavior Trees - Holistic3d
      What is a Behavior Tree and How do they work? (BT intro part 1) - Peter Ogren
      How to create Behavior Trees using Backward Chaining (BT intro part 2) - Peter Ogren
      Here is how we would create the same script with a behavior tree. After looking at this i'll go over why I think it is more readable/cleaner/flexible. 
      public class WoodChopper extends AbstractScript { Node bankTree = new TreeBuilder() .sequence() .oncePerSequenceCompletion() .condition(new PlayerShouldBank()) .finish() .oncePerSequenceCompletion() .action(new MoveToBank()) .finish() .action(new DepositLogs()) .finish() .buildTree(); Node chopTree = new TreeBuilder() .sequence() .oncePerSequenceCompletion() .action(new MoveToTrees()) .finish() .action(new ChopTree()) .condition(new PlayerShouldBank()) .finish() .buildTree(); Node tree = new TreeBuilder() .selector() .appendTree(bankTree) .appendTree(chopTree) .buildTree(); @Override public int onLoop() { tree.tick(); return Calculations.random(250, 500); } } Separation of Concerns
      Behavior trees let us split up our logic into small, clean, chunks of code that only have to do with what they are doing. We have a tree dedicated to handling banking, a tree dedicated to handling chopping wood, and a tree dedicated to putting other trees together.
      Readability
      The biggest advantage I think behavior trees have over the node system is that the code reads basically in plain English. If we look at the "chopTree" above and read line by line we fully understand what it is doing without having to go anywhere, look into any of the classes etc. To really drive my point home on this ill show you some pseudocode for the "chopTree" and you can compare it to the actual code above.
      To chop a tree we must do the following in sequence if we have not already moved to the tree location move to the location of the trees chop down a tree if we have more inventory room repeat this sequence Adaptability
      Finally, our ability to add to our bots behavior is incredibly easy. Lets add our combat behavior to our behavior tree like we did to the node based system. We just create our combat tree, and add it to our root tree. We don't care about anything else in the code base. Since we want to prioritize combat we make sure to put this tree earlier in our root sequence.
      Node combatTree = new TreeBuilder() .selector() .sequence() .condition(new HasMoreThanHalfHealth()) .action(new Retaliate()) .selector() .sequence() .condition(new HasFood()) .action(new EatFood()) .action(new RunAway()) .buildTree() Node root = new TreeBuilder() .selector() .appendTree(combatTree) .appendTree(bankTree) .appendTree(chopTree) .buildTree(); Small Conditions and Actions 
      Another lovely side effect of using a behavior tree over a node system is our conditions will only be checking a maximum of one thing. Remember earlier when we had the god awful "IsUnderAttackWithoutEnoughHealthAndDoesNotHaveFood" condition? Lots of code duplication, and not very reusable as it has been so tightly written to go along with the certain action it was originally meant to. Now look at our new conditions. "HasMoreThanHalfHealth", "HasFood", these conditions could be reused in other places, and also are way less prone to bugs as they are simpler.
      Code Sharing
      Another pro of re-usability/adaptability is how easy it makes it to share between multiple projects. Lets say you write an incredible combat tree that handles eating, switching styles, praying, running away, etc. All you gotta do is pull that hoe into your new bot and append it to your root tree. (you can do this with nodes too just want to plant brain seeds).
      Conclusion
      Library/Framework
      If any of these reasons for using behavior trees made sense to you and you agree with them you might be asking if there is a pre-made framework for behavior trees you can use, and there is, I wrote one. But your not getting it. Implementing it yourself will really drive home all the ideas and pitfalls of this structure. The videos I posted above should be a good enough starting point for figuring out how to write your own implementation. Try to resist just googling for implementations because they are out there. It will make you a better developer if you pain through this and just do it. You'll learn a lot.
      When to still use Node Systems
      Like I said earlier I think there is no perfect tool for every job. You just need to know the tools at your disposal and implement what you think is most appropriate. If your bot just walks from Lumbridge to Edgeville don't implement a whole ass behavior tree. The overhead would just be ridiculous. If your building a PVP bot that also banks, switches PVP load outs etc, a behavior tree is probably a better fit. Basically, behavior trees are great for handling bots that handle a lot of behaviors. If your bot doesn't meet this criteria it's probably fine just remember my rant about readable, clean code.
      Alright,
      Bye

       
    21. Like
      holic reacted to Icegiant48 in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      they are too small to type into
       
      im just stupid sorry man i maiximized the screen and can type it in
       
    22. Thonking
      holic reacted to letsbothard in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      6:38:52 PM: [ERROR] Exception has occurred while running! Please report error to developer if problem persists:
          java.lang.NullPointerException
          at k.execute(k.java:124)
          at org.dreambot.api.script.impl.TaskScript.onLoop(TaskScript.java)
          at org.dreambot.api.script.AbstractScript.run(AbstractScript.java)
          at java.lang.Thread.run(Unknown Source)
       
       
      not sure what it is, hope it can help you
    23. Like
      holic reacted to letsbothard in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      to be honest i can't get over how good this script is, i wanted to do a test to see the ban rate, well here was my results
      16h and still botting on an acc that was already disabled once.
      id have to give this a 15/10 lol, can't wait to test the b2p
       
    24. Like
      holic got a reaction from letsbothard in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added   
      Let me know if it has any bugs or even works at all lol. I couldn't test B2P but I think I got the logic all correct. If it's broken, please post the error!
    25. Like
    ×
    ×
    • 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.