public static int ProcessLoop()
        {
            if (!ScreenTools.IsDiabloFocused())
            {
                return(1);
            }
            if (ScreenTools.IsPorting())
            {
                return(3);
            }

            bool inRift = ScreenTools.IsInRift();

            // Conditions for Skill Activation
            if (
                ActiveMode.GetCurrentMode() == ActiveMode.Mode.AlwaysActive ||
                (ActiveMode.GetCurrentMode() == ActiveMode.Mode.Automatic && inRift)
                )
            {
                ProcessSkills();
            }

            // Conditions for Town Actions
            if (ActiveMode.GetCurrentMode() != ActiveMode.Mode.AlwaysActive && !inRift)
            {
                ProcessTown();
            }

            // always process potion
            PotionSkill.Process();
            return(0);
        }
 public static void SetActiveSkills(string classId)
 {
     ActiveMode.KeyPressed("active-mode-auto");
     ClearActiveSkills();
     if (classId == null)
     {
         return;
     }
     foreach (string id in Skills.Keys)
     {
         if (id.Contains(classId))
         {
             ActiveSkills.Add(id);
             MainFormRef.OverviewContainer.SkillContainer.AddSkill(Skills[id]);
         }
     }
 }