dubai Posted August 25, 2024 Share Posted August 25, 2024 Dubai's SplashAlcher Splashes while alching for ultimate magic XP without any hitpoints XP. 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 -Enter the item you want to high alch in the popup window EXAMPLE SETUP: -------------------------------------------------------------------------------------------------------- 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); } } ------------------------------------------------------------------------------------------------------------------------------- Quote Link to comment Share on other sites More sharing options...
Fanny Posted August 25, 2024 Share Posted August 25, 2024 Very nice, looks good! 1 Quote Link to comment Share on other sites More sharing options...
dubai Posted September 18, 2024 Author Share Posted September 18, 2024 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 Quote Link to comment Share on other sites More sharing options...
Fanny Posted September 19, 2024 Share Posted September 19, 2024 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! Quote Link to comment Share on other sites More sharing options...
dubai Posted September 21, 2024 Author Share Posted September 21, 2024 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 Quote Link to comment Share on other sites More sharing options...
Fanny Posted September 23, 2024 Share Posted September 23, 2024 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 Quote Link to comment Share on other sites More sharing options...
dubai Posted September 24, 2024 Author Share Posted September 24, 2024 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... Quote Link to comment Share on other sites More sharing options...
hamilton51 Posted November 28, 2024 Share Posted November 28, 2024 nice 1 Quote Link to comment Share on other sites More sharing options...
fckaslut Posted Sunday at 04:25 AM Share Posted Sunday at 04:25 AM is starting at the bear a requirement ? Quote Link to comment Share on other sites More sharing options...
dubai Posted Sunday at 04:34 AM Author Share Posted Sunday at 04:34 AM 9 minutes ago, fckaslut said: is starting at the bear a requirement ? Yep, it doesn't support any other locations currently Quote Link to comment Share on other sites More sharing options...
fckaslut Posted Sunday at 08:39 PM Share Posted Sunday at 08:39 PM all good i changed it to support other locations but its just not effective xp Quote Link to comment Share on other sites More sharing options...
dubai Posted Sunday at 09:59 PM Author Share Posted Sunday at 09:59 PM 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 Quote Link to comment Share on other sites More sharing options...
fckaslut Posted Sunday at 10:06 PM Share Posted Sunday at 10:06 PM theres my issue still f2p grinding out a bond can you do a alch teleporter ? looking for source code for a alch teleporter rn Quote Link to comment Share on other sites More sharing options...
dubai Posted Monday at 12:08 AM Author Share Posted Monday at 12:08 AM 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) Quote Link to comment Share on other sites More sharing options...