can any1 please give me a line of conditional code for (if bot is in combat), I just need to add to my routine so it doesnt cast all combat related skills while just moving. tyvm
seriously? no1 care to answer this simple help? bot wasting too much time casting junkies on moving...something like if (LokiPoe.Me.Incombat=true)?
I didn't notice this thread before. There's no such thing in this game. The concept of being "in combat" is left to the routine to decide. For example, you can check if there are mobs around you within a distance, but you could still be under attack from range. You could check to see what the BestTarget was, but that doesn't mean you're safe and not about to attack something because you're moving. Are you in combat because you have something to kill, even if it's further away? Then there's the case of standing on top of some environment hazard. If you're on a permanent patch of burning gerund and taking more damage than you're regenerating, you'll die. In modern mmos, there's usually some GUI display to let you know if you're in combat or not. PoE doesn't have such a thing. In other bots, such a state flag is checked, and the routine is only called under that condition. So there's no clear definition of being in combat that is easily determined. The routine gets logic called every time there is no other task registered before it that needs to execute. That means you decide if you should or shouldn't cast skills inside the routine, because you're controlling what the bot is currently doing at the time you want to check if it's in combat or not.
Ok thx, too much info lol. All u need to say is use the code for mobs around me within a distance like NumberOfMobsNear(LokiPoe.Me, 50) != 0 that is samething as when in combat. I did a little research and got everything working as I would liked it now. thx again.