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

Letting ES recharge?

Joined
Apr 13, 2013
Messages
218
Reaction score
2
Anything I can do that will make it stop after combat for a second or two to let the ES recharge? I notice there a lot of times that it will kill a pack and be lowish on ES then itll charge head first into the next pack before the es has a chance to recharge at all. I disabled the mover skill addon because the whirling blades casting wouldnt let it recharge at all and it got a little bit better.. but i still chicken a lot just because it wont let the es charge. This is probably something simple/stupid im missing or I wasnt using player mover right.. but i was still averaging 3 deaths an hour running only T3 maps before I started using chicken.. Is this something having too high of a combat range could cause? Ive been playing with my range settings trying to find something that works with SRS and longer ranges seemed to make to cast from further away.
 
You are in for a rough time if you are trying to bot an ES character without Vaal Pact + Ghost Reaver or High regen + Zealots Oath. Even when people play those types of builds manually it can get rough at times.

Hard to give any advice tho without knowing what build you are trying to run. But to answer your question; no there is nothing i know of that will stop combat to let ES regen. The closest thing i can think of is to use Danger Dodger and have it set up to start kiting if literally anything gets near you.
 
This is actually pretty simple to use a plugin for, but it's a hard sell as a "feature" because of how bad it'd affect clear speeds and the bot running. Not to mention, all the possible unintended side-effects when it comes to taking DoT from terrain or ranged attacks outside the combat radius.

I noticed an unintended side-effect of some recent changes with plugins without GUIs showing up, so new builds will be pushed soon to address that.

Still though, this is basically all you need to make it work (you still need to setup a folder for the file, and make the simple 3rdparty.txt file for the bot to load it, just look at other plugins that come with the bot for example):

Code:
using System.Threading.Tasks;
using System.Windows.Controls;
using log4net;
using Loki.Common;
using Loki.Game;

namespace Loki.Bot.Logic.Plugins
{
    public class WaitForESRecharge : IPlugin
    {
        private static readonly ILog Log = Logger.GetLoggerInstanceForType();

        #region Implementation of IAuthored

        /// <summary> The name of the plugin. </summary>
        public string Name => "WaitForESRecharge";

        /// <summary>The author of the plugin.</summary>
        public string Author => "Bossland GmbH";

        /// <summary> The description of the plugin. </summary>
        public string Description => "A simple plugin that waits for ES to recharge after combat.";

        /// <summary>The version of the plugin.</summary>
        public string Version => "0.0.1.1";

        #endregion

        #region Implementation of IBase

        /// <summary>Initializes this plugin.</summary>
        public void Initialize()
        {
            Log.DebugFormat("[WaitForESRecharge] Initialize");
        }

        /// <summary>Deinitializes this object. This is called when the object is being unloaded from the bot.</summary>
        public void Deinitialize()
        {
            Log.DebugFormat("[WaitForESRecharge] Deinitialize");
        }

        #endregion

        #region Implementation of IRunnable

        /// <summary> The plugin start callback. Do any initialization here. </summary>
        public void Start()
        {
            Log.DebugFormat("[WaitForESRecharge] Start");
        }

        /// <summary> The plugin tick callback. Do any update logic here. </summary>
        public void Tick()
        {
        }

        /// <summary> The plugin stop callback. Do any pre-dispose cleanup here. </summary>
        public void Stop()
        {
            Log.DebugFormat("[WaitForESRecharge] Stop");
        }

        #endregion

        #region Implementation of IConfigurable

        /// <summary>The settings object. This will be registered in the current configuration.</summary>
        public JsonSettings Settings => null;

        /// <summary> The plugin's settings control. This will be added to the Exilebuddy Settings tab.</summary>
        public UserControl Control => null;

        #endregion

        #region Implementation of ILogic

        /// <summary>
        /// Coroutine logic to execute.
        /// </summary>
        /// <param name="type">The requested type of logic to execute.</param>
        /// <param name="param">Data sent to the object from the caller.</param>
        /// <returns>true if logic was executed to handle this type and false otherwise.</returns>
        public async Task<bool> Logic(string type, params dynamic[] param)
        {
            // Only handle the "post_combat_hook" logic request.
            if (type != "post_combat_hook")
                return false;

            // If we're less than 90% ES, just return true, which will block all other tasks running past combat from running.
            // (except those that executed first before this hook)
            if (LokiPoe.Me.EnergyShieldPercent < 90)
            {
                Log.InfoFormat("Now waiting for ES to recharge...");
                return true;
            }

            return false;
        }

        /// <summary>
        /// Non-coroutine logic to execute.
        /// </summary>
        /// <param name="name">The name of the logic to invoke.</param>
        /// <param name="param">The data passed to the logic.</param>
        /// <returns>Data from the executed logic.</returns>
        public object Execute(string name, params dynamic[] param)
        {
            return null;
        }

        #endregion

        #region Implementation of IEnableable

        /// <summary> The plugin is being enabled.</summary>
        public void Enable()
        {
            Log.DebugFormat("[WaitForESRecharge] Enable");
        }

        /// <summary> The plugin is being disabled.</summary>
        public void Disable()
        {
            Log.DebugFormat("[WaitForESRecharge] Disable");
        }

        #endregion

        #region Override of Object

        /// <summary>Returns a string that represents the current object.</summary>
        /// <returns>A string that represents the current object.</returns>
        public override string ToString()
        {
            return Name + ": " + Description;
        }

        #endregion
    }
}

However, that only takes effect once the Routine is done with combat. You'd have to modify the Routine itself if you want to stop doing stuff past a certain range based on ES levels, as otherwise you could just combat chain across the map and never actually restore ES with the plugin. However, there's still considerations to be made then, because you could be facing waves of enemies and would need to fallback far away to get a chance to restore ES, which in itself is another set of logic altogether.
 
Sweet! Appreciate you taking the time to address this for me.
I'll give that a try. I'm just starting and figuring things out really.. so I have low gear and have just been trying to find something that is steady to get a few key items for the next chars I think will do better.
Im running the LL 8 aura SRS build and it actually runs pretty well. Im only farming T4 maps right now trying to gear up and what you're describing actually sounds like it would improve my clear times considerably. Im starting to grasp all of this finally and from what I can see just stopping between combats to let it recharge will let me use whirling blades again. I got it so that it only uses wb in very dangerous situations. When I was letting it move with it, it would take off before ES would start to charge and it would engage the next group at 50% es. Iv seen a lot of chickens because of this situation, so it would at least decrease those. I think playing SRS it should be able to clear out a big enough area that with the right combat range it should trigger it right a lot more often.


You are in for a rough time if you are trying to bot an ES character without Vaal Pact + Ghost Reaver or High regen + Zealots Oath. Even when people play those types of builds manually it can get rough at times.

Hard to give any advice tho without knowing what build you are trying to run. But to answer your question; no there is nothing i know of that will stop combat to let ES regen. The closest thing i can think of is to use Danger Dodger and have it set up to start kiting if literally anything gets near you.

I actually tried to do this. it would stay out of danger and sometimes it would let the shields recharge... but it would prioritize kiting over casting srs so everything would just catch up and kill me while it ran in circles trying to get away.
 
Last edited:
Make sure your Vaal clarity is going off I run the same build and experienced a similar issue till i got it working
 
Back
Top