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

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Autoflask 3.0

Status
Not open for further replies.

naut

Community Developer
Joined
Feb 9, 2012
Messages
277
This is a work in progress that honestly I may never bother finishing lol, plugin supports most flasks however the UI is not updated to allow easy input of desired flask cooldowns as was included for the quicksilver flask upon the new release. You can edit the autoflask file if you wish to change the cooldowns timers.

Installation Instructions:
Open EB Folder --> 3rd party --> Legacy --> Delete Autoflask folder --> Replace with unzipped download
File to edit cooldown timers is found in the same location

Big thanks and congratulations to pushedx on the new release !! :rolleyes::rolleyes::rolleyes::rolleyes:

Goodluck and happy botting !!
 

Attachments

+Bismuth Flask

+Diamond Flask
+Silver Flask
+Atziri's Promise

Last three only used if any hostile mobs are present.
 

Attachments

I think there is a bug with the Bismuth flask.
Should'nt this:
Code:
//Bismuth
if (LokiPoe.Me.HealthPercent < AutoFlaskSettings.Instance.HpFlaskPercentTrigger)
{
      if (FlaskHelper(_graniteFlaskCd, 5000, BismuthFlasks))
      {
            return;
       }
}

Be this:
Code:
//Bismuth
if (LokiPoe.Me.HealthPercent < AutoFlaskSettings.Instance.HpFlaskPercentTrigger)
{
      if (FlaskHelper(_bismuthFlaskCd, 5000, BismuthFlasks))
      {
            return;
       }
}
 
Code:
if (LokiPoe.Me.HealthPercent < AutoFlaskSettings.Instance.HpFlaskPercentTrigger || (NumberOfMobsNear(LokiPoe.Me, 40) >= 1))
{
         if (FlaskHelper(_bismuthFlaskCd, 5000, BismuthFlasks))
         {
                 return;
         }
}

Not sure, but i think this is it.
You can change the "1" to the minimum monsters required to activate.
 
hmm -getting wall of red text with that

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
 
hmm -getting wall of red text with that

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Sorry, my bad.

I was basing it on some out-commented code.

I tried it myself now and the correct way to do it (as far as I know) is this:

Find this part of code inside AutoFlask.cs:
Code:
if (LokiPoe.Me.EnergyShieldPercent < AutoFlaskSettings.Instance.HpFlaskPercentTrigger)
            {
                if (FlaskHelper(_jadeFlaskCd, 6200, JadeFlasks))
                {
                    return;
                }
            }
            if (LokiPoe.ObjectManager.Objects.OfType<Monster>()
            .Where(m => m.DistanceSqr < 50 * 50)
            .Count(m => m.IsAliveHostile) > 0)
            {
                                //diamond
                                if (FlaskHelper(_diamondFlaskCd, 4500, DiamondFlasks))
                                {
                                    return;
                                }
                                //silver
                                if (FlaskHelper(_silverFlaskCd, 5000, SilverFlasks))
                                {
                                    return;
                                }
                                // amethyst
                                if (FlaskHelper(_amethystFlaskCd, 3500, AmethystFlasks))
                                {
                                    return;
                                }                                 
            }

And replace it with this:

Code:
if (LokiPoe.Me.EnergyShieldPercent < AutoFlaskSettings.Instance.HpFlaskPercentTrigger)
            {
                if (FlaskHelper(_jadeFlaskCd, 6200, JadeFlasks))
                {
                    return;
                }
            }
            if (LokiPoe.ObjectManager.Objects.OfType<Monster>()
            .Where(m => m.DistanceSqr < 50 * 50)
            .Count(m => m.IsAliveHostile) > 0)
            {
                                //diamond
                                if (FlaskHelper(_diamondFlaskCd, 4500, DiamondFlasks))
                                {
                                    return;
                                }
                                //silver
                                if (FlaskHelper(_silverFlaskCd, 5000, SilverFlasks))
                                {
                                    return;
                                }
                                // amethyst
                                if (FlaskHelper(_amethystFlaskCd, 3500, AmethystFlasks))
                                {
                                    return;
                                }

                                 if (FlaskHelper(_bismuthFlaskCd, 5000, BismuthFlasks))
                                 {
                                     return;
                                 }
            }
 
Would be great if you put this on GitHub or something, so those of us that are capable could easily add and share the flasks we want to use if there are missing.
 
For dying sun (actually all ruby flasks):

Add this at the start of the class:
Code:
private readonly Stopwatch _rubyFlaskCd = new Stopwatch();

Add this at the end of the class:
Code:
public static IEnumerable<Item> RubyFlasks
        {
            get
            {
                var items = LokiPoe.InstanceInfo.GetPlayerInventoryItemsBySlot(InventorySlot.Flasks);
                return from item in items
                       where item != null && item.Name == "Ruby Flask" && item.CanUse
                       select item;
            }
        }

And add this at the end of the "Tick()" method:
Code:
 if (LokiPoe.Me.HealthPercent < AutoFlaskSettings.Instance.HpFlaskPercentTrigger)
            {
                if (FlaskHelper(_rubyFlaskCd, 6000, RubyFlasks))
                {
                    return;
                }
            }

I haven't tested the code. But this should do the trick. Let me know if you get any errors, then it might just be some typo.
 
Status
Not open for further replies.
Back
Top