• Visit Rebornbuddy
  • Autoflask 3.0

    Discussion in 'Archives' started by naut, Aug 16, 2017.

    Thread Status:
    Not open for further replies.
    1. naut

      naut Community Developer

      Joined:
      Feb 9, 2012
      Messages:
      277
      Likes Received:
      21
      Trophy Points:
      18
      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 !!
       

      Attached Files:

      Urgent2009, stebo, ninjaking and 9 others like this.
    2. h0v3r

      h0v3r Member

      Joined:
      Oct 31, 2014
      Messages:
      123
      Likes Received:
      3
      Trophy Points:
      18
      thanks
       
    3. naut

      naut Community Developer

      Joined:
      Feb 9, 2012
      Messages:
      277
      Likes Received:
      21
      Trophy Points:
      18
      No problem, thanks for the like on the post :rolleyes: if everyone else who downloads it could do that it would be much appreciated.
       
    4. diabloiseasy

      diabloiseasy Member

      Joined:
      Aug 23, 2012
      Messages:
      169
      Likes Received:
      2
      Trophy Points:
      18
      Well played. Not using bismuth?
       
    5. h0v3r

      h0v3r Member

      Joined:
      Oct 31, 2014
      Messages:
      123
      Likes Received:
      3
      Trophy Points:
      18
      how can we add Bismuth Flask?
       
    6. Aurel

      Aurel New Member

      Joined:
      Jun 13, 2012
      Messages:
      18
      Likes Received:
      1
      Trophy Points:
      3
      +Bismuth Flask

      +Diamond Flask
      +Silver Flask
      +Atziri's Promise

      Last three only used if any hostile mobs are present.
       

      Attached Files:

      h0v3r likes this.
    7. suzkata

      suzkata Member

      Joined:
      Aug 16, 2017
      Messages:
      62
      Likes Received:
      3
      Trophy Points:
      8
      can u do divination distilate? :)
       
    8. ploxie

      ploxie New Member

      Joined:
      Jul 20, 2013
      Messages:
      22
      Likes Received:
      1
      Trophy Points:
      3
      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;
             }
      }
      
       
      Aurel likes this.
    9. Aurel

      Aurel New Member

      Joined:
      Jun 13, 2012
      Messages:
      18
      Likes Received:
      1
      Trophy Points:
      3
      ^ correct. Fixed.
       
    10. happyfriet

      happyfriet Active Member

      Joined:
      Jan 14, 2013
      Messages:
      1,271
      Likes Received:
      19
      Trophy Points:
      38
    11. happyfriet

      happyfriet Active Member

      Joined:
      Jan 14, 2013
      Messages:
      1,271
      Likes Received:
      19
      Trophy Points:
      38
      what do I add if I want the wise oak used aswell when mobs are in proximity ?
       
    12. ploxie

      ploxie New Member

      Joined:
      Jul 20, 2013
      Messages:
      22
      Likes Received:
      1
      Trophy Points:
      3
      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.
       
    13. happyfriet

      happyfriet Active Member

      Joined:
      Jan 14, 2013
      Messages:
      1,271
      Likes Received:
      19
      Trophy Points:
      38
      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.
       
    14. ploxie

      ploxie New Member

      Joined:
      Jul 20, 2013
      Messages:
      22
      Likes Received:
      1
      Trophy Points:
      3
      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;
                                       }
                  }
      
       
    15. happyfriet

      happyfriet Active Member

      Joined:
      Jan 14, 2013
      Messages:
      1,271
      Likes Received:
      19
      Trophy Points:
      38
      yea - was just about to post that lol, figured it out aswell :D
      Thx 4 ze help
       
    16. kuskner

      kuskner Member

      Joined:
      Oct 12, 2013
      Messages:
      521
      Likes Received:
      2
      Trophy Points:
      18
      How do I get it to use Dying Sun flask?
       
    17. ninjaking

      ninjaking New Member

      Joined:
      Dec 18, 2015
      Messages:
      8
      Likes Received:
      1
      Trophy Points:
      3
      Did you have any luck with dying sun mate?
       
    18. Fujiyama

      Fujiyama Member

      Joined:
      Mar 27, 2014
      Messages:
      485
      Likes Received:
      4
      Trophy Points:
      18
      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.
       
    19. ploxie

      ploxie New Member

      Joined:
      Jul 20, 2013
      Messages:
      22
      Likes Received:
      1
      Trophy Points:
      3
      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.
       
    20. ninjaking

      ninjaking New Member

      Joined:
      Dec 18, 2015
      Messages:
      8
      Likes Received:
      1
      Trophy Points:
      3
      I assume you can do the same with topaz no?
       
    Thread Status:
    Not open for further replies.

    Share This Page