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

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Snippet] Golem

tozededao

Community Developer
Joined
Jan 15, 2010
Messages
1,225
Since new included routine does not have Golem Support here's what you have to add to do to make it summon your Golem.




At the beginning of the cs, where all the other slots are declared add :

Code:
private int _golemSlot = -1;

After that add a Golem Stopwatch near all the stop watches

Code:
private readonly Stopwatch _golemStopwatch = Stopwatch.StartNew();

On public void Tick() when the game needs update and it resets all the other slots add

Code:
_golemSlot = -1;

After that when it reads the slot contents for action bar add :

Code:
                var golem = LokiPoe.InGameState.SkillBarPanel.Skills.FirstOrDefault(s => s.Name == "Summon Flame Golem");
                if (IsCastableHelper(golem))
                {
                    _golemSlot = golem.Slot;
                }


                golem = LokiPoe.InGameState.SkillBarPanel.Skills.FirstOrDefault(s => s.Name == "Summon Ice Golem");
                if (IsCastableHelper(golem))
                {
                    _golemSlot = golem.Slot;
                }


                golem = LokiPoe.InGameState.SkillBarPanel.Skills.FirstOrDefault(s => s.Name == "Summon Chaos Golem");
                if (IsCastableHelper(golem))
                {
                    _golemSlot = golem.Slot;
                }


On the task logic where the auras are cast etc add

Code:
 if (_golemSlot != -1 && _golemStopwatch.ElapsedMilliseconds > 10000)
                {
                    // See if we can use the skill.
                    var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_golemSlot);
                    if (skill.CanUse() && skill.NumberDeployed < 1)
                    {
                        var err1 = LokiPoe.InGameState.SkillBarPanel.Use(_golemSlot, true);


                        _golemStopwatch.Restart();
                        if (err1 == LokiPoe.InGameState.UseError.None)
                        {
                            await Coroutine.Sleep(Utility.LatencySafeValue(500));


                            await Coroutines.FinishCurrentAction(false);


                            await Coroutine.Sleep(Utility.LatencySafeValue(100));


                            return true;
                        }


                        Log.ErrorFormat("[Logic] Use returned {0} for {1}.", err1, skill.Name);
                    }
                }
 
Damn dude thanks a ton for this! Working strong! :D
Anyone that is too lazy to do this, here is the slightly modified old routine file.
Go to your bot location -> Routines -> Replace OldRoutine.cs
DONT FORGET TO MAKE A BACKUP IF I SCREWED SOMETHING UP! :)

View attachment OldRoutine.cs


Edit: Also for any newbs, where he says "golemSlot = -1;"
he really means "_golemSlot = -1;"

Edit2: The beautiful bastard fixed it! :D
 
great thanks, will try this!
@devs: please include in the next update. i hope these manually changes don't screw up the bot.
 
ok for some reason the code he made causes an issue were the bot may randomly hang. You'll see nothing but "Highest latency", "lowest latency" ect on the log.
removing the golem from my cast bar fixed it, i'll look through the code and find out what happened
 
ok for some reason the code he made causes an issue were the bot may randomly hang. You'll see nothing but "Highest latency", "lowest latency" ect on the log.
removing the golem from my cast bar fixed it, i'll look through the code and find out what happened

I'm using a similar version of this snippet without the stopwatch (who care of the time it stays alive) the latencytracker is here for info, not when the bot is hanging. (For example I use it to dynamically change my sleep times in AIF) so I would say it's based on server lags due to lockstep.
 
Sry for being noob, but it works only as a fallback skill.
Should i place it at some specific slot?
 
@Synchro
No. That option is for something else related to build. Place skill in skill bar and it will auto summon.


Heres the updated one for the lazy xD
 

Attachments

@Synchro

Heres the updated one for the lazy xD

still nothing

b5e7ef9a426fe2684cc29e7fe99f24fb.png
 
could this be added to oldRoutine? I've been testing it for a while and it works fine.
 
maybe one more suggestion:

If there are no enemies in the combat range and the golem doesn't have full life, resummon it. Otherwise you could enter a fight with the golem at 1% life.
 
Back
Top