June 12, 20178 yr Open AFK Splasher by Eliot What: It splashes autocast spells Moves mouse to prevent your character from not retaliating Logs back in and attacks NPC after being logged out by 6 hour timer How: Have at least -65 magic bonus & have an autocast spell selected Attack the NPC you wish to splash on (suggestion: spiders, chickens) Start script Why: Splashing requires very few interactions with the client, drastically decreasing the chance of being banned. Source: import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; @ScriptManifest(name = "Open AFK Splasher", author = "Eliot", version = 1.0, info = "", logo = "") public class Splasher extends Script { private long startTime; private String npcName = null; private String state = "Initializing"; private Font font = new Font("Arial", Font.BOLD, 14); /** * Formats time ran into a human readable String * @param time the time in ms to be converted * @return (Human readable) how long the script has been running */ public final String formatTime(final long time) { long s = time / 1000, m = s / 60, h = m / 60; s %= 60; m %= 60; h %= 24; return String.format("%02d:%02d:%02d", h, m, s); } @Override public void onStart() { startTime = System.currentTimeMillis(); getExperienceTracker().start(Skill.MAGIC); } @Override public int onLoop() throws InterruptedException { if (npcName == null && myPlayer().getInteracting() != null) { npcName = myPlayer().getInteracting().getName(); } else if (npcName != null && myPlayer().getInteracting() == null) { state = "Attacking " + npcName; NPC attack = getNpcs().closest(npc -> npc.getName().equals(npcName) && npc.getInteracting() == null); if (attack != null && attack.interact("Attack")) { new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isUnderAttack(); } }.sleep(); } } else if (npcName != null) { state = "Preventing AFK timer"; if (mouse.click(random(556, 730), random(220, 450), false)) { int randomTime = random(180000, 1080000); state = "Sleeping (for " + formatTime(randomTime) + ")"; new ConditionalSleep(randomTime) { @Override public boolean condition() throws InterruptedException { return myPlayer().getInteracting() == null; } }.sleep(); } } else { state = "YOU MUST ATTACK SOMETHING MANUALLY"; } return 100; } @Override public void onPaint(Graphics2D g) { Point mP = getMouse().getPosition(); long runTime = System.currentTimeMillis() - startTime; g.setColor(Color.white); g.setFont(font); g.drawLine(mP.x, 501, mP.x, 0); g.drawLine(0, mP.y, 764, mP.y); g.drawString("State: " + state, 10, 210); g.drawString("Target: " + (npcName == null ? "????" : npcName), 10, 230); g.drawString("XP Gained: "+ getExperienceTracker().getGainedXP(Skill.MAGIC), 10, 250); g.drawString("XP / HR: "+ getExperienceTracker().getGainedXPPerHour(Skill.MAGIC), 10, 270); g.drawString("Time to LVL: "+ formatTime(getExperienceTracker().getTimeToLevel(Skill.MAGIC)), 10, 290); g.drawString("Time Ran: "+ formatTime(runTime), 10, 310); } } I suggest compiling on your own, but if you'd rather download a jar click here. Credits: Some aspects of this script were taken from @Mumble's script: https://osbot.org/forum/topic/116394-mumbles-ez-afk-splasher/ Find a bug? Report it in this thread. Edited November 3, 20178 yr by Eliot
June 12, 20178 yr TFW I finally thought you released your alcher. But I'm probably gonna use this :P Thanks hombre.
June 12, 20178 yr Author 1 hour ago, Turkoize said: TFW I finally thought you released your alcher. But I'm probably gonna use this :P Thanks hombre. Hah, maybe someday. 1 hour ago, Botre said: 50 * new font / second fixed 1 hour ago, Mumble said: Great work, and thanks for giving me credit! (some people wouldn't) Np.
September 12, 20178 yr any chance you can update the download link or walk me through how to compile a jar?
September 23, 20178 yr Could you please reupload the JAR? Link is only for premium members now. Alternatively can you tell us how to compile ourselves?
Create an account or sign in to comment