Oboyabot Posted October 25, 2020 Share Posted October 25, 2020 Is there a script just to fill jugs with water? I cant find it in cooking. Would definitely pay for that script. Thanks Quote Link to comment Share on other sites More sharing options...
Wisply Posted October 25, 2020 Share Posted October 25, 2020 https://osbot.org/forum/forum/334-private-scripts/ Quote Link to comment Share on other sites More sharing options...
Gunman Posted October 25, 2020 Share Posted October 25, 2020 There use to be but it broke. Also I believe that will be listed in either other or moneymaking. Quote Link to comment Share on other sites More sharing options...
ExtraBotz Posted October 25, 2020 Share Posted October 25, 2020 22 hours ago, Oboyabot said: Is there a script just to fill jugs with water? I cant find it in cooking. Would definitely pay for that script. Thanks I could make this for you if you're interested in a private script. Add me on Discord: Brandon#9592 ID: 257025090401599505 Quote Link to comment Share on other sites More sharing options...
ProjectPact Posted October 26, 2020 Share Posted October 26, 2020 You could make this in Script Factory in less than 30 seconds 1 Quote Link to comment Share on other sites More sharing options...
Lol_marcus Posted October 26, 2020 Share Posted October 26, 2020 (edited) Here you go. [SPOILER] package core; import java.awt.Graphics2D; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; 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; @ScriptManifest(name = "Jug Filler", version = 1.1, author = "Marcus", logo = "", info = "Fills jugs in falador") public class Main extends Script { private final Area waterPump = new Area(2949, 3382, 2950, 3383); private long startTime = System.currentTimeMillis(); @Override public void onStart() throws InterruptedException { } @Override public int onLoop() throws InterruptedException { if (hasJugs()) { walkPump(); if (hasPump()) { fillJugs(); } } else { if (!hasJugs()) ; { bank(); } } return 700; } public boolean hasJugs() { return (getInventory().contains("Jug") && (getInventory().isFull())); } public boolean hasPump() { RS2Object pump = getObjects().closest("Waterpump"); return (pump != null && pump.isVisible()); } private void bank() throws InterruptedException { if (!Banks.FALADOR_WEST.contains(myPosition())) { getWalking().webWalk(Banks.FALADOR_WEST); } else if (Banks.FALADOR_WEST != null && (!getBank().isOpen())) { getBank().open(); } else if (!getInventory().isEmptyExcept("Jug")) { getBank().depositAllExcept("Jug"); } else if (getBank().contains("Jug")) { getBank().withdrawAll("Jug"); sleep(random(50, 150)); getBank().close(); sleep(random(50, 150)); new ConditionalSleep(2000, 600) { @Override public boolean condition() { return ((!getBank().isOpen()) && (inventory.getAmount("Jug") == 28)); } }.sleep(); } else { stop(false); } } public void fillJugs() throws InterruptedException { RS2Object waterPump = getObjects().closest("Waterpump"); if ((!myPlayer().isAnimating()) && waterPump != null) { if (!getInventory().isItemSelected()) { getInventory().getItem("Jug").interact("Use"); sleep(random(100, 250)); waterPump.interact("Use"); sleep(random(100, 200)); getMouse().moveOutsideScreen(); sleep(random(1000, 1500)); } new ConditionalSleep(20000, 600) { @Override public boolean condition() { return ((!myPlayer().isAnimating()) && (waterPump != null)); } }.sleep(); } } private void walkPump() throws InterruptedException { if (getInventory().isFull() && getInventory().contains("Jug")) { getWalking().walk(waterPump); sleep(random(50, 105)); new ConditionalSleep(20000, 600) { @Override public boolean condition() { return (waterPump.contains(myPosition())); } }.sleep(); } else { stop(false); } } @Override public void onPaint(Graphics2D g) { super.onPaint(g); g.drawString("Jug Filler", 65, 255); g.drawString("Run time: " + String.valueOf(formatTime(System.currentTimeMillis() - startTime)), 15, 275); } private String formatTime(final long ms) { long s = ms / 1000, m = s / 60, h = m / 60; s %= 60; m %= 60; h %= 24; return String.format("%02d:%02d:%02d", h, m, s); } } [/SPOILER] Edited October 26, 2020 by Lol_marcus Quote Link to comment Share on other sites More sharing options...
MaxedTitans Posted October 26, 2020 Share Posted October 26, 2020 Like @ProjectPactsaid, this can really easily be made with Script Factory. Not sure what you're going to use it for, but do know that jug of water is one of the items that are restricted. So the money is alright, but you'll have to get around the restriction first before being able to sell 1 Quote Link to comment Share on other sites More sharing options...
journey Posted November 7, 2020 Share Posted November 7, 2020 On 10/26/2020 at 11:49 AM, Lol_marcus said: Here you go. [SPOILER] package core; import java.awt.Graphics2D; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; 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; @ScriptManifest(name = "Jug Filler", version = 1.1, author = "Marcus", logo = "", info = "Fills jugs in falador") public class Main extends Script { private final Area waterPump = new Area(2949, 3382, 2950, 3383); private long startTime = System.currentTimeMillis(); @Override public void onStart() throws InterruptedException { } @Override public int onLoop() throws InterruptedException { if (hasJugs()) { walkPump(); if (hasPump()) { fillJugs(); } } else { if (!hasJugs()) ; { bank(); } } return 700; } public boolean hasJugs() { return (getInventory().contains("Jug") && (getInventory().isFull())); } public boolean hasPump() { RS2Object pump = getObjects().closest("Waterpump"); return (pump != null && pump.isVisible()); } private void bank() throws InterruptedException { if (!Banks.FALADOR_WEST.contains(myPosition())) { getWalking().webWalk(Banks.FALADOR_WEST); } else if (Banks.FALADOR_WEST != null && (!getBank().isOpen())) { getBank().open(); } else if (!getInventory().isEmptyExcept("Jug")) { getBank().depositAllExcept("Jug"); } else if (getBank().contains("Jug")) { getBank().withdrawAll("Jug"); sleep(random(50, 150)); getBank().close(); sleep(random(50, 150)); new ConditionalSleep(2000, 600) { @Override public boolean condition() { return ((!getBank().isOpen()) && (inventory.getAmount("Jug") == 28)); } }.sleep(); } else { stop(false); } } public void fillJugs() throws InterruptedException { RS2Object waterPump = getObjects().closest("Waterpump"); if ((!myPlayer().isAnimating()) && waterPump != null) { if (!getInventory().isItemSelected()) { getInventory().getItem("Jug").interact("Use"); sleep(random(100, 250)); waterPump.interact("Use"); sleep(random(100, 200)); getMouse().moveOutsideScreen(); sleep(random(1000, 1500)); } new ConditionalSleep(20000, 600) { @Override public boolean condition() { return ((!myPlayer().isAnimating()) && (waterPump != null)); } }.sleep(); } } private void walkPump() throws InterruptedException { if (getInventory().isFull() && getInventory().contains("Jug")) { getWalking().walk(waterPump); sleep(random(50, 105)); new ConditionalSleep(20000, 600) { @Override public boolean condition() { return (waterPump.contains(myPosition())); } }.sleep(); } else { stop(false); } } @Override public void onPaint(Graphics2D g) { super.onPaint(g); g.drawString("Jug Filler", 65, 255); g.drawString("Run time: " + String.valueOf(formatTime(System.currentTimeMillis() - startTime)), 15, 275); } private String formatTime(final long ms) { long s = ms / 1000, m = s / 60, h = m / 60; s %= 60; m %= 60; h %= 24; return String.format("%02d:%02d:%02d", h, m, s); } } [/SPOILER] how to load it in osbot?i copy paste the txt and put it in the osbot folder but i cant see it in my scripts list. 1 Quote Link to comment Share on other sites More sharing options...
Gunman Posted November 7, 2020 Share Posted November 7, 2020 48 minutes ago, journey said: how to load it in osbot?i copy paste the txt and put it in the osbot folder but i cant see it in my scripts list. You have to compile it into a jar https://osbot.org/forum/topic/154399-script-development-setup/ 1 Quote Link to comment Share on other sites More sharing options...
journey Posted November 8, 2020 Share Posted November 8, 2020 (edited) i succeeded to compile it into a script and test it.it has a major flaw.it starts filling the jugs in the water pump and halfway clicks again a jug and then the water pump. and some times a third time. all that start again and again in a single row takes seconds away. resulting in less jugs to be filled per hour. can you repair it? edit: script is broken.in the 15 minute running the player just sit doing nothing few meters away of the water pump. when i manually click him to go to the pump, he continue. edit2: i manage to fix the player sitting and doing nothing if he is away from the water. but he keeps re-clicking the jug to fill every 7-8 even thought he has already start doing it. and losing many seconds do it so. i played with the sleep times but nothing changed. edit3: i found the bot again idling. probably cause he hadn't a visual of the water pump. i had to turn manually a bit the camera so he can continue. edit4: i see in the chat many times while he has start filling the text nothing interested happens...if that helps. edit5: it got iddling again,even thought he had a clear view of the water but he was a little far of the pump. that's it i cant change anything else. Can someone post a good script? the place there is full of bots doing it fast. thanks. Edited November 8, 2020 by journey Quote Link to comment Share on other sites More sharing options...