Hi, a bit of background info first: Over the past few days I've been dabbling a bit in using RebornBuddy to semi-automate gathering levequests. There's currently no way to interact with the actual levemete to pick up levequests that I can tell, nor any way to initiate them from the quest log, but I can still automate most of it using simple Orderbot profiles that I was creating for each levequest. Once the profiles were made the only human interaction required was to pick up a new levequest, load a new profile, and start the bot. The tedious part was still handled by the bot, which was good enough for me since I could do other stuff while I let it run.
After a while I decided to try to write a plugin to have the bot use Deep Vigor on evaluation leves to make it easier to get the 25% bonus. I seem to have most of it working: OrderBot will run up to a node, my plugin will take over once it detects that the gathering window is open (GatheringWindow.WindowOpen, with a treehook at PoiAction), and it will deal with the logic to cast Sharp Vision II if necessary, hit the lower leveled slot five times, cast Deep Vigor, and then hit the higher leveled slot for an evaluation bonus.
My only issue is that I don't really know how to properly *wait* for things to complete. My PoiAction hook function (Composite?) is being called on every tick/pulse by the bot as it runs through the behavior tree, which is far more frequently than you can actually issue commands to the game because of animation delay. So my function sees that the gathering window is open, returns RunStatus.Succeed, then activates Sharp Vision II on the next tick, and then spams GatherItem() multiple times per second for every tick thereafter. By the time we're at combo #5 and my plugin tries to cast Deep Vigor, the previous GatherItem() call has already been queued up by the game, so it ignores my cast.
I can sorta work around this by throttling my plugin such that it only runs once every 2.2 seconds (which is just enough time for the swing animation), but this obviously isn't the correct way to do this and it's prone to breaking sequence if there's a bit of internet lag that causes a swing to take too long. I also tried checking the return value from GatherItem, but that seems to return true even when GatherItem is blocked by another animation, so that didn't work.
After a while I decided to try to write a plugin to have the bot use Deep Vigor on evaluation leves to make it easier to get the 25% bonus. I seem to have most of it working: OrderBot will run up to a node, my plugin will take over once it detects that the gathering window is open (GatheringWindow.WindowOpen, with a treehook at PoiAction), and it will deal with the logic to cast Sharp Vision II if necessary, hit the lower leveled slot five times, cast Deep Vigor, and then hit the higher leveled slot for an evaluation bonus.
My only issue is that I don't really know how to properly *wait* for things to complete. My PoiAction hook function (Composite?) is being called on every tick/pulse by the bot as it runs through the behavior tree, which is far more frequently than you can actually issue commands to the game because of animation delay. So my function sees that the gathering window is open, returns RunStatus.Succeed, then activates Sharp Vision II on the next tick, and then spams GatherItem() multiple times per second for every tick thereafter. By the time we're at combo #5 and my plugin tries to cast Deep Vigor, the previous GatherItem() call has already been queued up by the game, so it ignores my cast.
I can sorta work around this by throttling my plugin such that it only runs once every 2.2 seconds (which is just enough time for the swing animation), but this obviously isn't the correct way to do this and it's prone to breaking sequence if there's a bit of internet lag that causes a swing to take too long. I also tried checking the return value from GatherItem, but that seems to return true even when GatherItem is blocked by another animation, so that didn't work.
Last edited: