Example #1
0
 public void Process()
 {
     if (IsActive && AvailableFunctions.Potion(0, ScreenTools.GetPixelColor(Coords.Coords.Potion50.x, Coords.Coords.Potion50.y).Item1))
     {
         if (Key.IsMouse)
         {
             if (Key.CurrentKey == Keys.LButton)
             {
                 HardwareRobot.DoLeftClick();
             }
             else if (Key.CurrentKey == Keys.RButton)
             {
                 HardwareRobot.DoRightClick();
             }
         }
         else
         {
             HardwareRobot.PressKey((char)Key.CurrentKey);
         }
     }
 }
        private static void ProcessSkills()
        {
            foreach (string id in ActiveSkills)
            {
                var skill = Skills[id];

                if (skill.IsActive && skill.CanPress(skill.Slot, SkillCoords.GetPxlColor(skill)))
                {
                    var key = skill.Key;
                    if (key.IsMouse)
                    {
                        if (key.CurrentKey == Keys.LButton)
                        {
                            HardwareRobot.DoLeftClickShift();
                        }
                        else if (key.CurrentKey == Keys.RButton)
                        {
                            HardwareRobot.DoRightClick();
                        }
                        else if (key.CurrentKey == Keys.XButton1)
                        {
                            HardwareRobot.DoXButton1Click();
                        }
                        else if (key.CurrentKey == Keys.XButton2)
                        {
                            HardwareRobot.DoXButton2Click();
                        }
                    }
                    else
                    {
                        HardwareRobot.PressKey((char)key.CurrentKey);
                    }
                }
            }
            if (SettingsManager.GetSetting("hexing-pants") == "1")
            {
                HexingPantsSkill.Move();
            }
        }