• Visit Rebornbuddy
  • Mine User Routine

    Discussion in 'Archives' started by jaksemurf, Aug 30, 2017.

    1. jaksemurf

      jaksemurf Member

      Joined:
      Apr 5, 2014
      Messages:
      75
      Likes Received:
      1
      Trophy Points:
      8
      Anybody have a working mine routine or a bandaid for old routine for mine users?

      I've been trying to edit the crap of old routine to make it even halfway passable for my mine char and I'm having no luck. The best I've done thus far is

      A) Being completely detonate totem dependant, which is really slow or

      B) It taking several seconds for the bot to lay and then detonate one mine at a time.

      C) Using an AHK script to spastically hit the detonate button and just place my mine in a regular ability slot. This really makes your char spaz out and probably isn't good for keeping your action rate down.

      It's gotta be possible to make the bot do this with some semblance of smoothness since I've been able to get other builds to work well, but I've yet to be successful. Any thoughts?
       
    2. jaksemurf

      jaksemurf Member

      Joined:
      Apr 5, 2014
      Messages:
      75
      Likes Received:
      1
      Trophy Points:
      8
      For anyone curious, this is the best I've been able to do.

      Does it totally mutilate everything the mine code was trying to do? Yes.

      It also eliminates several seconds of delay that all those fancy logical operators and whatnot were causing. Still looking for someone to help me do better though as this is still kinda terrible.

      Note: This bit of code would probably work very, very poorly if you don't already have the "instant detonate" passive in the tree.


      Code:
                      if (_mineSlot != -1 && myPos.Distance(cachedPosition) < OldRoutineSettings.Instance.MaxMeleeRange)
                      {
                          var skill = LokiPoe.InGameState.SkillBarHud.Slot(_mineSlot);
                        
                          if (skill.CanUse())
                          {
                              var skillName = skill.Name;
      
                              var err1 = LokiPoe.InGameState.SkillBarHud.Use(_mineSlot, true);
      
                              LokiPoe.Input.SimulateKeyEvent(LokiPoe.Input.Binding.detonate_mines, true, false, false);
      
                              Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skillName);
                          }
                      }
       

    Share This Page