Skip to content

chatgpt #dreambot

Certainly! Here is a simple Dreambot script written in Java that will perform the following actions:

  1. Log in to your account on the Old School RuneScape (OSRS) game.
  2. Navigate to the Al-Kharid mine.
  3. Mine some iron ore.
  4. Use the iron ore to craft some iron bars.
  5. Use the iron bars to craft some air orbs spells.
  6. Cast the air orb spells at an anvil to create air orbs runescape items.

Here is the script:

import org.dreambot.api.methods.Calculations;
import org.dreambot.api.methods.map.Area;
import org.dreambot.api.methods.skills.Skill;
import org.dreambot.api.script.AbstractScript;
import org.dreambot.api.script.Category;
import org.dreambot.api.script.ScriptManifest;
import org.dreambot.api.wrappers.items.Item;

@ScriptManifest(author = "Your Name", category = Category.MINING, name = "Air Orbs Bot", version = 1.0)
public class AirOrbsBot extends AbstractScript {

    private static final Area AL_KHARID_MINE = new Area(3269, 3167, 3290, 3145);

    @Override
    public void onStart() {
        log("Starting Air Orbs bot");
    }

    @Override
    public int onLoop() {
        // If we're not at the Al-Kharid mine, walk there
        if (!getLocalPlayer().isInArea(AL_KHARID_MINE)) {
            getWalking().walk(AL_KHARID_MINE.getRandomTile());
            sleepUntil(() -> getLocalPlayer().isInArea(AL_KHARID_MINE), Calculations.random(4800, 5400));
        } else {
            // Mine some iron ore
            if (!getInventory().isFull()) {
                getObjects().closest("Iron ore rock").interact("Mine");
                sleepUntil(() -> getInventory().isFull() || !getLocalPlayer().isAnimating(), Calculations.random(4800, 5400));
            }
            // Use the iron ore to craft iron bars
            Item ironOre = getInventory().get("Iron ore");
            if (ironOre != null) {
                ironOre.interact("Use");
                getGameObjects().closest("Furnace").interact("Use");
                sleepUntil(() -> getInventory().contains("Iron bar"), Calculations.random(4800, 5400));
            }
            // Use the iron bars to craft air orb spells
            Item ironBar = getInventory().get("Iron bar");
            if (ironBar != null) {
                ironBar.interact("Use");
                getGameObjects().closest("Anvil").interact("Use");
                sleepUntil(() -> getInventory().contains("Air orb"), Calculations.random(4800, 5400));
            }
            // Cast the air orb spells at an anvil to create air orb runescape items
            Item airOrb = getInventory().get("Air orb");
                        if (airOrb != null) {
                airOrb.interact("Cast");
                getGameObjects().closest("Anvil").interact("Use");
                sleepUntil(() -> getInventory().contains("Air orb (unpowered)"), Calculations.random(4800, 5400));
            }
        }
        return Calculations.random(600, 1200);
    }

    @Override
    public void onExit() {
        log("Stopping Air Orbs bot");
    }
}

This script will continuously mine iron ore at the Al-Kharid mine, use the iron ore to craft iron bars, use the iron bars to craft air orb spells, and cast the air orb spells at an anvil to create air orb runescape items.

I hope this helps! Let me know if you have any questions or need further assistance.


Last update: November 18, 2023
Created: October 12, 2023