Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[WIP] Jio's - Enchanter [Currently only Burning Amulets ] [Open Source]

Featured Replies

Hello

Here's a Jewellery Enchanter i have been working.

Features:

  • Makes Burning Amulets
  • Equips Required Staff if not already
  • Gui & Paint will be added once it's an AIO
  • Tested it by making 5k amulets. 

Current Bugs: 

  • Breaks if started with bank open
  • Doesnt check if bank has items ( Didn't add it yet.)

 

How to use:

make sure you have required items in bank & hit start.

 

Here's the Source if you are looking for it:

Enchanter.java

Spoiler

package Magic;

import Utils.Sleep;
import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.api.ui.EquipmentSlot;
import org.osbot.rs07.api.ui.Spells;
import org.osbot.rs07.api.ui.Tab;
import org.osbot.rs07.script.Script;

import static org.osbot.rs07.script.MethodProvider.random;

public class Enchanter {
    private final Script ctx;


    public Enchanter(Script ctx) {
        this.ctx = ctx;
    }

    public void doTask() throws InterruptedException {

        if (!staffIsOn() && !needStaff() && !ctx.getBank().isOpen()) {
            equipStaff();
        } else {
            if (hasItems() && staffIsOn()) {
                cast();
            } else {
                if (!ctx.getBank().isOpen()) {
                    openBank();
                    if (needToDepositBurnings()) {
                        depositAllBurnings();
                    }
                    if (needRunes()) {
                        getRunes();
                    }
                    if (needStaff() && !staffIsOn()) {
                        getStaff();
                    }
                    if (needAmulets() && !needToDepositBurnings()) {
                        withdrawAmulets();
                    }
                    closeBank();
                }
            }
        }
    }

    private void getRunes() {
        ctx.log("Getting runes");
        if (ctx.getBank().withdrawAll("Cosmic rune")) {
            Sleep.sleepUntil(() -> ctx.getInventory().contains("Cosmic rune"), random(1200, 2050));
        }
    }

    private void getStaff() {

        ctx.log("Getting Staff");
        if (ctx.getBank().withdraw("Staff of fire", 1)) {
            Sleep.sleepUntil(() -> !needStaff(), random(1200, 1550));
        }

    }

    private void equipStaff() {
        ctx.log("Equipping staff");
        if (ctx.getEquipment().equipForNameThatContains(EquipmentSlot.WEAPON, "Staff of fire")) {
            Sleep.sleepUntil(this::staffIsOn, random(1500, 2500));
        }
    }

    private void withdrawAmulets() {
        ctx.log("Withdrawing Topaz amulets");

        if (!ctx.getEquipment().isWearingItem(EquipmentSlot.WEAPON, "Staff of fire")) {
            if (ctx.getBank().withdraw("Topaz amulet", 26)) {
                Sleep.sleepUntil(()->!needAmulets(), random(1000, 1250));
            }
        } else {
            if (ctx.getBank().withdraw("Topaz amulet", 27))
                Sleep.sleepUntil(() -> !needAmulets(), random(1000, 1250));
        }
    }

    private void openBank() throws InterruptedException {

        if (ctx.getMagic().isSpellSelected()) {
            ctx.getMagic().deselectSpell();
        }
        ctx.log("Opening Bank");
        if (ctx.getBank().open()) {
            Sleep.sleepUntil(() -> ctx.getBank().isOpen(), random(1000, 2500));
        }
    }


    private void cast() {
        Item sr = ctx.getInventory().getItem("Topaz amulet");
        if (sr != null) {
            if (ctx.getMagic().castSpell(Spells.NormalSpells.LVL_3_ENCHANT)) {
                ctx.log("Casting Spell");
                if (ctx.getTabs().getOpen().equals(Tab.INVENTORY)) {
                    if (sr.interact("Cast")) {
                        Sleep.sleepUntil(() -> ctx.getTabs().getOpen().equals(Tab.MAGIC), random(1500, 2500));
                    }
                }
            }
        }
    }

    private void closeBank() {

        ctx.log("Closing Bank");
        if (ctx.getBank().close()) {
            Sleep.sleepUntil(() -> !ctx.getBank().isOpen(), random(1000, 2500));
        }
    }

    private void depositAllBurnings() {

        ctx.log("Deposting Burning amulets ");
        if (ctx.getBank().depositAllExcept("Cosmic rune")) {
            Sleep.sleepUntil(() -> !ctx.getInventory().onlyContains("Cosmic rune"), random(1000, 1250));
        }
    }

    private boolean staffIsOn() {
        return ctx.getEquipment().isWearingItem(EquipmentSlot.WEAPON, "Staff of fire");
    }

    private boolean needToDepositBurnings() {
        return (ctx.getInventory().contains("Burning amulet(5)") && !ctx.getInventory().contains("Topaz amulet"));

    }

    private boolean hasItems() {
        return (ctx.getInventory().contains("Topaz amulet") && ctx.getInventory().contains("Cosmic rune"));
    }

    private boolean needStaff() {
        return !ctx.getInventory().contains("Staff of fire");
    }

    private boolean needRunes() {
        return !ctx.getInventory().contains("Cosmic rune");
    }

    private boolean needAmulets() {
        return !ctx.getInventory().contains("Topaz amulet");
    }

}

 

 

Main.java

Spoiler

package Magic;

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;


@ScriptManifest(name = "WIP Magic", version = 0.1, author = "Jio", logo = "", info = "Enchants")
public class Main extends Script {

   private Enchanter enchantTask;

    @Override
    public int onLoop() throws InterruptedException {
        enchantTask.doTask();
        return random(250, 350);
    }


    public void onStart() {
        this.enchantTask = new Enchanter(this);
        log("Running");
    }

    public void onExit() {

        System.gc();
    }

}

 

 

 

  • JioMy changed the title to [WIP] Jio's - Enchanter [Currently only Burning Amulets ] [Open Source]
  • 2 months later...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.