What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Golem Slot

Draffon

New Member
Joined
Jan 14, 2011
Messages
28
Reaction score
0
I am hacking together a custom combat routine and I want to know if something is possible, and if so maybe a nudge in the right direction:

On one of my characters i find that i have too many skills and not enough item slots. Specifically i have a summoner, and need slots for the following skills:

Slot 1: Aura
Slot 2: Flesh Offering
Slot 3: SRS
Slot 4: Flame Dash
Slot 5: Vaal Haste
Slot 6: Summon Zombie
Slot 7: Raise Spectre
Slot 8: Move

I need a Slot for my Summon Golem.

I have noticed that when you summon the golem it gives the character a "buff" icon similar to the auras. So my question is can the Combat Routine be modified to cycle the Golem casting with the Aura check, thereby using only the aura slot instead of taking up a separate slot by itself?

If there is a way to accomplish this?

Thanks
Draffon
 
I am hacking together a custom combat routine and I want to know if something is possible, and if so maybe a nudge in the right direction:

On one of my characters i find that i have too many skills and not enough item slots. Specifically i have a summoner, and need slots for the following skills:

Slot 1: Aura
Slot 2: Flesh Offering
Slot 3: SRS
Slot 4: Flame Dash
Slot 5: Vaal Haste
Slot 6: Summon Zombie
Slot 7: Raise Spectre
Slot 8: Move

I need a Slot for my Summon Golem.

I have noticed that when you summon the golem it gives the character a "buff" icon similar to the auras. So my question is can the Combat Routine be modified to cycle the Golem casting with the Aura check, thereby using only the aura slot instead of taking up a separate slot by itself?

If there is a way to accomplish this?

Thanks
Draffon
Yes There is, paste the routine and I'll add it. I've been using it for quite a while. It came from ExVault's map runner and modified to my usage for my summoner routine.
 
Routine

Here you go, Once i get it properly tweaked i plan on releasing it.

Thanks!!
 
Last edited:
Working on it atm.

Does this mean I can cast my golem for the damage buff, then put some other skill in place of it? I've been looking for something like this.

I'm using Totemizer atm. And I'm new at this game, so excuse my ignorance.
 
Does this mean I can cast my golem for the damage buff, then put some other skill in place of it? I've been looking for something like this.

I'm using Totemizer atm. And I'm new at this game, so excuse my ignorance.

Yes thats what it means. Basically DBF is going to make the golem behave like an aura (which it basically is). I did the same thing with my Righteous Fire builds (since RF builds treat RF as an aura), but i would like to see how DBF implements the change.

Since you are using Totemizer tho, you will have to look at the changes made to the aura code and add them into Totemizer yourself (or ask tozededao to add the change to the Totemizer routine).

EDIT: By "cast my golem for the damage buff, then put some other skill in place of it" ... you wont be able to cast your golem then put like a totem slot there. Its just going to use the action button currently assigned to do all of your auras. Still a net gain of 1 slot.

I really dont understand why PoE doesnt allow you to bind force move without requiring it to stay on your bar. Very silly.
 
Last edited:
Yes thats what it means. Basically DBF is going to make the golem behave like an aura (which it basically is). I did the same thing with my Righteous Fire builds (since RF builds treat RF as an aura), but i would like to see how DBF implements the change.

Since you are using Totemizer tho, you will have to look at the changes made to the aura code and add them into Totemizer yourself (or ask tozededao to add the change to the Totemizer routine).

EDIT: By "cast my golem for the damage buff, then put some other skill in place of it" ... you wont be able to cast your golem then put like a totem slot there. Its just going to use the action button currently assigned to do all of your auras. Still a net gain of 1 slot.

I really dont understand why PoE doesnt allow you to bind force move without requiring it to stay on your bar. Very silly.

I see, thanks! I can probably have a look at the code and add it when it's done.
 
I see, thanks! I can probably have a look at the code and add it when it's done.
Ya, posting it in a sec, cause what's going to happen is,
You either have the 2 skills casted on the skillbar, this will cast both. But we're not interested in this.
You have one skill on the bar, it will cast, swap with other skill, cast
- Swap Back OR
- Keep it as is
You have none of the skill, it's going to skip.
I'll add a check for duplicate skills and swap one, but it's tricky.

I'm using most of the time doing error check cases, cause I don't want to like babysit this lol. We all know how friendly these forums are when new things are posted. It's the bane of breaking code.
 
Ok Replace your SRSDraft.cs with this
http://puu.sh/mky4O/375d1b4b9e.txt

What's going to happen is, either you have golem on the skill bar or not.

It checks not on skillbar first, because the skill will be in the back. It will swap to the skill, cast golem if it's not alive and back to the aura it used.

If it already has golem on a skill slot, it will use it and swap to aura.

I did this in notepad++ so any issues lmk.
 
For those wondering how it's done. I took ExVault's aura cast code and modified it to work. You will need to add somewhere in Logic

Code:
var golem = SkillBar.Skills
                       .FirstOrDefault(s => !s.IsOnSkillBar && s.SkillTags.Contains("golem"));
                if (golem != null)
                {
                    var golemObj = golem.DeployedObjects.FirstOrDefault();
                    if (golemObj == null)
                    {
                        
                            var currentAura = AllAuras.First(a => a.IsOnSkillBar);
                            string auraName = "";
                            var gslot = 0;
                            if (currentAura != null)
                            {
                                auraName = currentAura.Name;
                                gslot = currentAura.Slot;
                                await SetGolemToSlot(golem, gslot);
                            }
                            Log.InfoFormat("[GolemLogic] Now casting {0}, slot {1}", golem.Name, gslot);
                            SkillBar.Use(gslot, false);
                            await Coroutines.FinishCurrentAction();
                            await Coroutine.Sleep(Utility.LatencySafeValue(150));
                            currentAura = SkillBar.Skills
                                .FirstOrDefault(s => !s.IsOnSkillBar && s.SkillTags.Contains(auraName));
                            await SetAuraToSlot(currentAura, gslot);
                            return true;
                       
                    }
                   
                }
                golem = SkillBar.Skills
                       .FirstOrDefault(s => s.IsOnSkillBar && s.SkillTags.Contains("golem"));
                if (golem != null)
                {
                    var golemObj = golem.DeployedObjects.FirstOrDefault();
                    if (golemObj == null)
                    {
                            var currentAura = AllAuras.First(a => !a.IsOnSkillBar);
                            string auraName = "";
                            var gslot = 0;
                            if (currentAura != null)
                            {
                                auraName = currentAura.Name;
                                gslot = golem.Slot;
                                
                            }
                            Log.InfoFormat("[GolemLogic] Now casting {0}, slot {1}", golem.Name, gslot);
                            SkillBar.Use(gslot, false);
                            await Coroutines.FinishCurrentAction();
                            await Coroutine.Sleep(Utility.LatencySafeValue(150));
                            currentAura = SkillBar.Skills
                                .FirstOrDefault(s => !s.IsOnSkillBar && s.SkillTags.Contains(auraName));
                            await SetAuraToSlot(currentAura, gslot);
                            return true;
                        
                    }

                }

Then the methods will be

Code:
 // AURA CAST AND GOLEM CAST
        // Modified from ExVault's MapRunner.
        private static async Task CastAuras(IEnumerable<Skill> auras)
        {
            int slotForHidden = AllAuras.First(a => a.IsOnSkillBar).Slot;
            foreach (var aura in auras.OrderBy(a => a.Slot))
            {
                if (aura.Slot == -1)
                {
                    await SetAuraToSlot(aura, slotForHidden);
                }
                await ApplyAura(aura);
            }
        }

        private static async Task ApplyAura(Skill aura)
        {
            const int timeout = 5000;
            Log.InfoFormat("[ApplyAura] Now casting {0}.", aura.Name);
            var isUsed = SkillBar.Use(aura.Slot, false);
            if (isUsed != LokiPoe.InGameState.UseError.None)
            {
                Log.ErrorFormat("[ApplyAura] Fail to cast {0}. Error: {1}", aura.Name, isUsed);
                return;
            }
            var timer = Stopwatch.StartNew();
            while (timer.ElapsedMilliseconds < timeout)
            {
                if (!LokiPoe.Me.HasCurrentAction && PlayerHasAura(aura.Name))
                {
                    //just in case... another 200 ms
                    await Coroutine.Sleep(Utility.LatencySafeValue(100));
                    return;
                }
                Log.Debug("[ApplyAura] Waiting for aura applying.");
                await Coroutine.Sleep(100);
            }
            Log.Error("[ApplyAura] Aura applying timeout.");
        }
         private static async Task SetGolemToSlot(Skill golem, int slot)
        {
            const int timeout = 3000;
            Log.InfoFormat("[SetGolemToSlot] Now setting {0} to slot {1}.", golem.Name, slot);
            var isSet = SkillBar.SetSlot(slot, golem);
            if (isSet != LokiPoe.InGameState.SetSlotError.None)
            {
                Log.ErrorFormat("[SetGolemToSlot] Fail to set {0} to slot {1}. Error: {2}", golem.Name, slot, isSet);
                return;
            }
            var timer = Stopwatch.StartNew();
            while (timer.ElapsedMilliseconds < timeout)
            {
                if (!LokiPoe.Me.HasCurrentAction && SkillBar.Slot(slot).Name == golem.Name)
                {
                    //just in case... another 200 ms
                    await Coroutine.Sleep(Utility.LatencySafeValue(100));
                    return;
                }
                Log.Debug("[SetGolemToSlot] Waiting for aura slot setting.");
                await Coroutine.Sleep(100);
            }
            Log.Error("[SetGolemToSlot] Aura slot setting timeout.");
        }
        private static async Task SetAuraToSlot(Skill aura, int slot)
        {
            const int timeout = 3000;
            Log.InfoFormat("[SetAuraToSlot] Now setting {0} to slot {1}.", aura.Name, slot);
            var isSet = SkillBar.SetSlot(slot, aura);
            if (isSet != LokiPoe.InGameState.SetSlotError.None)
            {
                Log.ErrorFormat("[SetAuraToSlot] Fail to set {0} to slot {1}. Error: {2}", aura.Name, slot, isSet);
                return;
            }
            var timer = Stopwatch.StartNew();
            while (timer.ElapsedMilliseconds < timeout)
            {
                if (!LokiPoe.Me.HasCurrentAction && SkillBar.Slot(slot).Name == aura.Name)
                {
                    //just in case... another 200 ms
                    await Coroutine.Sleep(Utility.LatencySafeValue(100));
                    return;
                }
                Log.Debug("[SetAuraToSlot] Waiting for aura slot setting.");
                await Coroutine.Sleep(100);
            }
            Log.Error("[SetAuraToSlot] Aura slot setting timeout.");
        }
        
        private static List<Skill> GetAurasForCast()
        {
            List<Skill> result = new List<Skill>();
            foreach (var aura in AllAuras)
            {
                //if (MapRunnerSettings.Instance.IgnoreHiddenAuras && aura.Slot == -1) continue;
                if (!PlayerHasAura(aura.Name))
                {
                    result.Add(aura);
                }
            }
            return result;
        }

        private static IEnumerable<Skill> AllAuras
        {
            get { return SkillBar.Skills.Where(skill => AuraNames.Contains(skill.Name)); }
        }

        private static bool PlayerHasAura(string auraName)
        {
            return LokiPoe.Me.Auras
                .Any(a => a.Name.Equals(auraName, StringComparison.OrdinalIgnoreCase) ||
                          a.Name.Equals((auraName + " aura"), StringComparison.OrdinalIgnoreCase));
        }

        private static readonly HashSet<string> AuraNames = new HashSet<string>
        {
            "Vaal Haste"
        };

for More then aura it's possible, by modifying a little more code.
 
For those wondering how it's done. I took ExVault's aura cast code and modified it to work. You will need to add somewhere in Logic

Code:
var golem = SkillBar.Skills
                       .FirstOrDefault(s => !s.IsOnSkillBar && s.SkillTags.Contains("golem"));
                if (golem != null)
                {
                    var golemObj = golem.DeployedObjects.FirstOrDefault();
                    if (golemObj == null)
                    {
                        
                            var currentAura = AllAuras.First(a => a.IsOnSkillBar);
                            string auraName = "";
                            var gslot = 0;
                            if (currentAura != null)
                            {
                                auraName = currentAura.Name;
                                gslot = currentAura.Slot;
                                await SetGolemToSlot(golem, gslot);
                            }
                            Log.InfoFormat("[GolemLogic] Now casting {0}, slot {1}", golem.Name, gslot);
                            SkillBar.Use(gslot, false);
                            await Coroutines.FinishCurrentAction();
                            await Coroutine.Sleep(Utility.LatencySafeValue(150));
                            currentAura = SkillBar.Skills
                                .FirstOrDefault(s => !s.IsOnSkillBar && s.SkillTags.Contains(auraName));
                            await SetAuraToSlot(currentAura, gslot);
                            return true;
                       
                    }
                   
                }
                golem = SkillBar.Skills
                       .FirstOrDefault(s => s.IsOnSkillBar && s.SkillTags.Contains("golem"));
                if (golem != null)
                {
                    var golemObj = golem.DeployedObjects.FirstOrDefault();
                    if (golemObj == null)
                    {
                            var currentAura = AllAuras.First(a => !a.IsOnSkillBar);
                            string auraName = "";
                            var gslot = 0;
                            if (currentAura != null)
                            {
                                auraName = currentAura.Name;
                                gslot = golem.Slot;
                                
                            }
                            Log.InfoFormat("[GolemLogic] Now casting {0}, slot {1}", golem.Name, gslot);
                            SkillBar.Use(gslot, false);
                            await Coroutines.FinishCurrentAction();
                            await Coroutine.Sleep(Utility.LatencySafeValue(150));
                            currentAura = SkillBar.Skills
                                .FirstOrDefault(s => !s.IsOnSkillBar && s.SkillTags.Contains(auraName));
                            await SetAuraToSlot(currentAura, gslot);
                            return true;
                        
                    }

                }

Then the methods will be

Code:
 // AURA CAST AND GOLEM CAST
        // Modified from ExVault's MapRunner.
        private static async Task CastAuras(IEnumerable<Skill> auras)
        {
            int slotForHidden = AllAuras.First(a => a.IsOnSkillBar).Slot;
            foreach (var aura in auras.OrderBy(a => a.Slot))
            {
                if (aura.Slot == -1)
                {
                    await SetAuraToSlot(aura, slotForHidden);
                }
                await ApplyAura(aura);
            }
        }

        private static async Task ApplyAura(Skill aura)
        {
            const int timeout = 5000;
            Log.InfoFormat("[ApplyAura] Now casting {0}.", aura.Name);
            var isUsed = SkillBar.Use(aura.Slot, false);
            if (isUsed != LokiPoe.InGameState.UseError.None)
            {
                Log.ErrorFormat("[ApplyAura] Fail to cast {0}. Error: {1}", aura.Name, isUsed);
                return;
            }
            var timer = Stopwatch.StartNew();
            while (timer.ElapsedMilliseconds < timeout)
            {
                if (!LokiPoe.Me.HasCurrentAction && PlayerHasAura(aura.Name))
                {
                    //just in case... another 200 ms
                    await Coroutine.Sleep(Utility.LatencySafeValue(100));
                    return;
                }
                Log.Debug("[ApplyAura] Waiting for aura applying.");
                await Coroutine.Sleep(100);
            }
            Log.Error("[ApplyAura] Aura applying timeout.");
        }
         private static async Task SetGolemToSlot(Skill golem, int slot)
        {
            const int timeout = 3000;
            Log.InfoFormat("[SetGolemToSlot] Now setting {0} to slot {1}.", golem.Name, slot);
            var isSet = SkillBar.SetSlot(slot, golem);
            if (isSet != LokiPoe.InGameState.SetSlotError.None)
            {
                Log.ErrorFormat("[SetGolemToSlot] Fail to set {0} to slot {1}. Error: {2}", golem.Name, slot, isSet);
                return;
            }
            var timer = Stopwatch.StartNew();
            while (timer.ElapsedMilliseconds < timeout)
            {
                if (!LokiPoe.Me.HasCurrentAction && SkillBar.Slot(slot).Name == golem.Name)
                {
                    //just in case... another 200 ms
                    await Coroutine.Sleep(Utility.LatencySafeValue(100));
                    return;
                }
                Log.Debug("[SetGolemToSlot] Waiting for aura slot setting.");
                await Coroutine.Sleep(100);
            }
            Log.Error("[SetGolemToSlot] Aura slot setting timeout.");
        }
        private static async Task SetAuraToSlot(Skill aura, int slot)
        {
            const int timeout = 3000;
            Log.InfoFormat("[SetAuraToSlot] Now setting {0} to slot {1}.", aura.Name, slot);
            var isSet = SkillBar.SetSlot(slot, aura);
            if (isSet != LokiPoe.InGameState.SetSlotError.None)
            {
                Log.ErrorFormat("[SetAuraToSlot] Fail to set {0} to slot {1}. Error: {2}", aura.Name, slot, isSet);
                return;
            }
            var timer = Stopwatch.StartNew();
            while (timer.ElapsedMilliseconds < timeout)
            {
                if (!LokiPoe.Me.HasCurrentAction && SkillBar.Slot(slot).Name == aura.Name)
                {
                    //just in case... another 200 ms
                    await Coroutine.Sleep(Utility.LatencySafeValue(100));
                    return;
                }
                Log.Debug("[SetAuraToSlot] Waiting for aura slot setting.");
                await Coroutine.Sleep(100);
            }
            Log.Error("[SetAuraToSlot] Aura slot setting timeout.");
        }
        
        private static List<Skill> GetAurasForCast()
        {
            List<Skill> result = new List<Skill>();
            foreach (var aura in AllAuras)
            {
                //if (MapRunnerSettings.Instance.IgnoreHiddenAuras && aura.Slot == -1) continue;
                if (!PlayerHasAura(aura.Name))
                {
                    result.Add(aura);
                }
            }
            return result;
        }

        private static IEnumerable<Skill> AllAuras
        {
            get { return SkillBar.Skills.Where(skill => AuraNames.Contains(skill.Name)); }
        }

        private static bool PlayerHasAura(string auraName)
        {
            return LokiPoe.Me.Auras
                .Any(a => a.Name.Equals(auraName, StringComparison.OrdinalIgnoreCase) ||
                          a.Name.Equals((auraName + " aura"), StringComparison.OrdinalIgnoreCase));
        }

        private static readonly HashSet<string> AuraNames = new HashSet<string>
        {
            "Vaal Haste"
        };

for More then aura it's possible, by modifying a little more code.

I guess Arctic Armor would be easy to add as well?
 
Yup.

ExVault is Pro coder, his code accommodates most conditions.

You See

Code:
  private static readonly HashSet<string> AuraNames = new HashSet<string>
        {
            "Vaal Haste"
        };

change to

Code:
  private static readonly HashSet<string> AuraNames = new HashSet<string>
        {
            "Vaal Haste",
             "Arctic Armor"
        };

It's that simple. And the order is the order in which the aura gets cast.
 
Yup.

ExVault is Pro coder, his code accommodates most conditions.

You See

Code:
  private static readonly HashSet<string> AuraNames = new HashSet<string>
        {
            "Vaal Haste"
        };

change to

Code:
  private static readonly HashSet<string> AuraNames = new HashSet<string>
        {
            "Vaal Haste",
             "Arctic Armor"
        };

It's that simple. And the order is the order in which the aura gets cast.

That was easy! Thanks :)
 
Back
Top