public void SelectCrew(int index) { if (index < 1 || index > 8) { return; } JavaOpenMacroInput.JavaKeyEvent keyToPress = JavaOpenMacroInput.JavaKeyEvent.VK_F1; switch (index) { case 1: keyToPress = JavaOpenMacroInput.JavaKeyEvent.VK_F1; break; case 2: keyToPress = JavaOpenMacroInput.JavaKeyEvent.VK_F2; break; case 3: keyToPress = JavaOpenMacroInput.JavaKeyEvent.VK_F3; break; case 4: keyToPress = JavaOpenMacroInput.JavaKeyEvent.VK_F4; break; case 5: keyToPress = JavaOpenMacroInput.JavaKeyEvent.VK_F5; break; case 6: keyToPress = JavaOpenMacroInput.JavaKeyEvent.VK_F6; break; case 7: keyToPress = JavaOpenMacroInput.JavaKeyEvent.VK_F7; break; case 8: keyToPress = JavaOpenMacroInput.JavaKeyEvent.VK_F8; break; default: break; } foreach (var item in m_target.GetJavaOMISelected()) { item.Keyboard(keyToPress); } }
private void SelectWeapon(int weaponIndex) { if (weaponIndex > 0 && weaponIndex < 7) { JavaOpenMacroInput.JavaKeyEvent key = JavaOpenMacroInput.JavaKeyEvent.VK_1; switch (weaponIndex) { case 1: key = JavaOpenMacroInput.JavaKeyEvent.VK_1; break; case 2: key = JavaOpenMacroInput.JavaKeyEvent.VK_2; break; case 3: key = JavaOpenMacroInput.JavaKeyEvent.VK_3; break; case 4: key = JavaOpenMacroInput.JavaKeyEvent.VK_4; break; case 5: key = JavaOpenMacroInput.JavaKeyEvent.VK_5; break; case 6: key = JavaOpenMacroInput.JavaKeyEvent.VK_6; break; case 7: key = JavaOpenMacroInput.JavaKeyEvent.VK_7; break; case 8: key = JavaOpenMacroInput.JavaKeyEvent.VK_8; break; default: break; } foreach (var item in m_target.GetJavaOMISelected()) { item.Keyboard(key); } } }