Hi I would like a routine or something, that only push hp/mp pots when needed n do the loot work. since I dont understand how to make this my self (or guess it would take me like 200hours atleast to figure it out). im asking here if someone made something like this be4 I even start with it. Thx for the help Henkan
Right now, the AutoFlask plugin handles basic potting globally, so ExampleRoutine doesn't. Likewise, the bot handles all non-combat tasks, so that is another thing you don't have to worry about in your CR. Here's an almost-empty CR that has all the basic pieces in place and uses two specific skill slots under different cases. The context for that CR can be read about here. it doesn't handle shrines, which the CR now has to handle due to the way they work (you can see shrine logic in ExampleRoutine though). That's a good place to start. You want to cache as much target/mob information before executing coroutine code to avoid the case of objects getting removed in the client, and then the CR trying to access them, because this game has really volatile memory. One thing to note, is the section: Code: // Prevent combat loops from happening by only starting combat if the mob is within 50 units. // Also, don't attack targets too far off-screen. if (pathDistance > 50) return false; Is there specifically to fix a design issue with combat in this game. ExampleRoutine is designed to "handle combat around us" and only tries to move towards mobs to gain LoS as opposed to tracking them down and killing them. If you remove that logic, and don't find a way to "seek-and-destroy" one combat target at a time, you'll notice the bot will get stuck in a back and forth loop, as it's target switching between two targets really fast and is unable to progress. E.g., Mob 1 ----- You ----- Mob 2, and based on which you move towards, the other one ends up being the better target to attack. That issue can be solved with more in-depth targeting, and only considering targets around a specific area as opposed to just trying to kill one target far away (which is something I've tried, but creates too many issues). Consider the case where you want to kill a mob that is visible on screen, but the path to it is really long (cavern tilesets for example). The CR would set the target, and then move towards it, but if any other targets came along, it wouldn't attack them and most likely die. If you re-only evaluate targeting, you'll still end up with the combat cycle problem of two mobs getting switched back and forth as long as there were more than two mobs as possible targets. In our other bots, there are really specific combat rules in terms of when the bot is actually in combat, but that does not apply to PoE. The model I'm now using in the bot is to assume we're a;ways in combat out of town (which is technically correct, as any place you can cast skills, you pretty much can die, even if it's only from user error(not sure if they fixed killing yourself in aura/CI cases yet)) so CRs now have a lot more flexibility to handle the game. In your CR, you can detect if you're punctured and stop moving and return true to signal you're still executing combat logic, and the bot won't do anything else. Before, that was not possible. Anyways, that's just a little insight over a few specific things that might stand out with that routine, if you have any other questions, feel free to ask!