Register for your free account! | Forgot your password?

Go Back   elitepvpers > New Arrivals > Black Desert
You last visited: Today at 10:11

  • Please register to post and access all features, it's quick, easy and FREE!

 

Creating a Bot in c# that runs in the background

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2011
Posts: 16
Received Thanks: 2
[Question] Creating a Bot in c# that runs in the background

So
I learned C# a while , and now i want to create a simple bot for Black Desert
that presses a button and simulates the mouse buttons.

Code:
SendKeys.Send("{t}");
Code:
 public static void RightClick(int x, int y)
        {
            Cursor.Position = new Point(x, y);
            mouse_event((int)(MouseEventFlags.RIGHTDOWN), 0, 0, 0, 0);
            mouse_event((int)(MouseEventFlags.RIGHTUP), 0, 0, 0, 0);
}
But my first Problem is, nothing happens in the game client.
i think my program requires admin rights for this, but currently im not sure.

When this is done, how can i program it, that it runs in the background for Black Desert?
So that i can other do things on my pc.
I asked myself a long time, how that is possible.

I hope you guys can help me
and sry for my bad englisch, its not my native language^^



GaXyLa is offline  
Old   #2
 
elite*gold: 0
Join Date: Jul 2015
Posts: 92
Received Thanks: 35
Quote:
Originally Posted by GaXyLa View Post
So
I learned C# a while , and now i want to create a simple bot for Black Desert
that presses a button and simulates the mouse buttons.

Code:
SendKeys.Send("{t}");
Code:
 public static void RightClick(int x, int y)
        {
            Cursor.Position = new Point(x, y);
            mouse_event((int)(MouseEventFlags.RIGHTDOWN), 0, 0, 0, 0);
            mouse_event((int)(MouseEventFlags.RIGHTUP), 0, 0, 0, 0);
}
But my first Problem is, nothing happens in the game client.
i think my program requires admin rights for this, but currently im not sure.

When this is done, how can i program it, that it runs in the background for Black Desert?
So that i can other do things on my pc.
I asked myself a long time, how that is possible.

I hope you guys can help me
and sry for my bad englisch, its not my native language^^
Start Spy++ and have a look at the wParams when pressing a key in the window.

Use SendMessage() or SendInput() from WINAPI to send keys to the game.
If that doesnt work, xigncode or even the game itselfs blocks it. So you would need to block xigncode to debug the game and maybe call the function itself. Nowadays it can be difficult to simulate this.


Yothri is offline  
Old   #3
 
elite*gold: 24
Join Date: Jan 2008
Posts: 2,099
Received Thanks: 1,876
Quote:
Use SendMessage() or SendInput() from WINAPI to send keys to the game.
If that doesnt work, xigncode or even the game itselfs blocks it. So you would need to block xigncode to debug the game and maybe call the function itself. Nowadays it can be difficult to simulate this.
Block or unload the xigncode driver and it will work fine.

Code:
            const int WM_KEYDOWN = 0x100;
            const int WM_KEYUP = 0x101;

            PostMessage(hWnd, WM_KEYDOWN, 0x0, 0x0);
            Thread.Sleep(150);
            PostMessage(hWnd, WM_KEYUP, 0x0, 0x0);
That work's fine, but would need to be added/edited with your keycode & you would need to add intptr hwnd = getprocess.
Ploxasarus is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Darkorbit Bot which Runs on background ?
Hello Which is the best DO bot, who runs on background ? Basicly bot with who i dont have to open DO map. Its been long time since i played...
11 Replies - DarkOrbit



All times are GMT +1. The time now is 10:11.


Powered by vBulletin®
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2016 elitepvpers All Rights Reserved.