if (_totemSlot != -1 && _totemStopwatch.ElapsedMilliseconds > OldRoutineSettings.Instance.TotemDelayMs)
Code:
if (skill.CanUse() && skill.DeployedObjects.Select(o => o as Monster).Count(t => !t.IsDead && t.Distance < 60) < LokiPoe.Me.MaxTotemCount)
Code is already there. You are setting your totem as a main attack skill, thus it gets spammed. Just put your totems on your hotbar non bound. You will need to bind something tho as a main attack, so movement skill, curse, your choice.