Jump 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.

[Open source] Dubai's SplashAlcher [Mage XP without HP!]

Featured Replies

Dubai's SplashAlcher

Splashes while alching for ultimate magic XP without any hitpoints XP.

Splash-Alcher3-Hours.png

How to run:

-Get your splashing gear on (-65 magic attack bonus required)

-Have runes in inventory (Alch runes + Runes for splashing)

-MUST AUTO-CAST SPLASH SPELL

-Start near the bear behind Varrock castle

varrock-pallace-Splash-Alcher-start.jpg

-Enter the item you want to high alch in the popup window

EXAMPLE SETUP:

Splash-Alcher-USER-SETUP.png

 

--------------------------------------------------------------------------------------------------------

DOWNLOAD LINK - Extract to your OSbot\scripts\ Path.

--------------------------------------------------------------------------------------------------------

 

Source:

Spoiler
import org.osbot.rs07.api.ui.MagicSpell;
import org.osbot.rs07.api.ui.Spells;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

import java.awt.*;
import javax.swing.*;

@ScriptManifest(name = "SplashAlcher", author = "Dubai", version = 0.1, info = "Casts magic attacks and alchemy on a predefined item.", logo = "")
public class SplashAlcher extends Script {

    private String alchItem;  // Item to high alch, set in GUI
    private long startTime;   // For tracking runtime
    private int startMagicLevel;  // Initial magic level for tracking gains
    private int startMagicXP;  // Initial magic XP
    private State currentState;  // Current state of the script
    private NPC grizzlyBear;  // Reference to the Grizzly bear

    private enum State {
        CAST_ALCH, SELECT_ITEM, ATTACK_BEAR, WAIT_FOR_ANIMATION
    }

    @Override
    public void onStart() {
        alchItem = JOptionPane.showInputDialog("Enter the item name to high alch:");
        startTime = System.currentTimeMillis();
        startMagicLevel = getSkills().getDynamic(Skill.MAGIC);
        startMagicXP = getSkills().getExperience(Skill.MAGIC);
        currentState = State.CAST_ALCH;  // Initial state
        log("Starting SplashAlcher with alch item: " + alchItem);
    }

    @Override
    public void onExit() {
        log("Stopping SplashAlcher.");
    }

    @Override
    public int onLoop() throws InterruptedException {
        switch (currentState) {
            case CAST_ALCH:
                if (getMagic().canCast(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY)) {
                    getMagic().castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY);
                    sleep(random(400, 600));
                    currentState = State.SELECT_ITEM;
                }
                break;

            case SELECT_ITEM:
                if (getInventory().contains(alchItem)) {
                    getInventory().interact("Cast", alchItem);
                    sleep(random(400, 600));
                    currentState = State.ATTACK_BEAR;
                }
                break;

            case ATTACK_BEAR:
                if (!getCombat().isFighting()) {
                    attackGrizzlyBear();
                    sleep(random(400, 600));
                    currentState = State.WAIT_FOR_ANIMATION;
                }
                break;

            case WAIT_FOR_ANIMATION:
                if (!myPlayer().isAnimating()) {
                    sleep(random(1000, 1500));  // Wait for animation to finish
                    currentState = State.CAST_ALCH;  // Reset to cast alch again
                }
                break;
        }
        return random(200, 300);
    }

    private void attackGrizzlyBear() throws InterruptedException {
        // Target and attack the Grizzly bear
        if (grizzlyBear == null || !grizzlyBear.exists()) {
            grizzlyBear = getNpcs().closest("Grizzly bear");
        }

        if (grizzlyBear != null && !getCombat().isFighting()) {
            if (grizzlyBear.isVisible()) {
                grizzlyBear.interact("Attack");
                sleep(random(600, 800));
            } else {
                getCamera().toEntity(grizzlyBear);  // Rotate camera to the bear if not visible
                sleep(random(400, 600));
            }
        }
    }

    @Override
    public void onPaint(Graphics2D g) {
        // Calculate runtime and experience
        long runTime = System.currentTimeMillis() - startTime;
        int currentMagicXP = getSkills().getExperience(Skill.MAGIC);
        int magicXPGained = currentMagicXP - startMagicXP;
        int magicLevelGained = getSkills().getDynamic(Skill.MAGIC) - startMagicLevel;
        double xpPerHour = (magicXPGained * 3600000D) / runTime;  // XP per hour formula

        // Improved on-paint design
        g.setColor(new Color(0, 0, 0, 150));  // Semi-transparent background
        g.fillRoundRect(10, 10, 250, 120, 10, 10);  // Rounded box

        g.setColor(Color.WHITE);
        g.setFont(new Font("Arial", Font.BOLD, 14));
        g.drawString("SplashAlcher by Dubai", 20, 30);

        g.setFont(new Font("Arial", Font.PLAIN, 12));
        g.drawString("Runtime: " + formatTime(runTime), 20, 50);
        g.drawString("Magic Levels Gained: " + magicLevelGained, 20, 65);
        g.drawString("Magic XP Gained: " + magicXPGained, 20, 80);
        g.drawString("XP per Hour: " + String.format("%.2f", xpPerHour), 20, 95);
        g.drawString("Current State: " + currentState.name(), 20, 110);
    }

    private String formatTime(long millis) {
        long seconds = millis / 1000;
        long minutes = seconds / 60;
        long hours = minutes / 60;
        return String.format("%02d:%02d:%02d", hours, minutes % 60, seconds % 60);
    }
}

-------------------------------------------------------------------------------------------------------------------------------

  • 4 weeks later...
  • Author
On 8/25/2024 at 10:20 PM, Fanny said:

Very nice, looks good!

Was one of my favourites to make actually because It didn't take long at all and almost ran straight away without any errors

9 hours ago, dubai said:

and almost ran straight away without any errors

YES! So satisfying when your script just runs first time with only minor issues!

  • Author
On 9/19/2024 at 6:43 PM, Fanny said:

YES! So satisfying when your script just runs first time with only minor issues!

Yes it's definitely satisfying until you rely too much on AI and have to start methods over from scratch 😛

On 9/21/2024 at 2:41 AM, dubai said:

until you rely too much on AI and have to start methods over from scratch 😛

Yeah it can really imagine some stupid methods sometimes, or completely misunderstand what you asked...

I find it saves time to outline the function manually and have it flesh it out with the boring bits

  • Author
3 hours ago, Fanny said:

Yeah it can really imagine some stupid methods sometimes, or completely misunderstand what you asked...

I find it saves time to outline the function manually and have it flesh it out with the boring bits

I think thats where I was going wrong, doing that backwards... trying to have it build method skeletons then I would go through and try and figure out why it wasn't working...

  • 2 months later...
  • 1 month later...
  • Author
9 minutes ago, fckaslut said:

is starting at the bear a requirement ?

 

Yep, it doesn't support any other locations currently

all good i changed it to support other locations but its just not effective xp

 

  • Author
1 hour ago, fckaslut said:

all good i changed it to support other locations but its just not effective xp

 

What spell are you splashing? It can get almost 70k xphr with blood runes and can make gp too with the alchs

theres my issue still f2p grinding out a bond can you do a alch teleporter ?

 

looking for source code for a alch teleporter rn 

 

  • Author

You could replace this case with a teleport method:

case ATTACK_BEAR:
                if (!getCombat().isFighting()) {
                    attackGrizzlyBear();
                    sleep(random(400, 600));
                    currentState = State.WAIT_FOR_ANIMATION;
                }
                break;

Something like:
doTeleport()

Then you can make the method using something like this:
 

getMagic().castSpell(Spells.NormalSpells.VARROCK_TELEPORT)

 

  • 10 months later...

Yo bro can you make a reuploader gonna use this also try implementing the Tele archer at some point ! Ty tho

On 1/5/2025 at 7:08 PM, dubai said:

You could replace this case with a teleport method:

case ATTACK_BEAR:
                if (!getCombat().isFighting()) {
                    attackGrizzlyBear();
                    sleep(random(400, 600));
                    currentState = State.WAIT_FOR_ANIMATION;
                }
                break;

Something like:
doTeleport()

Then you can make the method using something like this:
 

getMagic().castSpell(Spells.NormalSpells.VARROCK_TELEPORT)

 

Pumped to try this fr

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

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.