renormalize 0 Share Posted May 24, 2017 Here is a pizza dough maker script that I made in a few hours trying to traverse the API. This is more of an example script that beginners can look at to see how everything comes together. This script can be easily adapted for other simple things such as pastry dough. Start the script at any bank with pots of flour and jugs of water visible on opening the bank, it will make all of them into pizza bases. Roughly 100k+/hr with no reqs, made 3m in 1 day using this on 2 accounts. After it runs out of flour and water it will just stand there opening the bank because I was too lazy to learn how to close the script, so it's assumed you will correct it if the character runs out of materials. Enjoy! import org.dreambot.api.methods.Calculations; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.script.Category; import org.dreambot.api.wrappers.items.Item; @ScriptManifest(author = "Renormalize", name = "Pizza Dough", version = 1.0, description = "Makes Pizza Dough", category = Category.COOKING) public class PizzaDough extends AbstractScript { private enum State { BANK, DOUGH }; private State getState() { if (!getInventory().contains("Pot of flour") || !getInventory().contains("Jug of water")) return State.BANK; return State.DOUGH; } public void onStart() { log("Starting Dough Script!"); } public void onExit() { log("Ending Dough Script!"); } @Override public int onLoop() { switch (getState()) { case BANK: getBank().open(); int counter = 0; while (!getBank().isOpen()) { sleep(300); // Needed in case bank doesn't open counter++; if (counter > 5) return Calculations.random(500, 600); } sleep(350); getBank().depositAllItems(); sleep(1200); if (getBank().count("Pot of flour") == 0 && getBank().count("Jug of water") == 0 && getBank().isOpen()) { getBank().close(); sleep(1000); // No Flour or water, should end script here break; } // Withdraw Flour and Water sleep(Calculations.random(200, 600)); getBank().withdraw("Pot of flour", 9); sleep(1200); getBank().withdraw("Jug of water", 9); sleep(Calculations.random(1000, 1300)); getBank().close(); sleep(Calculations.random(200, 600)); break; case DOUGH: Item dough = getInventory().get("Pot of flour"); Item water = getInventory().get("Jug of water"); dough.useOn(water); sleep(1000); if (getWidgets().getWidget(219).getChild(0).getChild(3) == null) { log("First Interface is null, redo loop."); return Calculations.random(700, 1200); } else { getWidgets().getWidget(219).getChild(0).getChild(3).interact(); sleep(950); } if (getWidgets().getWidget(309).getChild(6) == null) { log("Second Interface is null, redo loop."); return Calculations.random(700, 1200); } else { getWidgets().getWidget(309).getChild(6).interact("Make All"); } int i = 0; while (getInventory().contains("Jug of water") && i < 20) { sleep(Calculations.random(700, 1200)); i++; // i variable is there to make sure script doesn't get stuck if // dough isn't being made } break; } return Calculations.random(500, 600); } } Link to comment Share on other sites More sharing options...
Just Chill 26 Share Posted May 24, 2017 dinhDough does this for you on the SDN And costs moni Link to comment Share on other sites More sharing options...
renormalize 0 Author Share Posted May 24, 2017 Well its pretty good and alot faster than this snippet As for the script its good for a start but you should look into sleepUntil conditions To stop the script you can use stop() and I recommend changing it to (nowater||noflour)&&bankopen Yea haha, this is basically a welfare dinhDough! Thanks for the advice, there's a lot to improve in this script! Link to comment Share on other sites More sharing options...
MiraiSalam 0 Share Posted May 24, 2017 Dam I wish I read this before I got a job at Dominoes . All jokes aside, nice script. Link to comment Share on other sites More sharing options...
black sprotje 0 Share Posted April 19, 2020 how i download the script? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.