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!

Did OldRoutine ever use Orb of Storms?

lyvewyre

Member
Joined
Jan 3, 2013
Messages
418
I thought at some point OldRoutine would consistently use Orb of Storms if you had it slotted. Recent character I'm leveling, never uses OoS, and in looking through Old Routine I cannot see a reference to it.

Am I imagining this was the case? I'd like bot to use it frequently to proc curse on hit mostly.
 
Ok, so with no response I decided to tackle the situation myself. I've chopped together something to make the bot cast orb of storms in a generally useful manner.

Code:
                // If we have Orb of Storms skill, and we haven't cast it recently, will cast when there 5 or mobs nearby or Magic+ mobs nearby.
                if (_orbOfStormSlot != -1 && _orbOfStormStopwatch.ElapsedMilliseconds >
                    6000 && ((NumberOfMobsNear(LokiPoe.Me, 30) > 5) || (cachedRarity >= Rarity.Magic)))
                {
                    // See if we can use the skill.
                    var skill = LokiPoe.InGameState.SkillBarHud.Slot(_orbOfStormSlot);
                    if (skill.CanUse())
                    {
                        {
                            await DisableAlwaysHiglight();

                            await Coroutines.FinishCurrentAction();

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

                                await Coroutines.FinishCurrentAction(false);

                                return true;
                            }

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

I set a stopwatch to cast the spell every 6 seconds (the cooldown of the spell) and to only cast if it encounters a magic or greater enemy, as well as if there are 5 or more mobs in range. It's working for the most part, wher it'll fall down is if the bot repositions suddenly, it won't recast the spell until the cooldown is up. But with the way the bot functions, that doesn't happen often.

Also, because I was running a cold elementalist of sorts, here's some bonus frost bomb logic that is also working pretty decently:

Code:
                // If we have Frost Bomb skill, and we haven't cast it recently, will cast when there 5 or mobs nearby or Magic+ mobs nearby.
                if (_frostBombSlot != -1 && _frostBombStopwatch.ElapsedMilliseconds >
                    3000 && ((NumberOfMobsNear(LokiPoe.Me, 30) > 5) || (cachedRarity >= Rarity.Magic)))
                {
                    // See if we can use the skill.
                    var skill = LokiPoe.InGameState.SkillBarHud.Slot(_frostBombSlot);
                    if (skill.CanUse())
                    {
                        {
                            await DisableAlwaysHiglight();

                            await Coroutines.FinishCurrentAction();

                            var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_frostBombSlot, true, cachedPosition);
                            if (err1 == LokiPoe.InGameState.UseResult.None)
                            {
                                _frostBombStopwatch.Restart();

                                await Coroutines.FinishCurrentAction(false);

                                return true;
                            }

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

Similar situation, using a stopwatch for the cooldown of the spell, the main difference between the two spells that I've used is targeting the cachedPosition much like how the bot targets curses.
 
Back
Top