• Visit Rebornbuddy
  • Coding help to make Summon Raging Spirits Great Again

    Discussion in 'Archives' started by lyvewyre, Mar 29, 2017.

    1. lyvewyre

      lyvewyre Member

      Joined:
      Jan 3, 2013
      Messages:
      418
      Likes Received:
      12
      Trophy Points:
      18
      Hey Guys,

      So I've been trying to revive an SRS build I played back around 2.0 / prophecy. I am running into the old issue, that of the bot spam clicking the skill instead of simulating holding the mouse down (big difference in numbers summoned).

      I had a look through the forums and found a few suggestions such as removing the waits and using Orobourous, but both situations, while improved over normal Old Routine, are still spamming the button and putting out less SRS than it could if it simulated holding the mouse down.

      Now this was originally solved by the user who created a fork of OldRoutine in the thread SRS Routine - https://www.thebuddyforum.com/threads/srs-routine.234498/

      However, that was written before the recent changes to EB and doesn't work anymore. Even after fiddling with similar values, I kept getting lookup errors as the relevant data wouldn't match. Speaking of relevant data, here's the main coding of the skill from SRSRoutine.cs:

      Code:
      if (_summonRagingSpiritSlot != -1 &&
                          _summonRagingSpiritStopwatch.ElapsedMilliseconds >
                          OldRoutineSettings.Instance.SummonRagingSpiritDelayMs)
                      {
                          var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_summonRagingSpiritSlot);
                          var max = skill.GetStat(StatTypeGGG.NumberOfRagingSpiritsAllowed);
                          if (skill.NumberDeployed < max && skill.CanUse())
                          {
                              ++_summonRagingSpiritCount;
      
                              LokiPoe.ProcessHookManager.ClearAllKeyStates();
                              var err1 = LokiPoe.InGameState.SkillBarPanel.UseAt(_summonRagingSpiritSlot, false, targetPosition);
      
                              if (_summonRagingSpiritCount >=
                                  OldRoutineSettings.Instance.SummonRagingSpiritCountPerDelay)
                              {
                                  _summonRagingSpiritCount = 0;
                                  _summonRagingSpiritStopwatch.Restart();
                              }
      
                              if (err1 == LokiPoe.InGameState.UseError.None)
                              {
                                  await Coroutine.Sleep(Utility.LatencySafeValue(500));
      
                                  await Coroutines.FinishCurrentAction(false);
      
                                  return true;
                              }
      
                              Log.ErrorFormat("[Logic] Use returned {0} for {1}.", err1, skill.Name);
                          }
                      }
      
      I can easily update references such as SkillBarPanel to SkillBarHud, but things like LatencySafeValue I am not certain on what this needs to be changed to.

      I tried looking at the Flameblast/BF routines to see how they handle holding mouse down, but it was too confusing for someone not versed in coding.

      So my plea is, can anyone help make SRS great again so that the bot simulates holding the button down rather than spamming it.

      Any assistance is greatly appreciated!
       
    2. FragileAssassin

      FragileAssassin Member

      Joined:
      Apr 13, 2013
      Messages:
      218
      Likes Received:
      2
      Trophy Points:
      18
      Ive been messing with this too.. but everything I do breaks it.. so ive given up on making it better myself.
      idk which version of Orobourous you got, but theres one near the end of the thread that is a bit better.
       
    3. verard

      verard New Member

      Joined:
      Mar 20, 2017
      Messages:
      11
      Likes Received:
      0
      Trophy Points:
      1
      bump, still trying to make my SRS build work properly ._.
       
    4. vendettas

      vendettas Member

      Joined:
      Jun 19, 2013
      Messages:
      231
      Likes Received:
      12
      Trophy Points:
      18
      SRS works fine with Ouroboros routine with the tweaks I posted near the end of the thread. It doesn't cast as the poster asked for, but it works well.
       
    5. lyvewyre

      lyvewyre Member

      Joined:
      Jan 3, 2013
      Messages:
      418
      Likes Received:
      12
      Trophy Points:
      18
      I'll have a look through the thread and check out those tweaks. Ouroboros out of the box does ok, about 75% of what holding down the button would do normally, but once you get some good cast speed the difference becomes apparent.
       

    Share This Page