Shudsy Posted May 12, 2017 Share Posted May 12, 2017 package infinitewalker; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.Color; import java.awt.Graphics2D; @ScriptManifest(author = "Shudsy", info = "Walks", name = "Shudsy's InfiniteWalker", version = 2, logo = "") public class infinite extends Script { private long timeBegan; private long timeRan; public Area Runescape = new Area(2297, 3918, 3442, 2957); @Override public void onStart() throws InterruptedException { timeBegan = System.currentTimeMillis(); } @Override public int onLoop() throws InterruptedException { if (!myPlayer().isMoving()) { getWalking().webWalk(Runescape.getRandomPosition()); } return 100; } @Override public void onExit() { log("hello"); } @Override public void onPaint(Graphics2D g) { timeRan = System.currentTimeMillis() - timeBegan; g.setColor(Color.GREEN); g.drawString("Timeran: " + ft(timeRan), 20, 230); } private String ft(long ms){ long s = ms / 1000, m = s / 60, h = m / 60, d = h / 24; s %= 60; m %= 60; h %= 24; return d > 0 ? String.format("%02d:%02d:%02d:%02d", d, h, m, s) : h > 0 ? String.format("%02d:%02d:%02d", h, m, s) : String.format("%02d:%02d", m, s); } } Decided to release this for free. enjoy 1 Quote Link to comment Share on other sites More sharing options...
Turkoize Posted May 12, 2017 Share Posted May 12, 2017 nice try with ur keylogger Quote Link to comment Share on other sites More sharing options...
Shudsy Posted May 12, 2017 Author Share Posted May 12, 2017 Just now, turkoize said: nice try with ur keylogger oh shit Quote Link to comment Share on other sites More sharing options...
Saiyan Posted May 12, 2017 Share Posted May 12, 2017 public Area Runescape = new Area(2297, 3918, 3442, 2957); Runescape Runescape Runescape feelsbadman Quote Link to comment Share on other sites More sharing options...
Shudsy Posted May 12, 2017 Author Share Posted May 12, 2017 2 minutes ago, Saiyan said: public Area Runescape = new Area(2297, 3918, 3442, 2957); Runescape Runescape Runescape feelsbadman should of named it RuNesCaPe Quote Link to comment Share on other sites More sharing options...
LoudPacks Posted May 12, 2017 Share Posted May 12, 2017 What if it walks me into the ghetto part of draynor and I get robbed? Quote Link to comment Share on other sites More sharing options...
Shudsy Posted May 12, 2017 Author Share Posted May 12, 2017 inb4 i get roasted by @Explv for bad code 1 Quote Link to comment Share on other sites More sharing options...
Explv Posted May 12, 2017 Share Posted May 12, 2017 (edited) 10 minutes ago, Shudsy said: inb4 i get roasted by @Explv for bad code The timeRan variable should be local to the onPaint function. The Runescape area should be private, final, and start with a lowercase first letter, as per standard Java conventions. There should be a new line in between each method for better readability. The class should start with an uppercase first letter, as per standard Java conventions. Version number is 2, is this really version 2 though? info and logo in the @ScriptManifest attribute are severely lacking. You don't need to check that your player isn't moving before calling web walk. The indentation is completely fucked in some places. onExit method is unnecessary, and definitely misleading as it prints "Hello" to the logger when the script is in fact exiting. The methods and class should be final just in case someone in Lumbridge tries to override them. Do you really need to sleep for 100ms in between loops, when all you are doing is calling getWalking().webWalk()? Otherwise, good job! Edited May 12, 2017 by Explv 3 Quote Link to comment Share on other sites More sharing options...
Shudsy Posted May 12, 2017 Author Share Posted May 12, 2017 6 minutes ago, Explv said: The timeRan variable should be local to the onPaint function. The Runescape area should be private, final, and start with a lowercase first letter, as per standard Java conventions. There should be a new line in between each method for better readability. The class should start with an uppercase first letter, as per standard Java conventions. Version number is 2, is this really version 2 though? info and logo in the @ScriptManifest attribute are severely lacking. You don't need to check that your player isn't moving before calling web walk. The indentation is completely fucked in some places. onExit method is unnecessary, and definitely misleading as it prints "Hello" to the logger when the script is in fact exiting. The methods and class should be final just in case someone in Lumbridge tries to override them. Do you really need to sleep for 100ms in between loops, when all you are doing is calling getWalking().webWalk()? Otherwise, good job! pls package infinitewalker; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.Color; import java.awt.Graphics2D; @ScriptManifest(author = "Shudsy", info = "Walks all around runescape and does not stop!", name = "Shudsy's InfiniteWalker", version = 1, logo = "") public class Infinite extends Script { private long timeBegan; final public Area runescape = new Area(2297, 3918, 3442, 2957); @Override public void onStart() throws InterruptedException { timeBegan = System.currentTimeMillis(); } @Override public int onLoop() throws InterruptedException { { getWalking().webWalk(runescape.getRandomPosition()); } return 0; } @Override public void onPaint(Graphics2D g) { long timeRan = System.currentTimeMillis() - timeBegan; g.setColor(Color.GREEN); g.drawString("Timeran: " + ft(timeRan), 20, 230); } private String ft(long ms){ long s = ms / 1000, m = s / 60, h = m / 60, d = h / 24; s %= 60; m %= 60; h %= 24; return d > 0 ? String.format("%02d:%02d:%02d:%02d", d, h, m, s) : h > 0 ? String.format("%02d:%02d:%02d", h, m, s) : String.format("%02d:%02d", m, s); } } Quote Link to comment Share on other sites More sharing options...
Explv Posted May 12, 2017 Share Posted May 12, 2017 Just now, Shudsy said: pls package infinitewalker; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.Color; import java.awt.Graphics2D; @ScriptManifest(author = "Shudsy", info = "Walks all around runescape and does not stop!", name = "Shudsy's InfiniteWalker", version = 1, logo = "") public class Infinite extends Script { private long timeBegan; final public Area runescape = new Area(2297, 3918, 3442, 2957); @Override public void onStart() throws InterruptedException { timeBegan = System.currentTimeMillis(); } @Override public int onLoop() throws InterruptedException { { getWalking().webWalk(runescape.getRandomPosition()); } return 0; } @Override public void onPaint(Graphics2D g) { long timeRan = System.currentTimeMillis() - timeBegan; g.setColor(Color.GREEN); g.drawString("Timeran: " + ft(timeRan), 20, 230); } private String ft(long ms){ long s = ms / 1000, m = s / 60, h = m / 60, d = h / 24; s %= 60; m %= 60; h %= 24; return d > 0 ? String.format("%02d:%02d:%02d:%02d", d, h, m, s) : h > 0 ? String.format("%02d:%02d:%02d", h, m, s) : String.format("%02d:%02d", m, s); } } You disgust me 1 Quote Link to comment Share on other sites More sharing options...
Shudsy Posted May 12, 2017 Author Share Posted May 12, 2017 1 minute ago, Explv said: You disgust me they hate us cuz they aint us Quote Link to comment Share on other sites More sharing options...