quant 9 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
Pandemic 2853 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 9 Author 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.
nCH 0 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?
d31m0s 1 Posted June 22, 2022 On 5/6/2022 at 10:46 AM, nCH said: "etClickablePoint()" its some random point on Object? PointDestination (DreamBot Javadocs)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.