May 12, 20178 yr 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
May 12, 20178 yr public Area Runescape = new Area(2297, 3918, 3442, 2957); Runescape Runescape Runescape feelsbadman
May 12, 20178 yr Author 2 minutes ago, Saiyan said: public Area Runescape = new Area(2297, 3918, 3442, 2957); Runescape Runescape Runescape feelsbadman should of named it RuNesCaPe
May 12, 20178 yr 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, 20178 yr by Explv
May 12, 20178 yr Author 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); } }
May 12, 20178 yr 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
Create an account or sign in to comment