コード例 #1
0
        public override void Invoke(IController hud)
        {
            try
            {
                var lowerDifficultyButton = hud.Render.GetUiElement(
                    "Root.NormalLayer.gamemenu_dialog.gamemenu_bkgrnd.GameParams.RightButtonStackContainer.button_lowerDifficulty"
                    );

                if (!lowerDifficultyButton.Visible)
                {
                    InputSimulator.PressKey(Settings.Keybinds[(int)ActionKey.Close]);

                    hud.Render.GetUiElement(
                        "Root.NormalLayer.GameOptions_main.LayoutRoot.OverlayContainer.KeyBindings.ListContainer.BindingList.HotKeyGameMenu.HotKeyGameMenuText"
                        ).Click();
                }

                while (hud.Game.GameDifficulty != GameDifficulty.n)
                {
                    lowerDifficultyButton.Click();
                }

                hud.Render.GetUiElement("Root.NormalLayer.gamemenu_dialog.gamemenu_bkgrnd.button_resumeGame").Click();
            }
            catch (Exception e)
            {
                hud.Debug(e.ToString());
            }
        }
コード例 #2
0
        public static void CloseChatAndOpenWindows(this IRenderController renderController)
        {
            if (renderController.IsUiElementVisible(UiPathConstants.Ui.CHAT_INPUT))
            {
                InputSimulator.PressKey(Keys.Escape);
                WaitForConditionOrAbortHotkeyEvent(() => !renderController.IsUiElementVisible(UiPathConstants.Ui.CHAT_INPUT));
            }

            InputSimulator.PressKey(Settings.Keybinds[(int)ActionKey.Close]);
            Thread.Sleep(25);
        }
コード例 #3
0
ファイル: Act5.cs プロジェクト: shamalaya83/pHelperPlugin
        public override void Invoke(IController hud)
        {
            hud.Render.CloseChatAndOpenWindows();

            InputSimulator.PressKey(Settings.Keybinds[(int)ActionKey.Map]);

            hud.Render.WaitForVisiblityAndClickOrAbortHotkeyEvent(UiPathConstants.WaitpointMap.ZOOM_OUT);

            hud.Render.WaitForVisiblityAndClickOrAbortHotkeyEvent(UiPathConstants.WaitpointMap.ACT_FIVE);

            hud.Render.WaitForVisiblityAndClickOrAbortHotkeyEvent(UiPathConstants.WaitpointMap.ActFive.TOWN);
        }
コード例 #4
0
 public static void Cast(this IPlayerSkill skill)
 {
     InputSimulator.PressKey(Settings.Keybinds[(int)skill.Key]);
 }