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

Combat routine help

Virtueux

New Member
Joined
Sep 11, 2014
Messages
15
Reaction score
0
How I can make routine to cast Golem before casting all aura ?
I dont have enought mana left to cast a golem after it cast all the Aura, so I would like it to castt golem first.

Someone can help me ?
 
Open up EB > 3rdParty > OldRoutine > OldRoutine.cs

This section casts your auras.
Code:
        public async Task<bool> TryUseAura(Skill skill)
        {
            var doCast = true;

            while (skill.Slot == -1)
            {
                Log.InfoFormat("[TryUseAura] Now assigning {0} to the skillbar.", skill.Name);

                var sserr = LokiPoe.InGameState.SkillBarHud.SetSlot(_auraSlot, skill);

                if (sserr != LokiPoe.InGameState.SetSlotResult.None)
                {
                    Log.ErrorFormat("[TryUseAura] SetSlot returned {0}.", sserr);

                    doCast = false;

                    break;
                }

                await Coroutines.LatencyWait();

                await Coroutine.Sleep(1000);
            }

            if (!doCast)
            {
                return false;
            }

            await Coroutines.FinishCurrentAction();

            await Coroutines.LatencyWait();

            var err1 = LokiPoe.InGameState.SkillBarHud.Use(skill.Slot, false);
            if (err1 == LokiPoe.InGameState.UseResult.None)
            {
                await Coroutines.LatencyWait();

                await Coroutines.FinishCurrentAction(false);

                await Coroutines.LatencyWait();

                return true;
            }

            Log.ErrorFormat("[TryUseAura] Use returned {0} for {1}.", err1, skill.Name);

            return false;
        }

This section casts your Golems.
Code:
                // If we have a Summon Golem skill, we can cast it if we havn't cast it recently.
                if (_sgSlot != -1 &&
                    _summonGolemStopwatch.ElapsedMilliseconds >
                    10000)
                {
                    // See if we can use the skill.
                    var skill = LokiPoe.InGameState.SkillBarHud.Slot(_sgSlot);
                    if (skill.CanUse())
                    {
                        var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
                        if (skill.NumberDeployed < max)
                        {
                            await DisableAlwaysHiglight();

                            await Coroutines.FinishCurrentAction();

                            var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_sgSlot, true, myPos);
                            if (err1 == LokiPoe.InGameState.UseResult.None)
                            {
                                _summonGolemStopwatch.Restart();

                                await Coroutines.FinishCurrentAction(false);

                                return true;
                            }

                            Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
                        }
                    }
                }

Try cutting out the golem section and pasting it just above the aura section. Not tested at all, but i dont see why it wouldnt work. Let me know.
 
Open up EB > 3rdParty > OldRoutine > OldRoutine.cs

This section casts your auras.
Code:
        public async Task<bool> TryUseAura(Skill skill)
        {
            var doCast = true;

            while (skill.Slot == -1)
            {
                Log.InfoFormat("[TryUseAura] Now assigning {0} to the skillbar.", skill.Name);

                var sserr = LokiPoe.InGameState.SkillBarHud.SetSlot(_auraSlot, skill);

                if (sserr != LokiPoe.InGameState.SetSlotResult.None)
                {
                    Log.ErrorFormat("[TryUseAura] SetSlot returned {0}.", sserr);

                    doCast = false;

                    break;
                }

                await Coroutines.LatencyWait();

                await Coroutine.Sleep(1000);
            }

            if (!doCast)
            {
                return false;
            }

            await Coroutines.FinishCurrentAction();

            await Coroutines.LatencyWait();

            var err1 = LokiPoe.InGameState.SkillBarHud.Use(skill.Slot, false);
            if (err1 == LokiPoe.InGameState.UseResult.None)
            {
                await Coroutines.LatencyWait();

                await Coroutines.FinishCurrentAction(false);

                await Coroutines.LatencyWait();

                return true;
            }

            Log.ErrorFormat("[TryUseAura] Use returned {0} for {1}.", err1, skill.Name);

            return false;
        }

This section casts your Golems.
Code:
                // If we have a Summon Golem skill, we can cast it if we havn't cast it recently.
                if (_sgSlot != -1 &&
                    _summonGolemStopwatch.ElapsedMilliseconds >
                    10000)
                {
                    // See if we can use the skill.
                    var skill = LokiPoe.InGameState.SkillBarHud.Slot(_sgSlot);
                    if (skill.CanUse())
                    {
                        var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
                        if (skill.NumberDeployed < max)
                        {
                            await DisableAlwaysHiglight();

                            await Coroutines.FinishCurrentAction();

                            var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_sgSlot, true, myPos);
                            if (err1 == LokiPoe.InGameState.UseResult.None)
                            {
                                _summonGolemStopwatch.Restart();

                                await Coroutines.FinishCurrentAction(false);

                                return true;
                            }

                            Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
                        }
                    }
                }

Try cutting out the golem section and pasting it just above the aura section. Not tested at all, but i dont see why it wouldnt work. Let me know.

Hi thx for tying to help here is what it look after I try it but seem to dont work,
-Dosent cast Golem first
-And now it dosent attack anymore :(

it dosent see the oldroutine.cs anymore
Setting_zps0tnlt8ei.png


Code:
#region Implementation of ILogic
           
                // If we have a Summon Golem skill, we can cast it if we havn't cast it recently.
                if (_sgSlot != -1 &&
                    _summonGolemStopwatch.ElapsedMilliseconds >
                    10000)
                {
                    // See if we can use the skill.
                    var skill = LokiPoe.InGameState.SkillBarHud.Slot(_sgSlot);
                    if (skill.CanUse())
                    {
                        var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
                        if (skill.NumberDeployed < max)
                        {
                            await DisableAlwaysHiglight();

                            await Coroutines.FinishCurrentAction();

                            var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_sgSlot, true, myPos);
                            if (err1 == LokiPoe.InGameState.UseResult.None)
                            {
                                _summonGolemStopwatch.Restart();

                                await Coroutines.FinishCurrentAction(false);

                                return true;
                            }

                            Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
                        }
                    }
                }

        public async Task<bool> TryUseAura(Skill skill)
        {
            var doCast = true;

            while (skill.Slot == -1)
            {
                Log.InfoFormat("[TryUseAura] Now assigning {0} to the skillbar.", skill.Name);

                var sserr = LokiPoe.InGameState.SkillBarHud.SetSlot(_auraSlot, skill);

                if (sserr != LokiPoe.InGameState.SetSlotResult.None)
                {
                    Log.ErrorFormat("[TryUseAura] SetSlot returned {0}.", sserr);

                    doCast = false;

                    break;
                }

                await Coroutines.LatencyWait();

                await Coroutine.Sleep(1000);
            }

            if (!doCast)
            {
                return false;
            }

            await Coroutines.FinishCurrentAction();

            await Coroutines.LatencyWait();

            var err1 = LokiPoe.InGameState.SkillBarHud.Use(skill.Slot, false);
            if (err1 == LokiPoe.InGameState.UseResult.None)
            {
                await Coroutines.LatencyWait();

                await Coroutines.FinishCurrentAction(false);

                await Coroutines.LatencyWait();

                return true;
            }

            Log.ErrorFormat("[TryUseAura] Use returned {0} for {1}.", err1, skill.Name);

            return false;
        }

I will back to default one.
Hope u can help me again
Thx
 
Last edited:
I tested the above and ya, wont work. I didnt look too much into why it didnt work, because even if we could get OldRoutine to cast a golem before all your auras, you will still run into the same issue of not being able to recast your golem when it dies (unless you died as well). Would be too complicated to remove an aura, summon golem, reapply aura.

Your best bet to work around this for now is to link your golem with either something like blood magic, or cast when damage taken.
 
I tested the above and ya, wont work. I didnt look too much into why it didnt work, because even if we could get OldRoutine to cast a golem before all your auras, you will still run into the same issue of not being able to recast your golem when it dies (unless you died as well). Would be too complicated to remove an aura, summon golem, reapply aura.

Your best bet to work around this for now is to link your golem with either something like blood magic, or cast when damage taken.
Thx for the reply
I also didnt think about the recast :P
I will try to change my setup to get it whit CWDT

Thx
 
Back
Top