notkashez 8 Posted May 10, 2023 (edited) This script will alch any item in inventory and log out if no nature runes . It has a 5% chance to open the skills tab a small anti ban precaution. If you test this or use it please comment to let me know! import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.container.impl.Inventory; import org.dreambot.api.methods.magic.Normal; import org.dreambot.api.methods.magic.Magic; import org.dreambot.api.methods.skills.Skills; import org.dreambot.api.methods.tabs.Tabs; 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; import java.util.List; import java.util.Random; @ScriptManifest(category = Category.MAGIC, image = "", name = " NK ALCHEMIZE", author = "NotKashez", description = "Alchemize me captain", version = 1.0) public class Main extends AbstractScript { private Random rand = new Random(); @Override public int onLoop() { highAlchItems(); return Calculations.random(600, 800); // Sleep for a random period between 600 and 800 milliseconds } private void highAlchItems() { List<Item> items = Inventory.all(); // Check for Nature runes in the inventory Item natureRune = Inventory.get("Nature rune"); if (natureRune == null) { log("No Nature runes in inventory. Logging out..."); Tabs.logout(); stop(); return; } for (Item item : items) { // Add a null check for the item if (item != null) { String itemName = item.getName(); if (!itemName.equals("Nature rune") && !itemName.equals("Coins")) { sleep(Calculations.random(1000, 1500)); Magic.castSpell(Normal.HIGH_LEVEL_ALCHEMY); sleep(Calculations.random(1500, 2000)); item.interact(); if (rand.nextInt(100) < 5) { Skills.open(); sleep(1000,2000); } break; } } } } Edited March 19, 2024 by notkashez Turned a dead topic into a live one Szarikov 1
Szarikov 13 Posted March 19, 2024 (edited) No runes detected means script will logout but wont stop, meaning it will get logged back it by login handler. Edited March 19, 2024 by Szarikov
notkashez 8 Author Posted March 19, 2024 you are absolutely correct! ill fix it after this league game! Thanks for the reply. Szarikov 1
Szarikov 13 Posted March 19, 2024 26 minutes ago, notkashez said: you are absolutely correct! ill fix it after this league game! Thanks for the reply. No worries just looked at the script and it seems pretty nice. Might tweak it a bit and make use of it soon. Thanks for sharing.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now