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.

Al-Kharid Gold amulet (u) bot

Featured Replies

I searched through the SDN but the free ones weren't working, so I made one myself. Make sure you have an Amulet mould in your inventory. I've ran it for an hour twice but didn't take a picture, I might add a progress report later (you are free to post yours as well of course).

 

Download link

http://s000.tinyupload.com/index.php?file_id=42385377592917125400

 

Source

Spoiler

import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.map.constants.Banks;
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;

import java.awt.*;

@ScriptManifest(name = "HexAmulets", version = 1.0, author = "0x7BC", logo = "", info = "Makes Gold amulets (u) in Al-Kharid")
public class HexAmulets extends Script {

    private Area furnaceArea = new Area(3274, 3184, 3279, 3188);

    private long startTime;

    @Override
    public void onStart()  {
        startTime = System.currentTimeMillis();

        getExperienceTracker().start(Skill.CRAFTING);
    }

    @Override
    public int onLoop() throws InterruptedException {
        if (hasGoldBars()) {
            if (atFurnace()) {
                smelt();
            } else {
                walkToFurnace();
            }
        } else {
            if (atBank()) {
                bank();
            } else {
                walkToBank();
            }
        }
        return random(650, 950);
    }

    private boolean hasGoldBars() {
        return getInventory().contains("Gold bar");
    }

    private boolean atFurnace() {
        return furnaceArea.contains(myPosition());
    }

    private boolean atBank() {
        return Banks.AL_KHARID.contains(myPosition());
    }

    private void smelt() {
        if (getWidgets().get(446, 34) == null) {
            getObjects().closest("Furnace").interact("Smelt");
            new ConditionalSleep(1000, 400) {
                @Override
                public boolean condition() {
                    return getWidgets().get(446, 34) != null;
                }
            }.sleep();
        } else {
            getWidgets().get(446, 34).interact("Make-All");
            new ConditionalSleep(50_000, 600) {
                @Override
                public boolean condition() {
                    return !hasGoldBars() || getDialogues().isPendingContinuation();
                }
            }.sleep();
        }
    }

    private void bank() throws InterruptedException {
        if (getBank().isOpen()) {
            if (getInventory().contains("Gold amulet (u)")) {
                getBank().depositAll("Gold amulet (u)");
            } else {
                getBank().withdrawAll("Gold bar");
            }
        } else {
            getBank().open();
        }
    }

    private void walkToFurnace() {
        getWalking().webWalk(furnaceArea);
    }

    private void walkToBank() {
        getWalking().webWalk(Banks.AL_KHARID);
    }

    @Override
    public void onPaint(Graphics2D g) {
        Font font = new Font("Arial", Font.PLAIN, 18);
        g.setFont(font);
        g.drawString("Running: " + formatTime(System.currentTimeMillis() - startTime), 10, 40);
        g.drawString("Levels: + " + getExperienceTracker().getGainedLevels(Skill.CRAFTING), 10, 70);
        g.drawString("Exp Gained: + " + format(getExperienceTracker().getGainedXP(Skill.CRAFTING)), 10, 100);
    }

    private String formatTime(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);
    }

    private String format(long l) {
        return (l > 1_000_000) ? String.format("%.2fM", ((double) l / 1_000_000)) : (1 > 1000) ? String.format("%0.1K", ((double) l / 1000)) : l + "";
    }
}

 

 

  • 1 year later...

He

1 hour ago, Gunman said:

User is banned. Why his name has a line through it. The source is there if you wanna recompile the jar

Thanks for the info, didn't realize that the source was there; cheers man!!

 

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.