//IntPtr handle = static void Main(string[] args) { BotLoader.AddSearchPath("../../../UltraBot/Bots/"); var KenBot = BotLoader.LoadBotFromFile("KenBot"); KenBot.Init(0); Util.Init(); DX9Overlay.SetParam("process", "SSFIV.exe"); DX9Overlay.DestroyAllVisual(); TextLabel roundTimer = new TextLabel("Consolas", 10, TypeFace.NONE, new Point(390, 0), Color.White, "", true, true); TextLabel player1 = new TextLabel("Consolas", 10, TypeFace.NONE, new Point(90, 0), Color.White, "", true, true); TextLabel player2 = new TextLabel("Consolas", 10, TypeFace.NONE, new Point(480, 0), Color.White, "", true, true); //Stopwatch sw = new Stopwatch(); // Do something you want to time var ms = MatchState.getInstance(); var f1 = FighterState.getFighter(0); var f2 = FighterState.getFighter(1); KenBot.Init(0); while (true) { ms.Update(); roundTimer.Text = String.Format("Frame:{0}", ms.FrameCounter); UpdateOverlay(player1, f1); UpdateOverlay(player2, f2); KenBot.Run(); } }
static void Main(string[] args) { DX9Overlay.SetParam("process", "GFXTest32.exe"); // Set the process name DX9Overlay.DestroyAllVisual(); overlayText = DX9Overlay.TextCreateUnicode("Arial", 12, false, false, 200, 200, 0xFF00FFFF, "Hello world!\n€ÖÜŒœЄϿ", true, true); // Initialize 'overlayText' overlayBox = DX9Overlay.BoxCreate(200, 200, 100, 100, 0x50FF00FF, true); // Initialize 'overlayBox' overlayLine = DX9Overlay.LineCreate(0, 0, 300, 300, 5, 0xFFFFFFFF, true); // Initialize 'overlayLine' if (overlayText == -1 || overlayBox == -1 || overlayLine == -1) { Console.WriteLine("A error is occurred at the intializing."); Console.WriteLine("Press any key to close the application!"); Console.ReadKey(); return; } Console.WriteLine("Enter 'exit' to close the application!"); string input = Console.ReadLine(); // Get the input while (input != "exit") { DX9Overlay.TextSetString(overlayText, input); // Set 'overlayText' string to the value of 'input' input = Console.ReadLine(); } DX9Overlay.TextDestroy(overlayText); // Destroy text if the input is 'exit' DX9Overlay.BoxDestroy(overlayBox); // Destroy box if the input is 'exit' DX9Overlay.LineDestroy(overlayLine); // Destroy line if the input is 'exit' }
static void Main(string[] args) { DX9Overlay.SetParam("use_window", "1"); // Use the window name to find the process DX9Overlay.SetParam("window", "GTA:SA:MP"); // Set the window name overlayText = DX9Overlay.TextCreate("Arial", 12, false, false, 200, 200, 0xFF00FFFF, "Hello world", true, true); // Initialize 'overlayText' if (overlayText == -1) { Console.WriteLine("A error is occurred at the intializing."); Console.WriteLine("Press any key to close the application!"); Console.ReadKey(); return; } Console.WriteLine("Enter 'exit' to close the application!"); string input = Console.ReadLine(); // Get the input while (input != "exit") { DX9Overlay.TextSetString(overlayText, input); // Set 'overlayText' string to the value of 'input' input = Console.ReadLine(); } DX9Overlay.TextDestroy(overlayText); // Destroy text if the input is 'exit' }
private void OverlayEnabled_Checked(object sender, RoutedEventArgs e) { if (OverlayEnabled.IsChecked.Value) { StatusLabel.Content = "Enabling Overlay..."; DX9Overlay.SetParam("process", "SSFIV.exe"); DX9Overlay.DestroyAllVisual(); roundTimer = new TextLabel("Consolas", 10, TypeFace.NONE, new System.Drawing.Point(4, 700), Color.White, "", true, true); player1 = new TextLabel("Consolas", 10, TypeFace.NONE, new System.Drawing.Point(5, 0), Color.White, "", true, true); player2 = new TextLabel("Consolas", 10, TypeFace.NONE, new System.Drawing.Point(460, 0), Color.White, "", true, true); restartWorker(); } else { StatusLabel.Content = "Disabling Overlay..."; DX9Overlay.DestroyAllVisual(); restartWorker(); } }
static void Main(string[] args) { //DX9Overlay.SetParam("use_window", "1"); // Use the window name to find the process //DX9Overlay.SetParam("window", "GTA:SA:MP"); // Set the window name //DX9Overlay.SetParam("process", "CastlevaniaLoSUE.exe"); if (args.Length < 1) { return; } var proc = args[0]; DX9Overlay.SetParam("process", proc); DX9Overlay.DestroyAllVisual(); overlayText = DX9Overlay.TextCreate("Consolas", 12, false, false, 10, 14, 0xFF00FFFF, "DualShock 3 #1 (USB, Battery: 80%)", true, true); // Initialize 'overlayText' if (overlayText == -1) { Console.WriteLine("A error is occurred at the intializing."); Console.WriteLine("Press any key to close the application!"); Console.ReadKey(); return; } DX9Overlay.ImageCreate(@"D:\Temp\battery_discharging_080.png", 165, 5, 0.7f, 0.7f, 90, 1, true); //DX9Overlay.BoxCreate(10, 50, 100, 100, 0x15FF0000, true); Console.WriteLine("Enter 'exit' to close the application!"); string input = Console.ReadLine(); // Get the input while (input != "exit") { Console.WriteLine("FPS = {0}", DX9Overlay.GetFrameRate()); DX9Overlay.TextSetString(overlayText, input); // Set 'overlayText' string to the value of 'input' input = Console.ReadLine(); } DX9Overlay.DestroyAllVisual(); }