Zoe 7 Share Posted May 23, 2018 HeatMap Plugin 1.0 About This Plugin: Adds a simple paint overlay of the mouse-heatmap.csv that is generated by the client whilst botting. Useful for checking how human-like your bot clicks are. This also saves the heatmap as a PNG file in the same file directory as your DBLauncher. Please excuse the sloppiness x) Changelog: 1.0 Initial release. Download Link: https://www.dropbox.com/s/vqj9g5h8y20dkly/HeatMap.jar?dl=0 Source: HeatMap.java package zoe.dreambot.plugin; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.File; import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.imageio.ImageIO; import org.dreambot.api.plugin.Plugin; import org.dreambot.api.plugin.PluginManifest; @PluginManifest(author = "Zoe", name = "HeatMap", version = 1.0) public class HeatMap extends Plugin { String filepath = System.getProperty("user.home") + "/DreamBot/mouse-heatmap.csv"; BufferedImage i; int screenWidth = 765; int screenHeight = 503; int max; int rectDiameter = 2; int amplification = 100; boolean paintOnce = true; int counts[][] = new int[screenWidth][screenHeight]; Scanner scanner = null; public void onStart() { try { scanner = new Scanner(new File(filepath)); } catch (Exception e) { } Pattern p = Pattern.compile("(\\d+),(\\d+)"); do { if (!scanner.hasNext()) break; String line = scanner.next(); Matcher m = p.matcher(line); if (m.matches()) { int x = Integer.parseInt(m.group(1)); int y = Integer.parseInt(m.group(2)); if (x < screenWidth && y < screenHeight) counts[x][y]++; else { } } } while (true); max = 0; for (int x = 0; x < screenWidth; x++) { for (int y = 0; y < screenHeight; y++) { int curCount = counts[x][y]; if (curCount > max) { max = curCount; } } } scanner.close(); i = new BufferedImage(screenWidth, screenHeight, 2); Graphics2D g = i.createGraphics(); //g.setColor(Color.DARK_GRAY); //g.fillRect(0, 0, screenWidth, screenHeight); for (int x = 0; x < screenWidth; x++) { for (int y = 0; y < screenHeight; y++) { int intensity = (int) ((double) (amplification * 255) * ((double) counts[x][y] / (double) max)); if (intensity > 255) intensity = 255; g.setColor(new Color(255, 100, 100, intensity)); g.fillRect(x - (rectDiameter - 1) / 2, y - (rectDiameter - 1) / 2, rectDiameter, rectDiameter); } } String outputFilename = "mouse-heatmap.png"; try { ImageIO.write(i, "PNG", new File(outputFilename)); } catch (Exception e) { } } public void onPaint(Graphics g) { g.drawImage(i, 0, 0, null); } } Link to comment Share on other sites More sharing options...
sadgonzer 46 Share Posted May 23, 2018 Thank you man ! Link to comment Share on other sites More sharing options...
Koschei 147 Share Posted May 23, 2018 Cool plugin! Tied with Nezz for plugins lol. Link to comment Share on other sites More sharing options...
lily 490 Share Posted May 23, 2018 Neat! Link to comment Share on other sites More sharing options...
Xephy 237 Share Posted May 23, 2018 Cool beanos Link to comment Share on other sites More sharing options...
michaelp43380 1 Share Posted March 5, 2019 where do i install this Link to comment Share on other sites More sharing options...
kamilo 7 Share Posted September 14, 2020 how does this work Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.