Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • new to dreambot language need help asap!


    Recommended Posts

    import org.dreambot.api.methods.Calculations;
    import org.dreambot.api.methods.container.impl.Inventory;
    import org.dreambot.api.methods.container.impl.bank.Bank;
    import org.dreambot.api.methods.interactive.GameObjects;
    import org.dreambot.api.methods.interactive.NPCs;
    import org.dreambot.api.methods.item.GroundItems;
    import org.dreambot.api.methods.map.Area;
    import org.dreambot.api.script.AbstractScript;
    import org.dreambot.api.script.Category;
    import org.dreambot.api.script.ScriptManifest;
    import org.dreambot.api.wrappers.interactive.GameObject;
    import org.dreambot.api.wrappers.interactive.NPC;
    import org.dreambot.api.wrappers.items.GroundItem;
            author = "smh1",
            description = "Cooker",
            category = Category.COOKING,
            version = 0.01,
            name = "Speed Cooker"
    public class Main extends AbstractScript {
        Area cookingSpot = new Area(3043, 4972, 1,0);
        public int uShark = 383;
        public int shark = 385;
        public int banker = 3194;
        public int fire = 26185;
        GroundItem uncookedShark = GroundItems.closest(uShark);
        State state;
        public int onLoop() {
            switch (getState()) {
                case BANKING:
                    NPC bankMan = NPCs.closest(banker);
                    sleepUntil(() -> Bank.isOpen(), Calculations.random(1000, 2000));
                    if (Bank.isOpen() && Inventory.isEmpty()) {
                        Bank.withdraw(uShark, 28);
                        sleepUntil(() -> Inventory.isFull(), Calculations.random(50, 120));
                    } else if (Inventory.containsAll(shark)) {
                        sleepUntil(() -> Inventory.isEmpty(), 100, 250);
                        sleepUntil(() -> Inventory.containsAll(uShark), Calculations.random(50, 200));
                case DROPPING:
                case COOKING:
                        sleepUntil(() -> Inventory.isItemSelected(), Calculations.random(10, 70));
                        GameObject firee = GameObjects.closest(fire);
                        GroundItem uncookedShark = GroundItems.closest(uShark);
                        if (uncookedShark != null)
                return 0;
        private enum State{
        private State getState() {
            if (Inventory.isEmpty() || Inventory.containsAll(shark)){
                state = State.BANKING;
            }else if (Inventory.containsAll(uShark) && !Bank.isOpen()){
                state = State.DROPPING;
            }else if (uncookedShark.equals(27) && Inventory.contains(uShark==1));
                state = State.COOKING;
            return state;
        public void onStart(){
            log("Bot has started");
        public void onExit(){



    This is when I try running it with full inv of sharks. He just spam clicks on shark and then the fire.


    this happens when I try running it with no sharks in my inv.

    Link to comment
    Share on other sites

    I'm really lost tbh.. I need you to elaborate more, because I'm really new to scripting.. And I need your help, man!

    Link to comment
    Share on other sites

    24 minutes ago, smh1 said:

    I'm really lost tbh.. I need you to elaborate more, because I'm really new to scripting.. And I need your help, man!

    It sounds to me like you don't have much actual Java programming experience.  I would suggest going onto YouTube and finding an introduction to Java video.  Should be a couple hours long and it will help you a lot more than waiting for answers on the forum post.

    Link to comment
    Share on other sites


    This topic is now archived and is closed to further replies.

    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.