• Visit Rebornbuddy
  • Totemizer + Vaal Grace and Vaal Discipline

    Discussion in 'Archives' started by Hatefull, Sep 6, 2015.

    1. Hatefull

      Hatefull Member

      Joined:
      Jun 16, 2012
      Messages:
      74
      Likes Received:
      1
      Trophy Points:
      8
      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.
       

      Attached Files:

      Last edited: Sep 6, 2015
    2. Sebozz

      Sebozz Banned

      Joined:
      Aug 19, 2015
      Messages:
      398
      Likes Received:
      0
      Trophy Points:
      0
      using only vaal grace+ vaal haste for max crit flame totem witch :)
       
    3. Hatefull

      Hatefull Member

      Joined:
      Jun 16, 2012
      Messages:
      74
      Likes Received:
      1
      Trophy Points:
      8
      yeah that doesn't help at all...but thanks for the info...
       
    4. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      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.
       
    5. Sebozz

      Sebozz Banned

      Joined:
      Aug 19, 2015
      Messages:
      398
      Likes Received:
      0
      Trophy Points:
      0
      if it working, could you send me the zip with grace+vaal?
       
    6. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      It's not hard to copy and paste...
       
    7. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      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
       
    8. Hatefull

      Hatefull Member

      Joined:
      Jun 16, 2012
      Messages:
      74
      Likes Received:
      1
      Trophy Points:
      8
      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
       
    9. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      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.
       
    10. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,770
      Likes Received:
      35
      Trophy Points:
      48
      ^ This Vaal spells have charges.
       
    11. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Yea totally forgot aboot that, tony has his shreedies this morning.
       
    12. Sebozz

      Sebozz Banned

      Joined:
      Aug 19, 2015
      Messages:
      398
      Likes Received:
      0
      Trophy Points:
      0
      any news here? would be really cool if the 2+ aura version work :)
       

    Share This Page