Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Norwood

Registered
  • Content Count

    27
  • Joined

  • Last visited

  • Feedback

    0%

Community Reputation

0 Neutral

About Norwood

  • Rank
    New Botter

Recent Profile Visitors

769 profile views
  1. And there it is, thanks a lot! Also thank you Jerminater even if that wasn't the root cause you still showed me a nicer way of initialising and passing around my AntiBan functionality.
  2. Ah, clever. It still crashes for me with [00:42:02] java.lang.NoSuchMethodError: api.AntiBan.AntiBan.get()Lapi/AntiBan/AntiBan; Here's where we are at right now: package api.AntiBan; import org.tribot.api.General; import org.tribot.api.util.abc.ABCUtil; public class AntiBan { private ABCUtil abcUtil = new ABCUtil(); private static AntiBan antiBan; private AntiBan () {} public static AntiBan get() { return antiBan == null ? antiBan = new AntiBan() : antiBan; } public void executeTimedActions() { General.println("This does not run at all"); if (this.abcUtil.shouldCheckTabs()) this.abcUtil.checkTabs(); if (this.abcUtil.shouldCheckXP()) this.abcUtil.checkXP(); if (this.abcUtil.shouldExamineEntity()) this.abcUtil.examineEntity(); if (this.abcUtil.shouldMoveMouse()) this.abcUtil.moveMouse(); if (this.abcUtil.shouldPickupMouse()) this.abcUtil.pickupMouse(); if (this.abcUtil.shouldRightClick()) this.abcUtil.rightClick(); if (this.abcUtil.shouldRotateCamera()) this.abcUtil.rotateCamera(); if (this.abcUtil.shouldLeaveGame()) this.abcUtil.leaveGame(); } } package scripts.NWPowerMiner; import api.AntiBan.AntiBan; import org.tribot.api.General; import org.tribot.api2007.Objects; import org.tribot.api2007.Player; import org.tribot.api2007.types.RSObject; public class MineNode implements Runnable { private final int[] ROCK_IDS = {7485, 7486}; @Override public void run() { RSObject[] rocks = Objects.findNearest(15, ROCK_IDS); if (rocks.length == 0) return; RSObject nearestRock = rocks[0]; if (Player.getAnimation() != -1) { // Crashes right after this AntiBan.get().executeTimedActions(); } else if (nearestRock != null) { nearestRock.click("Mine"); int timeout = 0; while (Player.getAnimation() == -1) { timeout++; General.sleep(10); if (timeout > 250) //waits up to 2.5 seconds until the players animation changes break; //prevents bot from spam clicking ore } } } }
  3. Thanks for the continued help. Two things: 1. If I make a private constructor for AntiBan it won't let me create an instance of it in NWPowerMiner to be passed on to my nodes and 2. If the getter is static and I try to access it in my node via the AntiBan instance then my IDE complains Even if I made the constructor public I get this error: [00:29:54] java.lang.NoSuchMethodError: api.AntiBan.AntiBan.get()Lapi/AntiBan/AntiBan;
  4. Tried making a constructor for it to see if it even is created but it doesn't print. public AntiBan() { super(); General.println("Not printing either"); } Also, initializing AntiBan in the run method instead of as a field doesn't help either.
  5. Aha, it doesn't print there either. Definitely seems to be something wrong with my AntiBan class but I can't figure out what.
  6. No difference with that change either I'm afraid. Also tried changing mineNode and dropOreNode to ActionNode's instead of their respective classes in the main run method but nothing changed. It's really weird because I expect the script to crash if I was doing something illegal in regards to Java, but it doesn't.
  7. Thanks for the idea. It doesn't give me an error when trying that but it doesn't print anything either. Same result as before.
  8. Right but my print in the method isn't showing up at all, leading me to believe that the method isn't run when called.
  9. Hi! This is probably just me being shit at Java but I can't figure out why my anti-ban timed actions method isn't being called. It's a simple power miner that I've adapted from Worthy to try out the decision tree framework and implementing ABCv2. I've annotated my code with the order I assume it is being run in but the method I've annotated with number 9 isn't being called while number 8 runs fine. Any help is appreciated and any guidelines for troubleshooting issues like this are too. package scripts.NWPowerMiner; import api.AntiBan.AntiBan; import api.DecisionTreeFramework.DecisionNode; import api.DecisionTreeFramework.DecisionTree; import org.tribot.script.Script; import org.tribot.script.ScriptManifest; import org.tribot.script.interfaces.Ending; @ScriptManifest( authors = {"Norwood"}, category = "Mining", name = "NWPowerMiner", version = 0.01, description = "A simple Power Miner with ABCL10", gameMode = 1) public class NWPowerMiner extends Script implements Ending { // 1 protected AntiBan antiBan = new AntiBan(); @Override public void run() { println("Starting Norwood Power Miner"); // 3 MineNode mineNode = new MineNode(this.antiBan); DropOreNode dropOreNode = new DropOreNode(this.antiBan); DecisionNode shouldBankNode = new ShouldBankNode(); shouldBankNode.setValidNode(dropOreNode); shouldBankNode.setInvalidNode(mineNode); DecisionTree tree = new DecisionTree(shouldBankNode); while(true) { Runnable node = tree.getValidRunnable(); // 6 node.run(); } } @Override public void onEnd() { println("Ending Norwood Power Miner"); } } package api.AntiBan; import org.tribot.api.General; import org.tribot.api.util.abc.ABCUtil; public class AntiBan { // 2 private ABCUtil abcUtil = new ABCUtil(); // 9 (not running?) public void executeTimedActions() { General.println("This does not run at all"); if (this.abcUtil.shouldCheckTabs()) this.abcUtil.checkTabs(); if (this.abcUtil.shouldCheckXP()) this.abcUtil.checkXP(); if (this.abcUtil.shouldExamineEntity()) this.abcUtil.examineEntity(); if (this.abcUtil.shouldMoveMouse()) this.abcUtil.moveMouse(); if (this.abcUtil.shouldPickupMouse()) this.abcUtil.pickupMouse(); if (this.abcUtil.shouldRightClick()) this.abcUtil.rightClick(); if (this.abcUtil.shouldRotateCamera()) this.abcUtil.rotateCamera(); if (this.abcUtil.shouldLeaveGame()) this.abcUtil.leaveGame(); } } package scripts.NWPowerMiner; import api.AntiBan.AntiBan; import api.DecisionTreeFramework.ActionNode; import org.tribot.api.General; import org.tribot.api2007.Objects; import org.tribot.api2007.Player; import org.tribot.api2007.types.RSObject; public class MineNode extends ActionNode implements Runnable { private final int[] ROCK_IDS = {7485, 7486}; // 4 public MineNode(AntiBan antiBan) { super(antiBan); } @Override public void run() { RSObject[] rocks = Objects.findNearest(15, ROCK_IDS); if (rocks.length == 0) return; RSObject nearestRock = rocks[0]; if (Player.getAnimation() != -1) { // 8 General.println("This prints fine"); this.antiBan.executeTimedActions(); } else if (nearestRock != null) { // 7 nearestRock.click("Mine"); int timeout = 0; while (Player.getAnimation() == -1) { timeout++; General.sleep(10); if (timeout > 250) //waits up to 2.5 seconds until the players animation changes break; //prevents bot from spam clicking ore } } } } package api.DecisionTreeFramework; import api.AntiBan.AntiBan; public abstract class ActionNode implements Runnable { protected AntiBan antiBan; // 5 public ActionNode(AntiBan antiBan) { this.antiBan = antiBan; } @Override public abstract void run(); }
  10. Hi, I think it would be useful to have an option to automatically disable user input when you start any script (yes I do know you can do it manually, but this is about doing it automatically). This prevents the mouse from randomly flying across the screen if you accidentally hover over the game window. I found this thread on the subject from before but it doesn't seem to have been implemented since, though I might be missing it. Do you guys agree that this might be a good idea?
  11. Awesome script! Here's a nice proggy. Though the whole XP part of it breaks when I use looking glass with several clients at once. Is this possible to fix somehow or is it just an inherit problem with LG?
  12. Hmm, I don't think so. I have it at 10 paint delay and it keeps trying to activate run but instead it clicks the same spot on the accept aid button.
  13. Tri Hill Giant Fighter and Master Walker AIO. I thought it might be a problem on my end since it seems like something that would have been fixed a long time ago.
×
×
  • Create New...