June 22, 20169 yr I noticed there wasn't a working free crafting script and a friend needed to get to lvl 10, so I quick made this one. It'll go past lvl 10, but will continue to make Cowls at that point. For easy lvl 1-10, start with ~20 thread, 1 needle, and ~80 leather in bank (needle + thread can be in inventory). Let it run; it'll auto switch to next best thing to make once it hits the required level. DOWNLOAD HERE. (Unrar the contents into your scripts folder.) Here is also the source code, in case anyone wants to further develop it. 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.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; @ScriptManifest(author = "iManCity", name = "10 Crafting", info = "Gets you to 10 crafting in no time!", version = 0.1, logo = "") public class Crafter extends Script { private enum State { BANK, MAKE, LOGOUT } private long startTime; @Override public void onStart() { startTime = System.currentTimeMillis(); } private State getState() throws InterruptedException { if (((!getInventory().contains("Needle")) || (!getInventory().contains("Thread")) || (!getInventory().contains("Leather")))) { return State.BANK; } if (((getInventory().contains("Needle")) || (getInventory().contains("Thread")) || (getInventory().contains("Leather")))) { return State.MAKE; } return State.LOGOUT; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case BANK: if (!getBank().isOpen()) { getBank().open(); } if (getBank().isOpen()) { if (!getInventory().contains("Leather")) { getBank().depositAllExcept("Needle" , "Thread"); } if ((!getInventory().contains("Needle")) && (getBank().contains("Needle"))) { getBank().withdraw("Needle" , 1); } if ((!getInventory().contains("Thread")) && (getBank().contains("Thread"))) { getBank().withdrawAll("Thread"); } if ((!getInventory().contains("Leather")) && getBank().contains("Leather")) { getBank().withdrawAll("Leather"); } } else { sleep(random(300,500)); getLogoutTab().open(); sleep(random(75,150)); getLogoutTab().logOut(); stop(); } if ((getInventory().contains("Needle")) && (getInventory().contains("Leather")) && (getInventory().contains("Thread"))) { getBank().close(); } break; case MAKE: sleep(500); if (getSkills().getDynamic(Skill.CRAFTING) > 0 && getSkills().getDynamic(Skill.CRAFTING) < 7) { if (getInventory().contains("Needle") && getInventory().contains("Thread") && getInventory().contains("Leather")) { if (!getWidgets().isVisible(154, 92)) { if (getInventory().interact("Use", "Needle")) { if (getInventory().interact("Use", "Leather")) { new org.osbot.rs07.utility.ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getWidgets().isVisible(154, 92); } }.sleep(); } } } else { if (getWidgets().interact(154, 92, "Make All pairs of Gloves")) { new ConditionalSleep(20000) { @Override public boolean condition() throws InterruptedException { return !getInventory().contains("Leather") || getDialogues().isPendingContinuation(); } }.sleep(); } } } } if (getSkills().getDynamic(Skill.CRAFTING) > 6 && getSkills().getDynamic(Skill.CRAFTING) < 9) { if (getInventory().contains("Needle") && getInventory().contains("Thread") && getInventory().contains("Leather")) { if (!getWidgets().isVisible(154, 95)) { if (getInventory().interact("Use", "Needle")) { if (getInventory().interact("Use", "Leather")) { new org.osbot.rs07.utility.ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getWidgets().isVisible(154, 95); } }.sleep(); } } } else { if (getWidgets().interact(154, 95, "Make All pairs of Leather boots")) { new ConditionalSleep(20000) { @Override public boolean condition() throws InterruptedException { return !getInventory().contains("Leather") || getDialogues().isPendingContinuation(); } }.sleep(); } } } } if (getSkills().getDynamic(Skill.CRAFTING) > 8) { if (getInventory().contains("Needle") && getInventory().contains("Thread") && getInventory().contains("Leather")) { if (!getWidgets().isVisible(154, 107)) { if (getInventory().interact("Use", "Needle")) { if (getInventory().interact("Use", "Leather")) { new org.osbot.rs07.utility.ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getWidgets().isVisible(154, 107); } }.sleep(); } } } else { if (getWidgets().interact(154, 107, "Make All Cowls")) { new ConditionalSleep(20000) { @Override public boolean condition() throws InterruptedException { return !getInventory().contains("Leather") || getDialogues().isPendingContinuation(); } }.sleep(); } } } } break; case LOGOUT: log("Logging out"); sleep(random(300,500)); getLogoutTab().open(); sleep(random(75,150)); getLogoutTab().logOut(); stop(); break; } return random(200, 300); } @Override public void onPaint(final Graphics2D g) { Font font1 = new Font("Sans-Serif", Font.PLAIN, 17); g.setFont(font1); g.setColor(Color.WHITE); g.drawString("" + formatTime(System.currentTimeMillis() - startTime), 150, 284); } // Converts ms to a timestamp private String formatTime(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); } // Converts a value to m or k private String formatValue(long v) { return (v > 1_000_000) ? String.format("%.2fm", (double) (v / 1_000_000)) : (v > 1000) ? String.format("%.1fk", (double) (v / 1000)) : v + ""; } @Override public void onExit() { } } Edited June 22, 20169 yr by imancity
June 22, 20169 yr Author Why do you not compile your scripts into a .jar? Honestly, I'm not sure how to in IntelliJ. I've tried following a tutorial but for some reason it doesn't let me since I have OSBots API thing attached. I may be doing something wrong :P
June 23, 20169 yr Honestly, I'm not sure how to in IntelliJ. I've tried following a tutorial but for some reason it doesn't let me since I have OSBots API thing attached. I may be doing something wrong :P
June 23, 20169 yr Author Honestly, I'm not sure how to in IntelliJ. I've tried following a tutorial but for some reason it doesn't let me since I have OSBots API thing attached. I may be doing something wrong :P Thanks!! Will do that from now on