What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

AoE Attack on Barrels?

kenjou

New Member
Joined
Oct 15, 2013
Messages
140
Reaction score
0
How do I tell the bot to use AoE on barrels and stuff instead of kicking each barrel individually?
 
How do I tell the bot to use AoE on barrels and stuff instead of kicking each barrel individually?
You would need a custom CR.
something like this

Code:
private async Task<bool> AoeBarrels(int amountOfBarrelsToUseSkill, string skillToUse, int distanceToUse, int distanceNearMe)
        {
            // First Find barrels within DistanceNearMe
            var barrels =
                 LokiPoe.ObjectManager.Objects.OfType<Chest>()
                     .Where(s => !s.IsOpened && s.Distance < distanceNearMe && s.Name == "Barrel")
                     .OrderBy(s => s.Distance).ToList();
            //if there isn't any return false
            if (!barrels.Any())
                return false;
            //If the barrels around is less then our amount to use the skill, return false
            // Please Note This can be inaccurate due to the fact that it's checking in a cirular distance with ME as 
            // Point of origin. Therefore Barrels can be clustered not correctly, and the AOE will skill think they are.
            // This can be fixed by checking barrels.First() and subsequent barrels around it.
            if (barrels.Count < amountOfBarrelsToUseSkill)
                return false;

            var barrel = barrels[0];
            var myPos = LokiPoe.Me.Position;
            var pathDistance = ExilePather.PathDistance(myPos, barrel.Position);
            // If We are further then the distance to use skill return false.
            if (pathDistance > distanceToUse)
            {
                return false;
            }
            // Get skill on skilbar
            var skillAoe = SkillBar.Skills
               .FirstOrDefault(s => s.IsOnSkillBar && s.SkillTags.Contains(skillToUse));
            // If We cannot find skill, return false.
            if (skillAoe == null)
                return false;
             // Use Skill
            if(skillAoe.CanUse())
            {
                var err1 = LokiPoe.InGameState.SkillBarPanel.UseAt(skillAoe.Slot, true, barrel.Position);
                if (err1 != LokiPoe.InGameState.UseError.None)
                {
                    Log.ErrorFormat("[AoeBarrels] UseAt returned {0} for {1}.", err1, skillAoe.Name);
                    return false;
                }
                return true;
            }

            return false;
        }
 
Thx, I just wonder why it doesn't do it by default? I mean barrels mostly appear in groupss so AoE attack would be the best IMHO
 
Thx, I just wonder why it doesn't do it by default? I mean barrels mostly appear in groupss so AoE attack would be the best IMHO
Um, Well from what I gathered talking to pushedx back a few months ago.

HandleBlockingChestsTask takes care of barrels/chests/etc what are within interact distance.
This is so we do not get stuck, take The Docks for example.
There are barrels that are protruding between walk able locations, therefore this was to accommodate this.
Feasibly, this could have been added, but the support that it needs would be time wasting as we would have to accommodate all AoE skills. I mean it's possible, but it's a pain to do, lost the 3-5 secs destroying the blocking chests/etc, and work on other crucial tasks, or waste time trying to get AoE to work.

It's a balance of things, and the end of the day, we're set where we are now, passive skill tree, party, and a bunch of other QoL because things were organized and managed properly by pushedx.

And Honestly a custom CR(Combat Routine) handling this would be better, which is why pushedx didn't add AoE skills, because CR would have to do this logic.

The code I gave is generic, it's always made so one can expand on it.

TL;DR
Shit takes time to configure, test and code. Time was better spent on other things. Custom CR(combat routine) is needed to handle this properly.
 
This was removed as a feature of EB a long ago due to issues arising with casting skills on breakable chests. There's been times where terrain eats projectiles, skills fail to cast since the ground under the barrels near walls is unwalkable, and of course desync (which should mostly be gone now, but remember EB has been around since 2013).

Ice Nova was pretty much the only AoE that reliably worked at the time (but also a skill hardly anyone used), but I'd assume some of the new skills like Ice Crash and the reworked or Shock Nova would suffice. For now, there's no plans to rework this logic into the existing setup, but it shouldn't be too hard for someone to make a task to detect breakable chests nearby and use AoE skills on them if they really wanted it.
 
Back
Top