C0d3 0 Share Posted August 9 import org.dreambot.api.methods.Calculations; import org.dreambot.api.methods.container.impl.Inventory; import org.dreambot.api.methods.container.impl.equipment.Equipment; import org.dreambot.api.methods.interactive.Players; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.map.Tile; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; @ScriptManifest(name = "Script Name", description = "My script description!", author = "Developer Name", version = 1.0, category = Category.WOODCUTTING, image = "") public class TestScript extends AbstractScript { @Override public onStart() { } @Override public onStop() { } @Override public onPause() { } @Override public int onLoop() { if(Inventory.contains("Bronze axe") || Equipment.contains("Bronze axe")) { if(D4t4.P4th.contains(Players.getLocal())) { SelectionofRock(); } else { D4t4.OffnOn = 1; Path(); } } else { Store(); } return 0; } private Path() { if(D4t4.OffnOn == 1) { //To D4t4.OffnOn = 0; D4t4.Tin = 1; SelectionofRock(); } else { //From Furnace(); } } private SelectionofRock() { //Copper of Tin D4t4.R = Calculations.random(0,1); switch(D4t4.R) { case 0: //Tin Mine(); break; case 1: //Copper Mine(); break; default: SelectionofRock(); break; } } private Mine() { if (D4t4.Tin == 1) { } else { } } private Furnace() { if (D4t4.Tin == 1) { } else { } } private Smelt() { if (D4t4.Tin == 1) { } else { } } private StorePath() { } private Store() { onLoop(); } private static class D4t4{ private static int OffnOn = 0; private static int Tin = 0; private static int R = 0; private static Area P4th = new Area(new Tile(0,0,0),new Tile(0,0,0)); } @Override public onPaint() { } @Override public GUI() { } } ;p Link to comment Share on other sites More sharing options...
YUNGTHUGFATGP 56 Share Posted August 9 woodcutting script that mines? Link to comment Share on other sites More sharing options...
Deep Slayer 49 Share Posted August 10 (edited) Disclaimer: Roast incoming as per OP request. Don''t read if your soft You skipped adding void to onStart(), onStop(), and onPause() —This isn’t Python where you can just leave things out and hope for the best. You’re supposed to be writing code, not a guessing game for the compiler. This is the kind of sloppy mistake that makes other developers lose faith in humanity. Path(), SelectionofRock(), Mine() —This isn’t some casual scripting language where you can play fast and loose with conventions. Java has standards, and you’re breaking them left and right. Do you want your code to look like a complete amateur wrote it? Because that’s exactly what this says. You’ve turned Store()— into a recursive nightmare by calling onLoop() within it. Did you even think about what you were doing? This isn’t just bad—it’s potentially catastrophic. One simple mistake, and you’ve got a stack overflow that’ll crash your bot faster than you can fix it. Mine(), Furnace(), Smelt()—these methods are as empty as your commitment to finishing this script properly. You can’t just throw in a bunch of placeholders and call it a day. If you’re not going to bother coding the actual functionality, why even bother writing the method in the first place? new Tile(0,0,0)— You might as well send your bot to nowhere and back. That’s just lazy. Put in some actual effort and use real coordinates. The D4t4 class is nothing more than a dumping ground for static variables. This is code clutter at its finest. You’re using static like it’s the only trick in your book. You’ve managed to turn a simple task into an over-complicated mess. It’s like you’re actively trying to make this harder for anyone else (or even yourself) to maintain. A binary dice roll to select a rock—brilliant. What’s next, flipping a coin to decide if the bot should work or crash? This is lazy, uninspired coding. How about putting in some logic that actually makes sense? Instead, you’re relying on randomness to get the job done, and it shows. D4t4? Trying to be edgy or cool with that name? All you’re doing is making your code look ridiculous. Naming conventions are there for a reason, and you’ve ignored them completely. No one’s impressed with your creative spelling—it just makes the code harder to read and maintain. You’ve turned the D4t4 class into an over-engineered disaster. There’s no reason this should be its own class. You’re making things unnecessarily complex, and for what? This isn’t clever design—it’s just making the code harder to follow and more prone to bugs. Returning 0 every time? Great idea—if your goal is to burn out your bot in record time. This bot isn’t a race car, it doesn’t need to run full throttle with no breaks. //To and //From—what is this, a treasure map? These comments tell me nothing about what the code does. If you’re going to comment, make it useful. Otherwise, you’re just wasting space and time. Put in some effort and write comments that actually help someone understand what’s going on. The GUI() method is just sitting there doing nothing. Why even include it? This isn’t a museum; dead code has no place in your script. Either finish it or remove it, but don’t leave it hanging around like a reminder of all the things you didn’t bother to complete. An empty onPaint() method? So you’re just here to waste space? This method is supposed to do something, anything, but you’ve left it blank. It’s like hanging an empty picture frame on the wall and calling it art. Your control flow is a mess—random if-statements and switches with no real logic or purpose. It’s like you’re just throwing things at the wall and seeing what sticks. There’s no structure, no plan—just chaos. If you want your bot to actually do something, maybe take a step back and think about how the logic should flow instead of winging it. You managed to get the ScriptManifest right, but that’s the easiest part of the script. It’s like you put all your effort into the intro and then just gave up. Lastly but not least you labeled this as a WOODCUTTING script, yet you’re writing code for mining and smelting. Do you even know what your script is supposed to do? This is misleading at best, incompetent at worst. Edited August 10 by Deep Slayer Link to comment Share on other sites More sharing options...
camelCase 271 Share Posted August 16 lmfao yeeter 1 Link to comment Share on other sites More sharing options...
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