Temsei Posted January 9, 2017 Share Posted January 9, 2017 (edited) Pretty straightforward, buys bone bolt packs at the Dorgesh-kaan mines, unpacks them and hops when shop runs out of stock. Needed it for myself and thought might as well release it in case anyone else ever needs it. Download jar: https://drive.google.com/open?id=0B5zfq4J918uyZHc1YTJMWEM3QUU Source: import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.ui.Message; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "Temsei", info = "Bone Bolt Buyer", name = "Bone Pack Buyer", version = 0, logo = "") public class Buyer extends Script { @[member='Override'] public void onStart() { } private enum State { BUY, UNPACK, WAIT }; private State getState() { if (!inventory.isFull()) return State.BUY; if (inventory.isFull()) return State.UNPACK; return State.WAIT; } public void buyBolts() throws InterruptedException { NPC npc = npcs.closest("Nardok"); if (!inventory.isFull() && npc != null){ npc.interact("Trade"); new ConditionalSleep(3000) { @[member='Override'] public boolean condition() { return store.isOpen(); } }.sleep(); if (store.isOpen()) { while (store.getAmount("Bone bolt pack") > 0 && !inventory.isFull()) { store.buy("Bone bolt pack", 10); } if (store.isOpen()) store.close(); } } } public void unpackBolts() throws InterruptedException { while (inventory.getAmount("Bone bolt pack") > 0) { inventory.getItem("Bone bolt pack").interact("Open"); } } public void onMessage(Message message) throws java.lang.InterruptedException { String txt = message.getMessage().toLowerCase(); if (txt.contains("stock")) { worlds.hopToP2PWorld(); } } @[member='Override'] public int onLoop() throws InterruptedException { switch (getState()) { case BUY: buyBolts(); break; case UNPACK: unpackBolts(); break; default: break; } return random(200, 300); } } Edited January 10, 2017 by Temsei 5 Quote Link to comment Share on other sites More sharing options...
Chris Posted January 9, 2017 Share Posted January 9, 2017 nice work bro 1 Quote Link to comment Share on other sites More sharing options...
Sysm Posted January 9, 2017 Share Posted January 9, 2017 Clean, nice release 1 Quote Link to comment Share on other sites More sharing options...
Oresus Posted January 9, 2017 Share Posted January 9, 2017 Nice looks good 1 Quote Link to comment Share on other sites More sharing options...
idential Posted January 9, 2017 Share Posted January 9, 2017 looks nice man. any idea how much gp/h? Quote Link to comment Share on other sites More sharing options...
Temsei Posted January 9, 2017 Author Share Posted January 9, 2017 (edited) looks nice man. any idea how much gp/h? If you're asking about profit, you don't make any. It's only useful for iron men or if you need to buy more bone bolts than GE buy limits can get you. Don't know how many it buys per hour, sorry. Edited January 9, 2017 by Temsei Quote Link to comment Share on other sites More sharing options...
jjjonttu Posted January 10, 2017 Share Posted January 10, 2017 pre-gz on cool release 1 Quote Link to comment Share on other sites More sharing options...
the bad doc Posted January 10, 2017 Share Posted January 10, 2017 gl on release Pretty straightforward, buys bone bolt packs at the Dorgesh-kaan mines, unpacks them and hops when shop runs out of stock. Needed it for myself and thought might as well release it in case anyone else ever needs it. Download jar: https://drive.google.com/open?id=0B5zfq4J918uyZHc1YTJMWEM3QUU Source: import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.ui.Message; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; @ScriptManifest(author = "Temsei", info = "Bone Bolt Buyer", name = "Bone Pack Buyer", version = 0, logo = "") public class Buyer extends Script { @[member='Override'] public void onStart() { } private enum State { BUY, UNPACK, WAIT }; private State getState() { if (!inventory.isFull()) return State.BUY; if (inventory.isFull()) return State.UNPACK; return State.WAIT; } public void buyBolts() throws InterruptedException { NPC npc = npcs.closest("Nardok"); if (!inventory.isFull() && npc != null){ npc.interact("Trade"); new ConditionalSleep(3000) { @[member='Override'] public boolean condition() { return store.isOpen(); } }.sleep(); if (store.isOpen()) { while (store.getAmount("Bone bolt pack") > 0 && !inventory.isFull()) { store.buy("Bone bolt pack", 10); } if (store.isOpen()) store.close(); } } } public void unpackBolts() throws InterruptedException { while (inventory.getAmount("Bone bolt pack") > 0) { inventory.getItem("Bone bolt pack").interact("Open"); } } public void onMessage(Message message) throws java.lang.InterruptedException { String txt = message.getMessage().toLowerCase(); if (txt.contains("stock")) { worlds.hopToP2PWorld(); } } @[member='Override'] public int onLoop() throws InterruptedException { switch (getState()) { case BUY: buyBolts(); break; case UNPACK: unpackBolts(); break; default: break; } return random(200, 300); } } Quote Link to comment Share on other sites More sharing options...