• Visit Rebornbuddy
  • Summon Golems BEFORE casting Auras

    Discussion in 'Archives' started by demonviper, Mar 27, 2017.

    1. demonviper

      demonviper Active Member

      Joined:
      Apr 8, 2014
      Messages:
      534
      Likes Received:
      56
      Trophy Points:
      28
      Hello I have seen probably 50 people ask about this in different threads but I figured I would ask here to make a main place for the answer. How do you make routines cast your golems before auras? It is retarded considering there is never a time (that I can think of) when you would need to do it the other way around. So would anyone mind sharing how to cast them in the correct order?

      I scoured the forums looking for the answer and I found this thread where a guy guessed that taking the aura casting and putting it under the golem casting would make the bot cast the golems before the auras. This is a good idea but it practice it does not work!
      https://www.thebuddyforum.com/threads/combat-routine-help.298378/

      Any help would be awesome! thank you very much in advance!

      By the way I am using SumonerRoutine as my routine (not recomended as it likes to facetank mobs) but figured it would be good to include that detail. (included the routine below)
       

      Attached Files:

      Last edited: Mar 27, 2017
    2. Hisp

      Hisp Member

      Joined:
      Feb 11, 2015
      Messages:
      48
      Likes Received:
      1
      Trophy Points:
      8
      You can use some more plugins and some changes to optimize the Summoner Routine =)
       
    3. vendettas

      vendettas Member

      Joined:
      Jun 19, 2013
      Messages:
      231
      Likes Received:
      12
      Trophy Points:
      18
      Just a thought: What happens when your golem dies?
       
    4. demonviper

      demonviper Active Member

      Joined:
      Apr 8, 2014
      Messages:
      534
      Likes Received:
      56
      Trophy Points:
      28
      They dont because of all the primordial harmonies and they aren't affected by elemental damage.

      I have looked and cannot find anything other than tweaks that don't seem to work in the thread itself. If you can share some of them that you are referring to that would be great.
       
    5. demonviper

      demonviper Active Member

      Joined:
      Apr 8, 2014
      Messages:
      534
      Likes Received:
      56
      Trophy Points:
      28
      Bump for any help PLEASE! If anyone can lead me in the right direction ill happily move the code around if that is what it takes i just need to know what to do.
       
    6. demonviper

      demonviper Active Member

      Joined:
      Apr 8, 2014
      Messages:
      534
      Likes Received:
      56
      Trophy Points:
      28
      Bump...any developers able to point me in the right direction. No one seems very helpful in these forums sadly
       
    7. ExVault

      ExVault Moderator Moderator Buddy Core Dev

      Joined:
      Oct 23, 2013
      Messages:
      748
      Likes Received:
      57
      Trophy Points:
      28
      If you are talking about OldRoutine, the only bad thing for golems I can see is 10 sec cooldown. However, it is there to prevent bot from spamming golems in case of them dying like flies. If you want to get rid of cooldown you must be sure your golems are tanky enough.
      Golem summoning logic is located before aura casting logic, which means it has higher priority. The only thing that prevents bot from casting all your golems at once is cooldown.

      To remove cooldown:
      - Find golem summing logic in OldRoutine (line 1360)
      - Delete "&& _summonGolemStopwatch.ElapsedMilliseconds > 10000". Line 1360 should be just "if (_sgSlot != -1)" after that.

      If you are talking about 3rd party routine, you should contact it's respective author.
       
    8. demonviper

      demonviper Active Member

      Joined:
      Apr 8, 2014
      Messages:
      534
      Likes Received:
      56
      Trophy Points:
      28
      sounds good I will check that out. Unfortunately even though it may be a higher priority it STILL casts auras first. NOT golems if you have any idea how to change this faulty coding logic (there is no reason auras have to be cast before golems and indeed should have been coded the reverse way) that would be amazing!
       
    9. ExVault

      ExVault Moderator Moderator Buddy Core Dev

      Joined:
      Oct 23, 2013
      Messages:
      748
      Likes Received:
      57
      Trophy Points:
      28
      Bot casts auras only after 1st golem was summoned (because 10 sec cooldown started). If you remove the cooldown bot will summon all golems consecutively.
       
    10. demonviper

      demonviper Active Member

      Joined:
      Apr 8, 2014
      Messages:
      534
      Likes Received:
      56
      Trophy Points:
      28
      Well that is not how it is working for me (No golems are summoned until auras complete) but I will try your suggestion and see if that works. Ill report back as soon as I test. My account ran out yesterday so I may be a couple days until I can test.
       
    11. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Don't blame code when you cant even code yourself. It shows ignorance and less devs are prone to help you.
      @exy, you need to put the golem onto the slot first, it casts based on the first sloted item, then it swaps the inactive slots to the already active casted. So he probably has golems on inactive slots. Sec i gotta find that ele routine that I had the logic working.
       
    12. demonviper

      demonviper Active Member

      Joined:
      Apr 8, 2014
      Messages:
      534
      Likes Received:
      56
      Trophy Points:
      28
      I was just being emotional but I think the statement of not blaming the code is silly considering the bot was coded by people. I could say this is faulty people logic who then coded the bot but I think the statement still stands that it should not have been coded this way. (I think we can agree on that right?)

      Also, people throw the, "you can't even code bro." thing out in these forums all the time. Yes I realize I don't know how to code, I am asking for help, that is the point! Of course I am ignorant when it comes to coding! I will do my best to learn as I go but to expect someone to learn to code in an afternoon in order to fix the bot is silly.

      But yes everyone makes mistakes, (I make many everyday) and I am not mad at the programmers or anything I think the logic just has to be reversed so that it works properly. :)
       
    13. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Ok Do this, add this code anywhere cause it's a async function without a return.
      Code:
      private static async Task PrecastGolemThenAura()
              {
                  var golemSkill = SkillBar.Skills
                      .FirstOrDefault(s => s.IsOnSkillBar && s.SkillTags.Contains("golem"));
      
                  if (golemSkill == null && AllAuras.Any(a => a.IsOnSkillBar))
                  {
                      golemSkill = SkillBar.Skills.FirstOrDefault(s => !s.IsOnSkillBar && s.SkillTags.Contains("golem"));
                      if (golemSkill != null)
                      {
                          if (AllAuras.Any(a => a.IsOnSkillBar))
                          {
                              var currentAura = AllAuras.First(a => a.IsOnSkillBar);
                              if (currentAura != null)
                              {
                                  await SetGolemToSlot(golemSkill, currentAura.Slot);
                              }
                          }
                      }
                  }
      
                  if (golemSkill != null)
                  {
                      if (LokiPoe.Me.IsDead) return;
                      var golemObj = golemSkill.DeployedObjects.FirstOrDefault();
                      if (golemObj == null || ((Monster)golemObj).HealthPercent < MinGolemHpPercent)
                      {
                          Log.InfoFormat("[HiveRoutine-Scaleable][GolemLogic] Now casting {0}.", golemSkill.Name);
                          SkillBar.Use(golemSkill.Slot, false);
                          await Coroutines.FinishCurrentAction();
                          await Coroutine.Sleep(100);
                      }
                  }
      
              }
      Then call it using await PrecastGolemThenAura();
      Before the cast aura logic.
      You might need to change some things cause I renamed some of Old Routine's Functions, but the idea is the same.
      What it does is, searches the skillbar for any golems skills not on the skillbar, it will swap with an aura skill for it, cast it, the the aura logic will auto swap it back.
       
    14. weenston

      weenston Member

      Joined:
      Apr 1, 2014
      Messages:
      87
      Likes Received:
      1
      Trophy Points:
      8


      I add this to Oldroutine.cs right? What do you mean by call it using await Precastgolemthenaura();


      Sorry for the noob q.
       
    15. demonviper

      demonviper Active Member

      Joined:
      Apr 8, 2014
      Messages:
      534
      Likes Received:
      56
      Trophy Points:
      28
      @darkbluefirefly wow man nice will be checking it out very shortly I bought another month of the bot today so I will implement your code and try it out! Thanks for all the work!!!
       
    16. ridz89

      ridz89 Member

      Joined:
      Jul 1, 2012
      Messages:
      249
      Likes Received:
      3
      Trophy Points:
      18
      Hey, i think the problem might also lie in CastAuraTask in MapBuddy.

      You have to put the golem cast infront of aura cast. And then make it cast twice :D

      var golemSkill = SkillBar.Skills
      .FirstOrDefault(s => s.IsOnSkillBar && s.SkillTags.Contains("golem"));
      if (golemSkill != null)
      {
      var golemObj = golemSkill.DeployedObjects.FirstOrDefault() as Monster;
      if (golemSkill != null)
      {
      GlobalLog.Debug($"[CastAuraTask] Now summoning \"{golemSkill.Name}\".");
      SkillBar.Use(golemSkill.Slot, false);
      await Wait.SleepSafe(3500);
      SkillBar.Use(golemSkill.Slot, false);

      await Wait.SleepSafe(100);
      await Coroutines.FinishCurrentAction();
      await Wait.SleepSafe(100);
      }
      }

      i tried to highlight the changes i made, and like i said, i took this section and just put it above the aura section. I think we need this because when we relog, our golems desummon!

      This is a very bad fix lol, and it only works for my build because I can cast golem's twice before going oom, as it wait's 5 seconds before casting.

      If you want to summon more golems, just add more Skill.barUse lines and Wait.SleepSafe lines I guess?
       
      Last edited: Apr 19, 2017
    17. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      This will only work if your golems are on the skill bar, if they are on the inactive slots, it will not cast them. Remove the "s.IsOnSkillBar" in the LINQ to cast "all" golems, but yea this is a patchy fix code.
       

    Share This Page