quant 9 Share Posted May 8, 2021 Morning all, I'm writing my first DreamBot work, having botted on hacky DIY Runelite injections for a couple of years. I've been experimenting with simple stuff, looking to get to grips with the functionality. I've found that DreamBot has some pretty advanced failure detection, and this is a great safety net, but it is also hard to debug! When mining, I issue a targetRock.interact(), and my mouse tracks to a getSuitablePoint(), and clicks. Most of the time this clears. Sometimes the interact fails, and I issue a move command to the tile. When this happens, DreamBot makes a spirited effort to correct itself, issuing three or four subsequent clicks, waving the camera about. This failure tends to compound, issuing repeated movements rather than the intended interact. How much control can I take of this process? Are there settings which would simply return failure so that I can handle errors on my end? Is there a way I can collect logs, for example logging button state, hover state, et cetera. Can I insert a getHullBounds().contains(mouse) check? Many thanks, Q Link to comment Share on other sites More sharing options...
Pandemic 2675 Share Posted May 8, 2021 At this time you can't disable the retry logic with any entity interactions, however you could do a "dumb" interact like this and react however you'd prefer: GameObject rock = GameObjects.closest("Rocks"); PointDestination pointDestination = new PointDestination(rock.getClickablePoint()); InteractionEvent interactionEvent = new InteractionEvent(pointDestination); if (interactionEvent.interact("Mine")) { // Successfully interacted with a rock } else { // Failed to choose that action at the given point, move / rotate / etc. } It's a bit more verbose, and it wouldn't actually ensure that the entity at the point it interacts with is the exact same entity, but I imagine that'd be pretty rare. Hope that helps! quant 1 Link to comment Share on other sites More sharing options...
quant 9 Author Share Posted May 8, 2021 Extremely helpful as ever thank you Pandemic. Digging into the action of interactionEvent also provides ammo for other things I'm keen to experiment with. I've never managed to get interactions reliable whilst running, outside of DreamBot my computation overhead was too high. If I get enough time tomorrow I hope I can get a web walker operating without the minimap. Link to comment Share on other sites More sharing options...
nCH 0 Share Posted May 6, 2022 On 5/8/2021 at 11:41 PM, Pandemic said: At this time you can't disable the retry logic with any entity interactions, however you could do a "dumb" interact like this and react however you'd prefer: GameObject rock = GameObjects.closest("Rocks"); PointDestination pointDestination = new PointDestination(rock.getClickablePoint()); InteractionEvent interactionEvent = new InteractionEvent(pointDestination); if (interactionEvent.interact("Mine")) { // Successfully interacted with a rock } else { // Failed to choose that action at the given point, move / rotate / etc. } It's a bit more verbose, and it wouldn't actually ensure that the entity at the point it interacts with is the exact same entity, but I imagine that'd be pretty rare. Hope that helps! "etClickablePoint()" its some random point on Object? Link to comment Share on other sites More sharing options...
d31m0s 1 Share Posted June 22, 2022 On 5/6/2022 at 10:46 AM, nCH said: "etClickablePoint()" its some random point on Object? PointDestination (DreamBot Javadocs) 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