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()); } }
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); }
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); }
public static void Cast(this IPlayerSkill skill) { InputSimulator.PressKey(Settings.Keybinds[(int)skill.Key]); }