• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Diamond Flask support

    Discussion in 'Archives' started by poe3210, Apr 8, 2014.

    1. poe3210

      poe3210 New Member

      Joined:
      Mar 25, 2014
      Messages:
      17
      Likes Received:
      0
      Trophy Points:
      0
      tried to do the above by adding this to the flask identifier part of the exile.cs

      You need to register and have one post to see spoilers!
      note the exact name of the flask I have equipped. i wonder if there is a better way to do this. and then, also in the flask logic, added this:

      You need to register and have one post to see spoilers!
      Of course the conditions to use the diamondflask can be changed to your liking.

      Is there a better way to identify diamond flasks? If so this could go into default exile.cs for future support, otherwise this should help you if you need this logic in your bot right now.
       
    2. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      Yeap! Just use Name instead:

      Code:
      private IEnumerable<InventoryItem> DiamondFlasks
              {
                  get
                  {
                      IEnumerable<InventoryItem> inv = LokiPoe.ObjectManager.Me.Inventory.Flasks.Items;
                      return from item in inv
                             let flask = item.Flask
                             where flask != null && item.Name == "Diamond Flask" && flask.CanUse
                             select item;
                  }
              }
      
      The Exile CR contains the flask logic you can reference. In the future, the flask stuff is going to be moved out of CRs into the bot, so you'll be able to just do things like: Utility.DiamondFlasks instead.

      Also, before using the flask, you want to make sure the player doesn't have the buff "flask_utility_critical_strike_chance" on, since you don't want the flask to be used in the middle of another one. Just check over the current CreateFlaskLogic for an example with other flasks.

      For a list of buffs to check, see the BuffDefiinitions for 1.1.2.
       
    3. poe3210

      poe3210 New Member

      Joined:
      Mar 25, 2014
      Messages:
      17
      Likes Received:
      0
      Trophy Points:
      0
      thanks as always :)
       

    Share This Page