I'd like to see this happens too ! Sadly i'm not much into coding to do this by my own so.. Just saying there's some people that might like a CC for this ! Thanks !
ExampleRoutine does not support dual totems or totems used as your primary melee/ranged skill.
Totem support in ExampleRoutine is made specifically for using them as utility. The code that controls otem logic in example routine is this:
Code:
// Handle totem logic.
if (_totemSlot != -1 &&
_totemStopwatch.ElapsedMilliseconds > ExampleRoutineSettings.Instance.TotemDelayMs)
{
var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_totemSlot);
if (skill.CanUse() &&
!skill.DeployedObjects.Select(o => o as Monster).Any(t => !t.IsDead && t.Distance < 60))
{
await DisableAlwaysHiglight();
var err1 = LokiPoe.InGameState.SkillBarPanel.UseAt(_totemSlot, true,
Utility.CalculatePointAtDistanceAfterStart(myPos, cachedPosition,
cachedDistance/2));
_totemStopwatch.Restart();
if (err1 == LokiPoe.InGameState.UseError.None)
return true;
Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
}
}
The logic there basically says, if the user has a totem on their skill bar (auto-detected by _totemSlot), wait TotemDelayMs before checking to see if the totem can be used, and only use it if there is not already an existing totem within 60 units.
To get that logic to cast two totems (only of the same type), you'd want to lower the TotemDelayMs down to like 1000 ms rather than the default of 5000, and try this code (untested, since I have to respec my testing minion/totem character after the passive reset):
Code:
// Handle totem logic.
if (_totemSlot != -1 &&
_totemStopwatch.ElapsedMilliseconds > ExampleRoutineSettings.Instance.TotemDelayMs)
{
var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_totemSlot);
if (skill.CanUse() &&
skill.DeployedObjects.Select(o => o as Monster).Count(t => !t.IsDead && t.Distance < 60) < LokiPoe.Me.MaxTotemCount)
{
await DisableAlwaysHiglight();
var err1 = LokiPoe.InGameState.SkillBarPanel.UseAt(_totemSlot, true,
Utility.CalculatePointAtDistanceAfterStart(myPos, cachedPosition,
cachedDistance/2));
_totemStopwatch.Restart();
if (err1 == LokiPoe.InGameState.UseError.None)
return true;
Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
}
}
If that logic works, then it can be made the default since it works for any number of totems the user has access to, but the design of using them as utility skills auto-detected from the skillbar has to stay the same for now.
I go over a really simple routine here, so if you're looking to get started working on your own, take a read over that as well.
Sorry for hijacking the thread but when im trying to use totems with exampleroutine my bot keeps on spamming totems until i go OOM without any cooldown whatsoever, help please?
I'm having the same problem. I lowered the delay to 2 and increased it to 2000000 and my character still spams the totem. I'd like to add in a delay to cut down on spam.