Just a quick question, probably answered somewhere that I might have missed. Is there a way for a plugin to stop the bot base completely, do something on its own (like using the navigator and other API stuff) and then resume the botbase? What's the cleanest way to do this?
Can't you just hook it? I don't know about cutting it off completely, maybe treeroot? But you could kill it early. You could hook into precombat logic and return true which would cut off the rest of the botbases logic below that. which I believe would include movement.
AFAIK plugins are run before the main BotBase logic anyway, so I think a hook isn't necessary. I think if you always return true with your composite in your plugin, nothing below it would call. Something like: Code: return new PrioritySelector( new Decorator(ret => ShouldStopbotbase, new Action(r => { Your logic here or in more priority selectors } ), new ActionAlwaysSucceed() ) );
I assume your using treehooks. If you reach a actionalwaysucced then it wont go any further down a priorityselector which is what the main logic uses.
Thanks. I know about the action succeed thing, but my question is more about where should I hook it? What I would like to achieve is to take control off FateBot for a while, do something with navigation and stuff, then give FateBot control again. But this must happen even if FateBot is outside of combat waiting in a town. What I want to guarantee is that FateBot won't do something while the plugin is in control.