private static void SelectProfTask(Interactor intr, string taskName) { intr.Log(LogEntryType.Debug, "Attempting to select profession task: '{0}'.", taskName); var searchButton = Screen.ImageSearch(intr, "ProfessionsSearchButton"); intr.Wait(50); Mouse.Click(intr, searchButton.Point, -100, 0); intr.Wait(50); Keyboard.SendKey(intr, "Shift", "Home"); intr.Wait(50); Keyboard.Send(intr, taskName); intr.Wait(50); Keyboard.SendKey(intr, "Enter"); intr.Wait(100); }
//public static bool ActivateClient(Interactor intr) { // //intr.ExecuteStatement("ActivateNeverwinter()"); // Screen.WindowActivate(intr, Game.GAMECLIENTEXE); // intr.Wait(1000); // return true; //} public static bool LogOut(Interactor intr) { //intr.ExecuteStatement("Logout()"); intr.Log(LogEntryType.Info, "Logging out..."); ClearDialogues(intr); MoveAround(intr); Keyboard.SendKey(intr, "Enter"); intr.Wait(50); Keyboard.Send(intr, "/gotocharacterselect"); intr.Wait(100); Keyboard.SendKey(intr, "Enter"); intr.Wait(100); //intr.Wait(3000); return(true); }
//public static bool ActivateClient(Interactor intr) { // //intr.ExecuteStatement("ActivateNeverwinter()"); // Screen.WindowActivate(intr, Game.GAMECLIENTEXE); // intr.Wait(1000); // return true; //} //public static bool LogOut(Interactor intr) { // //intr.ExecuteStatement("Logout()"); // intr.Log("Logging out...", LogEntryType.Info); // MoveAround(intr); // Keyboard.SendKey(intr, "Enter"); // intr.Wait(50); // Keyboard.Send(intr, "/gotocharacterselect"); // intr.Wait(100); // Keyboard.SendKey(intr, "Enter"); // intr.Wait(100); // intr.Wait(3000); // return true; //} public static bool ClientSignIn(Interactor intr) { intr.Log(LogEntryType.Info, "Signing in Client..."); //intr.ExecuteStatement("ClientLogin()"); intr.Wait(5000); ClearDialogues(intr); //if (!intr.WaitUntil(15, ClientState.LogIn, Game.IsClientState, null, 0)) { return false; } string gameUserName = intr.AccountSettings.GetSettingValOr("accountName", "general", ""); string gamePassword = intr.AccountSettings.GetSettingValOr("password", "general", ""); intr.Wait(1000); //var shiftHome = @"Send {Shift down} // Sleep 20 // Send { Home down} // Sleep 20 // Send { Shift up} // Sleep 20 // Send { Home up} // Sleep 20 //"; //intr.ExecuteStatement(shiftHome); Keyboard.SendKeyWithMod(intr, "Shift", "Tab", Keyboard.SendMode.Input); intr.Wait(200); Keyboard.SendKeyWithMod(intr, "Shift", "Home", Keyboard.SendMode.Input); Keyboard.Send(intr, gameUserName); Keyboard.SendKey(intr, "Tab"); intr.Wait(200); Keyboard.Send(intr, gamePassword); intr.Wait(200); Keyboard.SendKey(intr, "Enter"); intr.Wait(3000); // [TODO]: THIS NEEDS TO CLEAR VERIFY? DIALOGUE //ClearDialogues(intr); return(true); //ClientLogin() { // global // While ((ToggleInv && !FindClientLoginButton()) && (A_Index < 10)) { // LogAppend("[Attempting to find ClientLoginButton.]") // sleep 1500 // } // if (ToggleInv && !FindClientLoginButton()) { // LogAppend("[Not sure if we found ClientLoginButton but continuing...]") // ; msgbox ClientLogin() Waited too long for Login Screen to appear. If you are at login screen please check or remake %Lb_ImageFile%. // } // if (ToggleInv) { // Sleep 2000 + Ran(500) // Send {Shift down} // Sleep 20 // Send {Home down} // Sleep 20 // Send {Shift up} // Sleep 20 // Send {Home up} // Sleep 20 // Send %NwUserName% // Sleep 50 // Send {Tab} // Sleep 200 + Ran(100) // Send %NwActPwd% // Sleep 200 + Ran(100) // Send {Enter} // Sleep AfterLoginDelay + Ran(120) // } //} }