So i wanted to rework the Totemizer Routine a bit to have it working with 2 Vaal Auras. First thing i realized was, that in the original Totemizer Routine it would cast the Auras as soon as they are available, i commented out that part and got a single Vaal Discipline Aura working with the threshold. I then bought another Vaal Discipline and tried to have 2 for better surviveability in the case 1 wouldnt be enough. Figured out this doesn't work, the routine would never cast the second Vaal Discipline. Fiddled around with the code a bit but couldn't get it running. Next i thought i would just add a different aura, in this case Vaal Grace and give both auras a different threshold. So i copied all the Vaal Discipline code and changed it for Vaal Grace. And see, Vaal Grace being cast as intended but then i realized Vaal Discipline wouldn't be cast anymore. So i changed the values, tried this and that without success. Now, then i thought it doesn't read the threshold values correct from the GUI, so i hardcoded them into the Totemizer.cs (That's why GUI values wont work in the following Plugin). But still, It only casts Vaal Grace. So, anyone with more coding knowledge (pushedx, Tony, DBF, exvault <3), what do i miss? Why can't i cast two different (or even two same) Vaal Auras? I hope someone can help me out there. I think even more people, not just me, could find that addition handy. Here's the Plugin with my little changes: All credits to tozededao because i just messed around with his code.
Might need to do a has buff before it can propagate the skill to be used. Code: if (skill.CanUse() && (LokiPoe.Me.EnergyShieldPercent <= 60) &&[B] !LokiPoe.Me.HasBuffFrom("Vaal Discipline"[/B]) Try that and let me know if it works, do the same for the other vaal skills.
Ok totemizer is running on old code. The way pushedx does it now will work fine. Declare Code: private readonly Stopwatch _vaalStopwatch = Stopwatch.StartNew(); then change all your vaal casts to this Code: // Auto-cast any vaal skill at the best target as soon as it's usable. if (TotemizerSettings.Instance.AutoCastVaalSkills && _vaalStopwatch.ElapsedMilliseconds > 1000) { foreach (var skill in LokiPoe.InGameState.SkillBarPanel.Skills) { if (skill.SkillTags.Contains("vaal")) { if (skill.CanUse()) { var slot; if(_vaalDiscSlot != -1 && LokiPoe.Me.EnergyShieldPercent <= 60 && TotemizerSettings.Instance.VaalDiscTrigger) { slot =_vaalDiscSlot; goto UseSkill; } if(_vaalGraceSlot != -1 && LokiPoe.Me.EnergyShieldPercent <= 75 && TotemizerSettings.Instance.VaalGraceTrigger) { slot =_vaalGraceSlot; goto UseSkill; } UseSkill: await DisableAlwaysHiglight(); var err1 = LokiPoe.InGameState.SkillBarPanel.UseAt(skill.Slot, false, cachedPosition); if (err1 == LokiPoe.InGameState.UseError.None) { await Coroutine.Sleep(Utility.LatencySafeValue(250)); await Coroutines.FinishCurrentAction(false); await Coroutine.Sleep(Utility.LatencySafeValue(1000)); return true; } Log.ErrorFormat("[Logic] Use returned {0} for {1}.", err1, skill.Name); } } } _vaalStopwatch.Restart(); } Check to see that Code: TotemizerSettings.Instance.AutoCastVaalSkills exists, I added this on a whim
Thanks for all the Input DBF! Very much appreciated. In the end i just used: Code: if(_vaalDiscSlot != -1 && LokiPoe.Me.EnergyShieldPercent <= (60)) { LokiPoe.InGameState.SkillBarPanel.Use(_vaalDiscSlot, true); } if(_vaalGraceSlot != -1 && LokiPoe.Me.EnergyShieldPercent <= (80)) { LokiPoe.InGameState.SkillBarPanel.Use(_vaalGraceSlot, true); } nothing more, working as intended
Ah Ok, Glad to hear it. But it's going to stutter because you don't have checks to see when you can use it, therefore it's going to spam regardless, eating cpu cycles. I might be wrong though. But on a machine running 12 clients, every little bit counts.