Basically, the function logic is setup in a way to basically return do not use if the conditions are not being met, so by the time you get to the end, you know you should be using it. You can implement the checks different ways if you want, but whats there now was just the most simple way with comments to show the process.
private bool ShouldUseDivinationDistillate()
I understand the rarity bit, thought that may be the thing to do anyway, just didnt know if it was that simple and if it would still use it on uniques and not just rare mobs.Click to expand…This code :
Code:// This logic should use a Divination Distillate when needed. /*new Decorator(ret = _flaskCd.IsFinished && !Me.HasAura(unique_flask_divination_distillate) && unt() != 0 && ShouldUseDivinationDistillate(), new Action(ret = e(); _flaskCd.Reset(); )),*/should become
The only way Ive managed to get it to use it is if I fool the bot into thinking its a mana flask, but then it will only use it when im out of mana obviously.
private bool ShouldUseDivinationDistillate()
Edit: Also, if I get this fixed, is there a simple way I can tell the bot to use the flask on rare mobs as well as uniques?
i dont see what Im supposed to change to get it working from your reply.
return true;Click to expand…this seems a bit clunky… the bot willonlyuse it vs Non-unique mobs, which is absolutely not the purpose. It should return false.
Will use your flask on a Valid Rare target or higher (so rare & unique) if this one have less than 8% hp to make sure the flask aura is still on when you kill it
if (target.Rarity != Rarity.Unique)Click to expand…to
Code:// This logic should use a Divination Distillate when needed. new Decorator(ret = _flaskCd.IsFinished && !Me.HasAura(unique_flask_divination_distillate) && DivinationDistillate.Count() != 0 && ShouldUseDivinationDistillate(), new Action(ret = DivinationDistillate.First().Use(); _flaskCd.Reset(); )),Then, you can change the conditions in ShouldUseDivinationDistillate as needed. However, as toNyx pointed out, your modifications dont make sense current.
The only way Ive managed to get it to use it is if I fool the bot into thinking its a mana flask, but then it will only use it when im out of mana obviously.
By default, you just need to uncomment the code section for that flask in Exile to get the bot to use it under the current conditions.
I understand the rarity bit, thought that may be the thing to do anyway, just didnt know if it was that simple and if it would still use it on uniques and not just rare mobs.
return (target != null && target.Rarity = Rarity.Rare && target.HealthPercent 8);
(You must log in or sign up to reply here.)
Discussion inExilebuddy Supportstarted byOli31
this seems a bit clunky… the bot willonlyuse it vs Non-unique mobs, which is absolutely not the purpose. It should return false.
Edit: Also, if I get this fixed, is there a simple way I can tell the bot to use the flask on rare mobs as well as uniques?Click to expand…Edit this line :
Code:private IEnumerableInventoryItem DivinationDistillate get IEnumerableInventoryItem inv = LokiPoe.PlayerInventory.Flasks.Items; return from item in inv let flask = item.Flask where flask != null && item.FullName == Divination Distillate && flask.CanUse select item; private bool ShouldUseDivinationDistillate() var target = BestTarget; // Make sure we have a target! if (target == null) return false; // Never use on a non-unique. if (target.Rarity != Rarity.Unique) return true; // If it has more than 8% health, dont use the flask. if (target.HealthPercent 8) return false; // If we get here, use the flask. return true; private Composite CreateFlaskLogic() return new PrioritySelector( // This logic should use a Divination Distillate when needed. /*new Decorator(ret = _flaskCd.IsFinished && !Me.HasAura(unique_flask_divination_distillate) && unt() != 0 && ShouldUseDivinationDistillate(), new Action(ret = e(); _flaskCd.Reset(); )),*/Many thanks.
So Ive tried everything to get the bot to take the flask under the right circumstances and it just wont use it.
i dont see what Im supposed to change to get it working from your reply.
If you only want it to be used on Uniques, then you leave the code as is from the default CR. If you want to use it on rares and uniques, youd use :
Can someone help me with my exile.cs?
if (target.Rarity Rarity.Rare)Click to expand…EDIT:
Just replace your actual ShouldUseDivinationDistillate() method by this one, should work as intented
// Never use on a non-unique/non-rare. if (target.Rarity != Rarity.Unique && target.Rarity != Rarity.Rare) return false;
return (target != null && target.Rarity = Rarity.Rare && target.HealthPercent 8);
Can someone help me with my exile.cs?
Code:private IEnumerableInventoryItem DivinationDistillate get IEnumerableInventoryItem inv = LokiPoe.PlayerInventory.Flasks.Items; return from item in inv let flask = item.Flask where flask != null && item.FullName == Divination Distillate && flask.CanUse select item; private bool ShouldUseDivinationDistillate() var target = BestTarget; // Make sure we have a target! if (target == null) return false; // Never use on a non-unique. if (target.Rarity != Rarity.Unique) return true; // If it has more than 8% health, dont use the flask. if (target.HealthPercent 8) return false; // If we get here, use the flask. return true; private Composite CreateFlaskLogic() return new PrioritySelector( // This logic should use a Divination Distillate when needed. /*new Decorator(ret = _flaskCd.IsFinished && !Me.HasAura(unique_flask_divination_distillate) && unt() != 0 && ShouldUseDivinationDistillate(), new Action(ret = e(); _flaskCd.Reset(); )),*/Many thanks.