TunaTuna 1 Posted July 8, 2024 I think I'm having the same issue as this but I'm not sure as its been a month and I'm running the latest. patch.interact(); works for all normal interactions on various farming patches so I know it isn't a problem with the GameObject. Inventory.get("Compost").useOn(patch); and Inventory.get(seed).useOn(patch); Occasionally works, but 9/10 times will spin the screen and fail to click the patch after activating the corresponding inventory Item. https://imgur.com/a/vUsVtKS Worked the first two times there, which is extremely lucky, and then fails on the herb patch.
Luxe 83 Posted July 8, 2024 You could just do it your own way Inventory.use(compost) SleepUntil( //itemIsSelected ) Patch.Interact("Use") Also, most methods return true or false wether or not the action was successful, just try again if it fails.
TunaTuna 1 Author Posted July 8, 2024 (edited) Changed my code to the following: Logger.log("Using compost on patch"); Inventory.use(getSettings().compostType); Sleep.sleepUntil(Inventory::isItemSelected,2000,85); sleep(4000,6000); patch.interact("Use"); sleep(4000,6000); Logger.log("Using seed on patch"); Inventory.use(seed); Sleep.sleepUntil(Inventory::isItemSelected,2000,85); sleep(4000,6000); patch.interact("Use"); sleep(4000,6000); Threw in long sleep times just to make sure it would wait for everything to be completed. Still does the exact same thing. I don't want to loop this until it works as that would be pretty degenerate bot-like behavior. It works only maybe 10% of the time. Both patch.interact("Use") lines spin the camera and fail to click the patch. Edited July 8, 2024 by TunaTuna
TunaTuna 1 Author Posted July 9, 2024 I GOT IT! For anyone that finds this and has similar issues, the problem is the patch GameObject. For whatever reason, "Harvesting" and probably "Clearing" messes with the GameObject *juuuust* enough to mess with the next interactions. Instead of passing the function the gameobject (patch) as above, I pass the patch ID and use a local GameObject that gets reassigned much closer to when I'm trying to use items on the patch. Works like a charm!
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