This is an amazing plugin with huge possibilities - awesome contribution from toNyx (shameless top of the post plug here - donate to him
here) - making the bot one step closer to its true manifestation Skynet! As my very small contribution I am going to show you how to create some default flask settings.
Click the
SHOW button below for the Real Basics of installing a plugin:
[HIDE]
1. Copy the ZIP file to your 3rdParty directy (do NOT unzip)
2. Start Exile Buddy
3. Look for the Settings tab at the top
4. Click the down arrow beside Plugins in the left column
5. Scroll down to Flask Helper and Click on it
6. In the right side window you can see the Flask Helper and the Enable Button - tick the Enable button
IMPORTANT NOTE: POE is a complicated game and the bot is even more complicated. If you want to be successful then you will need to read a lot and learn a lot. If you had to follow this guide for installing a plugin, then I can tell you for free that you haven't spent enough time reading the other guides before coming here. Do yourself a favour and try to read as much as possible before asking questions. Your questions have all been answered on this forum - search it and you will find them.
[/HIDE]
NOTE: If you are using Flask nodes to extend the length and power of your Flasks, then you can probably set all of the values below lower as your Flasks effects will last longer, giving them more time to recharge.
The default settings below are mainly for melee characters, for casters you would still use the same conditions, but mostly increase the distance values.
So - here we go - once you have the plugin enabled lets start easy with Life Flask:
Life Flasks
Pick "Life Flask" from the drop down.
IGNORE the box with Selector and a line of code in it - we
DON'T want to touch that or things will go crazy and you will die! (this line of code is simply the bots way of identifying the flask)
Simply Tick
Enable Usage - now the bot knows you have a Life Flask.
Next we need to tell it when to use them - so click in the table (blank space) just underneath CONDITION and paste the following:
Then tick ENABLED next to it.
Now when your health goes below 80% the bot uses your life flask.
Instant Life Flasks
Do the same for Instant Life Flask, but change 80 to 65. If you find you are still dying because you are too squishy, then up the values.
Mana Flask
If you have mana reserved, then you need to adjust this so that it is less than your reserved percentage otherwise the bot will keep using your Mana Flask:
Quicksilver Flask
If you only want to use this when you get value from it (i.e. when we will run at least a little bit before needing to stop to kill mobs) - we check there are no mobs within a certain distance of us (defined units as "feet" or f for short - check
these images to get an idea of what distances look like on screen) in this case 70 units and hit it:
FH.NumberOfMobsNear(me,70) < 1
As you can see the common format for these settings involves the distance from
me, a type of mob and a number of mobs:
FH.NumberOfMobsNear(me,distance_in_units) > number_of_mobs
If you have quick refills with Surgeons on Crit, then you might want to spam Quicksilver off cooldown:
FH.NumberOfMobsNear(me,70) < 1
FH.NumberOfMobsNear(me,70) > 0
Diamond Flask, Vessel of Vinktar (And most other offensive flasks)
We want our Crit boosted when there are a few mobs, or tough mobs so:
FH.SpecificRarityMobAround(Rarity.Unique, 20) > 0
FH.SpecificRarityMobAround(Rarity.Rare, 20) > 0
FH.SpecificRarityMobAround(Rarity.Magic, 25) > 2
FH.NumberOfMobsNear(me, 30) > 4
If you find you are always at max flask charges, then lower the 2,4 (you will spend flasks charges more quickly) if you keep running out of charges during a fight then increase them. For
Vessel of Vinktar you will also want Energy Shield Detection:
me.EnergyShieldPercent < 65
Granite Flask (And most other defensive flasks)
Defensive flasks we want to increase the range a bit because of those annoying jumping things and other fast moving mobs.
FH.SpecificRarityMobAround(Rarity.Unique, 50) > 0
FH.SpecificRarityMobAround(Rarity.Rare, 50) > 0
FH.SpecificRarityMobAround(Rarity.Magic, 55) > 2
FH.NumberOfMobsNear(me, 60) > 4
You will also want some health or Energy shield protection:
or
me.EnergyShieldPercent < 80
Dispelling (Remove xxxxx)
Each of your flasks should have some kind of dispel e.g. Burning, Shocked, Poisoned etc - to make the bot use the dispel you should paste the relevant condition below into to the flask conditions for the flask it is on:
FH.IsBleeding
FH.IsShocked
FH.IsBurning
FH.IsPoisoned
FH.IsCursed
FH.IsChilledOrFrozen
So if your Life Flask has Removes Bleeding, then you add FH.IsBleeding as a condition to the Life Flask.
Resistance Flasks (Ruby, Topaz etc)
Resistance Flasks are very dependent upon the Map level and danger level you are running - increase the mob count an the distance if you are running EZ game EZ life settings, reduce them if you are pushing higher Maps where insta-death is a regular occurrence. If you are running a CI build you want to have these up before pretty much any fight and any time that you experience the related debuff like Burning etc. I have used the mobs more than >2 setting along with the Unique and Rares - smaller distances as hopefully most stuff is dead before it gets within 8f, you should increase or decrease this depending on how much of the time you are out of Flask Charges.
Ruby Flask
FH.SpecificRarityMobAround(Rarity.Unique, 20) > 0
FH.SpecificRarityMobAround(Rarity.Rare, 20) > 0
FH.NumberOfMobsNear(me, 8) > 2
FH.IsBurning
You should also add your Flasks's Dispel e.g. Removed Shock on Use
It is worth adding in an "O Shit" press all flasks button for low health:
or low Energy Shield
me.EnergyShieldPercent < 80
Spamming Flasks Off Cooldown
If you are OP, then you probably just want to spam resistance and quicksilver all the time, so this is one way you can do that:
FH.NumberOfMobsNear(me,70) < 1
FH.NumberOfMobsNear(me,70) > 0
Essentially telling the bot to use the flask if there are no mobs within 70f or if there is 1 or more mobs within 70f i.e. all the time. FlaskHelper will detect when your buff has expired and recast appropriately - awesome right!? (I know this should work with 1 line of code, but it just doesn't
NOTE: If you are using Flask nodes to extend the length and power of your Flasks, then you can probably set all of the values below lower as your Flasks effects will last longer, giving them more time to recharge.
WANNA GET SERIOUS ABOUT YOUR FLASKS? ADVANCED USAGE - ZONES
This is for people who want to min max their setup or c/hour or reach level 100 - your average botter can skip all this stuff. The above setup is more than enough to keep you alive in most situations.
We have talked about single conditions and you have seen the examples - but you can get a lot more complicated with Flask Helper by setting what i am going to call "zone" conditions.
For this example I am going to use Vessel of Vinktar - a nice offence and defensive flask with 1 big drawback - it only has
1 charge per fight - so we really want to fine tune it a bit to make sure we dont use it on some white mobs when the big bad unique boss mob is just around the corner. If we look at a standard rule:
me.EnergyShieldPercent < 80
If some solo jumping random white mob gets a lucky hit in it could hit us for 20% of our ES - we don't want to pop VoV in this situation as it will be a waste and take ages to refill. We set zones to ensure we use the VoV at the right time
So take a look at the rules below and I will explain the thinking behind them.
me.EnergyShieldPercent < 80 and FH.NumberOfMobsNear(me, 30) > 3
me.EnergyShieldPercent < 80 and FH.SpecificRarityMobAround(Rarity.Magic, 25) > 2
me.EnergyShieldPercent < 75 and FH.SpecificRarityMobAround(Rarity.Rare, 20) > 0
me.EnergyShieldPercent < 70 and FH.SpecificRarityMobAround(Rarity.Unique, 20) > 0
me.EnergyShieldPercent < 35
Now we will pop VoV in the much lower
oh shit 35% ES zone, no matter what (
me.EnergyShieldPercent < 35) - we assume that there are enough mobs around us to do the last 35% damage - and easily kill us.
But we can stop the VoV from popping if a single white mob that hits us for a lucky 20% in the original setup by ensuring that we only pop the VoV if there are also now at least 3 mobs within 30f of us (
me.EnergyShieldPercent < 80 and FH.NumberOfMobsNear(me, 30) > 3).
The rest of the settings take into account Magic,Rare and Unique mobs - lowering the ES% and the range in zones (these kind of ranges 80,75,70 are caster ranges - melee can definitely lower the ranges and up all of the minimum mob numbers as well). You get the idea hopefully and can see how these zones will stop you from wasting the big 1 use flasks at the wrong time.
Another good example is
Atziri's Promise this flask enables you to leech life from mobs. Our standard basic setup might include an
oh shit:
Code:
me.EnergyShieldPercent < 65
But actually we only want to use the flask when we can get some leeching from it -
not for example when we are walking on burning ground or some other environmental effect - we
NEED mobs around us to
leech from. So the setup needs a bit of tweaking so that it only triggers when there are mobs near us (for example more than 2 mobs within 60f) that we can kill to leech life from:
Code:
me.EnergyShieldPercent < 65 and FH.NumberOfMobsNear(me,60) >2
But ... we also want it for the boss fights ... and often the boss is in a room and the white trash dies before you get to the boss - our >2 mobs setting wont trigger against the single boss... so we need to combine in some of the other bits from before:
Code:
me.EnergyShieldPercent < 65 and ((FH.NumberOfMobsNear(me,60) >2) or (SpecificRarityMobAround(Rarity.Rare, 40) > 0) or (FH.SpecificRarityMobAround(Rarity.Unique, 40) > 0))
HOW TO ADD NEW FLASKS
New leagues mean new flasks - to add these yourself rather than pester tNyx you should do the following:
Already known flask auras (so you can skip the code part below and go straight to the setup:
Divination Distillate Aura:
unique_flask_divination_distillate
The Overflowing Chalice Sulpher Flask Aura:
overflowing_chalice
Rotgut Quicksilver Flask Aura:
flask_utility_sprint
Kiaras Determination Aura:
kiaras_determination
Dying Sun:
unique_flask_dying_sun
If your flask is listed above, then you can skip straight to step 11.
- In the left hand menu in EB click on the DevTab
- Delete EVERYTHING in the left side CODE window
- Paste in all of the following code into the big area Code:
Code:
using System;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Threading.Tasks;
using Buddy.Coroutines;
using Loki;
using Loki.Common;
using Loki.Game;
using Loki.Game.GameData;
using Loki.Bot;
using Loki.Bot.Pathfinding;
using log4net;
public class RuntimeCode
{
private static readonly ILog Log = Logger.GetLoggerInstanceForType();
private Coroutine _coroutine;
public void Execute()
{
using(LokiPoe.AcquireFrame())
{
ExilePather.Reload();
}
// Create the coroutine
_coroutine = new Coroutine(() => MainCoroutine());
// Run the coroutine while it's not finished.
while(!_coroutine.IsFinished)
{
try
{
using(LokiPoe.AcquireFrame())
{
_coroutine.Resume();
}
}
catch (Exception ex)
{
Log.ErrorFormat("[Execute] {0}.", ex);
break;
}
}
// Cleanup the coroutine if it already exists
if (_coroutine != null)
{
_coroutine.Dispose();
_coroutine = null;
}
}
private async Task<bool> UserCoroutine()
{
Log.InfoFormat("UserCoroutine ");
foreach (var aura in Loki.Game.LokiPoe.Me.Auras)
Log.Error(aura.InternalName);
return false;
}
private async Task MainCoroutine()
{
while (true)
{
if (LokiPoe.IsInLoginScreen)
{
// Offload auto login logic to a plugin.
foreach (var plugin in PluginManager.EnabledPlugins)
{
await plugin.Logic("login_screen");
}
}
else if (LokiPoe.IsInCharacterSelectionScreen)
{
// Offload character selection logic to a plugin.
foreach (var plugin in PluginManager.EnabledPlugins)
{
await plugin.Logic("character_selection");
}
}
else if (LokiPoe.IsInGame)
{
// Execute user logic until false is returned.
if(!await UserCoroutine())
break;
}
else
{
// Most likely in a loading screen, which will cause us to block on the executor,
// but just in case we hit something else that would cause us to execute...
await Coroutine.Sleep(1000);
continue;
}
// End of the tick.
await Coroutine.Yield();
}
}
}
- Press the RUN CODE button at the bottom right of the window.
- Look in your main EB window at the visual log of what the bot does and you should see some new red text similar (but not the same as):
UserCoroutine
player_aura_energy_shield
herald_of_ash
flask_utility_haste
- Congrats you are now a coder and can see what auras you have around you at all times when you press the RUN CODE button.
- While in your HO, press the flask button for the flask you want to add and then switch to the EB DevTab and press the RUN CODE button
- You should see the red list again - but this time there should be a NEW entry. I used Kiara's Determination and my output is now:
UserCoroutine
player_aura_energy_shield
herald_of_ash
kiaras_determination
flask_utility_haste
- Awesome right!? But WTF are we doing all this? Well because FlaskHelper is so awesome it automatically detects when you do and do NOT have the aura and that is what stops it simply spamming the aura constantly.
- Back to business - now we are going to add the new flask
- Click on Flask Helper in the left menu in EB
- Click the downward arrow beside FLASKS
- Scroll downwards in the FlaskHelper window and you will see a GIANT full width button which reads NEW FLASK it is so big that you probably won't see it the first time you look - it is there I promise you.
- Click NEW FLASK and a new section appears
- In the FLASK NAME box type the Name of the Flask - for me I typed: Kiaras Determination (do NOT use ' it sometimes makes code go funny)
- In the AURA NAME box you now want to paste from your EB visual log window the name of the aura: kiaras_determination
- Most new flasks are instant - so tick the Instant box if yours is
- Almost there - now you have your new flask listed at the bottom of the flasks list we need to tell FlaskHelper how to find our new flask.
- Scroll down your list of flasks to the bottom and click on the new one. Tick ENABLE
- Now you need to add in the SELECTOR - this is essentially how the bot finds the flask to press
- In the SELECTOR box paste the following:
Code:
f.Rarity == Rarity.Unique and f.FullName.Contains("xxx")
- There are 3 xxx's in the code above which you MUST change to your Flask name - this time you can use the ' so for my Kiara's Determination the code looks like this:
Code:
f.Rarity == Rarity.Unique and f.FullName.Contains("Kiara's Determination")
(make sure you leave the "" surrounding the name).
- Great work if you got this far - you read more than 99% of the population of earth today!
- now scroll to the top of this post and add in your CONDITIONS and you have yourself a working shiny new flask
I hope you found this guide useful - none of it would be possible without tNyx - so my thanks go to him (shameless bottom of the post plug here - donate to him
here)