Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 16:39

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

Advertisement



.Bot C++ Bot API

Discussion on .Bot C++ Bot API within the C/C++ forum part of the Coders Den category.

Reply
 
Old 09/20/2007, 20:56   #16
 
elite*gold: 0
Join Date: Jun 2006
Posts: 28
Received Thanks: 0
Quote:
Originally Posted by Harko View Post
you are just an arrogant douchebag.

programming means learning and he tries to learn something while sharing his stuff with the community.

ah and to speak in your language:


"/discuss if it's just a fake or not"

but I can tell you, you can only impress little kids with your screenshot ; )
So, ich habe soeben meine Posts editiert, da meine Laune wirklich mies war.
Englisch habe Ich geschrieben, weil Ich hier nur gelegentlich vorbeischaue und sonst auf internationalen Foren aktiv bin.

"/discuss if it's just a fake or not"
Wir faken wohl beide nicht. Du hast dir offensichtlich viel Mühe gegeben, als du die Messages reversed hast - Nice one.

Und nochmal Entschuldigung für meine überaus schlechte Laune und Ausdrucksweise.
bobbyladdy is offline  
Old 09/21/2007, 07:57   #17
 
CracKPod's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 41
Received Thanks: 11
Falls du mich in deine Entschuldigung miteibezogen hast,
so siehe ein paar Posts vorher ich nehme deine Entschuldigung gerne
an und habe mich auch schon bereits entschuldigt.

Jeder hat mal so Tage.

MfG,
CracKPod

PS:
Der Screenshot mit dieser dos umgebung...
Sah irgendwie aus wie ein Live-Debugger der Warden überwacht.

Kann das sein?
CracKPod is offline  
Old 09/21/2007, 14:43   #18
 
elite*gold: 0
Join Date: Jun 2006
Posts: 28
Received Thanks: 0
Quote:
Originally Posted by CracKPod View Post
Der Screenshot mit dieser dos umgebung...
Sah irgendwie aus wie ein Live-Debugger der Warden überwacht.

Kann das sein?
Harko hat wohl eine DLL geschrieben, welche das Laden und abarbeiten der Messages von Warden überwacht und übermittelt diese Daten dann einfach an die Console.

Quote:
Originally Posted by CantStOp
hi
kann mir bitte jemand erklären wie ich die koordinaten von der hp leiste bekomm
am besten gleich bei icq 163880327
Du solltest das etwas spezifischer ausdrücken.
Wenn du die Screen-Coordinaten im Vollbildmodus meinst, mach doch einfach nen Screenshot mit der Druck-Taste und füge sie in Paint ein. Danach Zoomst du auf die HP-Leiste und gehst mit dem Mauszeiger über den Punkt, dessen Koordinaten du wissen möchtest. Dann musst du diese nurnoch unten in der Infoleiste ablesen.
bobbyladdy is offline  
Old 09/21/2007, 19:42   #19
 
CracKPod's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 41
Received Thanks: 11
Also ich bin noch ziemlich neu in C++, aber es kann doch durchaus sein
das Kal Online dagegen geschützt ist glaubst net?

MfG,
CracKPod
CracKPod is offline  
Old 09/22/2007, 12:50   #20
 
CracKPod's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 41
Received Thanks: 11
Doch soweit ich das verstanden habe (auch wenn ich von sowas noch gar
keine Ahnung habe) nimms du ja das Handle des Fenster.
Eventuell kann das detected werden.

MfG,
CracKPod
CracKPod is offline  
Old 09/30/2007, 22:02   #21
 
elite*gold: 0
Join Date: Sep 2007
Posts: 47
Received Thanks: 16
hi,

just question since i carnt read all these post in german
i carnt seem to register on the website and idea? is closed or
why isnit letting me.

InsaneCoder
InsaneCoder is offline  
Old 10/02/2007, 01:42   #22
 
elite*gold: 0
Join Date: Oct 2005
Posts: 2,487
Received Thanks: 215
So hab mal einiges zusammengebracht was nützlich sein könnte, würde mich über Verbesserungsvorschläge sehr freuen Bei der SendString funktion wäre eine übersetzung des chars in den keycode angebracht, gibts auch ne API funktion von.. muss ich mal schaue. Die Funktionen kann man natürlich noch in ne klasse packen um das ganze objekt orientiert zu gestalten.

Code:
void mouseclick(int x, int y)
{
     mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, (x * (65535 / GetSystemMetrics(SM_CXSCREEN))), (y * (65535 / GetSystemMetrics(SM_CYSCREEN))), 0, 0);
     mouse_event(MOUSEEVENTF_LEFTDOWN, 0,0,0,0);
     mouse_event(MOUSEEVENTF_LEFTUP, 0,0,0,0);
}

void mousemove(int x, int y)
{
     mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, (x * (65535 / GetSystemMetrics(SM_CXSCREEN))), (y * (65535 / GetSystemMetrics(SM_CYSCREEN))), 0, 0);
}



void sendkeys(string keys) //Sonderzeichen noch nicht berücksichtigt, kriegen eigene Funktion
{

        char charcode[36];

        charcode[0] = 'a';
        charcode[1] = 'b';
        charcode[2] = 'c';
        charcode[3] = 'd';
        charcode[4] = 'e';
        charcode[5] = 'f';
        charcode[6] = 'g';
        charcode[7] = 'h';
        charcode[8] = 'i';
        charcode[9] = 'j';
        charcode[10] = 'k';
        charcode[11] = 'l';
        charcode[12] = 'm';
        charcode[13] = 'n';
        charcode[14] = 'o';
        charcode[15] = 'p';
        charcode[16] = 'q';
        charcode[17] = 'r';
        charcode[18] = 's';
        charcode[19] = 't';
        charcode[20] = 'u';
        charcode[21] = 'v';
        charcode[22] = 'w';
        charcode[23] = 'x';
        charcode[25] = 'z';
        charcode[26] = '1';
        charcode[27] = '2';
        charcode[28] = '3';
        charcode[29] = '4';
        charcode[30] = '5';
        charcode[31] = '6';
        charcode[32] = '7';
        charcode[33] = '8';
        charcode[34] = '9';
        charcode[35] = '0';

        int keycodes[36];

        keycodes[0] = 0x41;
        keycodes[1] = 0x42;
        keycodes[2] = 0x43;
        keycodes[3] = 0x44;
        keycodes[4] = 0x45;
        keycodes[5] = 0x46;
        keycodes[6] = 0x47;
        keycodes[7] = 0x48;
        keycodes[8] = 0x49;
        keycodes[9] = 0x4A;
        keycodes[10] = 0x4B;
        keycodes[11] = 0x4C;
        keycodes[12] = 0x4D;
        keycodes[13] = 0x4E;
        keycodes[14] = 0x4F;
        keycodes[15] = 0x50;
        keycodes[16] = 0x51;
        keycodes[17] = 0x52;
        keycodes[18] = 0x53;
        keycodes[19] = 0x54;
        keycodes[20] = 0x55;
        keycodes[21] = 0x56;
        keycodes[22] = 0x57;
        keycodes[23] = 0x58;
        keycodes[24] = 0x59;
        keycodes[25] = 0x5A;
        keycodes[26] = 0x31;
        keycodes[27] = 0x32;
        keycodes[28] = 0x33;
        keycodes[29] = 0x34;
        keycodes[30] = 0x35;
        keycodes[31] = 0x36;
        keycodes[32] = 0x37;
        keycodes[33] = 0x38;
        keycodes[34] = 0x39;
        keycodes[35] = 0x30;


     int length = keys.length();

     for (int i = 0; i <= length; i++)
     {
         for (int k = 0; k < 35; k++)
         {
               if (keys[i] == charcode[k])
               {
                                keybd_event(keycodes[k], 0, 0, 0);
                                keybd_event(keycodes[k], 0, KEYEVENTF_KEYUP, 0);
                                randomsleep(150, 200); //humanes eintippen
               }

         }
     }
}

void randomsleep(int min, int max)
{
    if (min > max)
    {
            cerr << "Min Value > Max Value, logical error.";
    }

    srand( (unsigned)time( NULL ) );
    int value = rand()%max;

    while (value < min)
    {
          value = rand()%max;
    }

    Sleep(value);
}

int randomvalue(int min, int max)
{
    if (min > max)
    {
            cerr << "Min Value > Max Value, logical error.";
    }

    srand( (unsigned)time( NULL ) );
    int value = rand()%max;

    while (value < min)
    {
          value = rand()%max;
    }

    return value;
}

void WinActivate(string win.c_str())
{

    game = FindWindow(NULL, win.c_str()); //hab ich noch nicht ausprobiert
    ShowWindow(game, SW_RESTORE);
    SetForegroundWindow(game);
    SetFocus(game);

}
Term!nX is offline  
Old 10/02/2007, 11:40   #23
 
elite*gold: 0
Join Date: May 2006
Posts: 162
Received Thanks: 44
- random sollte nur einmal initialisiert werden, srand sollte also nicht jedesmal aufgerufen werden

- ein simples macro das ich auch benutze für rand:
#define getrandom( min, max ) ((rand() % (int)(((max) + 1) - (min))) + (min))

hier noch paar weitere exemplare aus einer alten source code von mir:

Code:
int ReqSendInput::GetwParamKeyDown(int scancode)
{	
	int repeat = 1;
	int extended = 0;
	int wParam = 0;	
	wParam = (wParam | extended) << 8;	
	wParam = (wParam | scancode) << 16;	
	wParam = (wParam | repeat);		
	return wParam;
}

int ReqSendInput::GetwParamKeyUp(int scancode)
{	
	int repeat = 1;
	int extended = 0;
	int wParam = 0;	
	wParam = (wParam | 3) << 0x6;
	wParam = (wParam | extended) << 8;	
	wParam = (wParam | scancode) << 16;	
	wParam = (wParam | repeat);		
	return wParam;
}

void ReqSendInput::Send(int vkey)
{
	int scancode = MapVirtualKey(vkey, 0);	

	SendMessageA(hProcessWindow, WM_KEYDOWN, vkey, GetwParamKeyDown(scancode));
	Sleep(30);
	SendMessageA(hProcessWindow, WM_KEYUP, vkey, GetwParamKeyUp(scancode));
	Sleep(30);
}

void ReqSendInput::SendLeftMouseButton(int x, int y)
{
	int lParam = x | (y << 16);	

	SendMessageA(hProcessWindow, WM_LBUTTONDOWN, 0, lParam);
	Sleep(30);
	SendMessageA(hProcessWindow, WM_LBUTTONUP, 0, lParam);
	Sleep(30);
}

void ReqSendInput::SendRightMouseButton(int x, int y)
{
	int lParam = x | (y << 16);	

	SendMessageA(hProcessWindow, WM_RBUTTONDOWN, 0, lParam);
	Sleep(30);
	SendMessageA(hProcessWindow, WM_RBUTTONUP, 0, lParam);
	Sleep(30);
}
sehen etwas stümperhaft aus aber sind auch schon etwas älter und hatten damals immer funktioniert : p
Harko is offline  
Old 10/02/2007, 23:20   #24
 
elite*gold: 0
Join Date: Oct 2005
Posts: 2,487
Received Thanks: 215
Hm. Das SendMessage muss ich mal bei GW ausprobieren. Denn die Inputs von keybd event blockiert GW. Mir wurde einmal gesagt, dass das daran liegen könnte, dass GW nur Inputs vom Treiber verarbeitet.. Also wenn SendMessage auch nicht klappt, könnte man das eigentlich als Beweis dafür sehen.
Term!nX is offline  
Old 10/03/2007, 00:20   #25
 
elite*gold: 0
Join Date: May 2006
Posts: 162
Received Thanks: 44
Quote:
Originally Posted by Term!nX View Post
Hm. Das SendMessage muss ich mal bei GW ausprobieren. Denn die Inputs von keybd event blockiert GW. Mir wurde einmal gesagt, dass das daran liegen könnte, dass GW nur Inputs vom Treiber verarbeitet.. Also wenn SendMessage auch nicht klappt, könnte man das eigentlich als Beweis dafür sehen.
Das ist Blödsinn. GW benutzt eine normale Windows Message Loop und GetKeyState/GetKeyStateAsync. Wie auch fast jedes andere Spiel.
Harko is offline  
Old 10/03/2007, 11:09   #26
 
elite*gold: 0
Join Date: Oct 2005
Posts: 2,487
Received Thanks: 215
Achso. Aber aus welchem Grund löst eine mit keybd_event + scancodes emulierte 8 von mir aus, nicht Skill 8 aus? Oder warum kann man mit einem gesendeten Enter nicht den Missionbetreten Dialog beantworten? Das lustige ist, wenn ich den GW-Chat öffne, dann werden die emulierten Keystrokes in die Chatleiste geschrieben.
Term!nX is offline  
Old 10/03/2007, 23:47   #27
 
craby987's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 130
Received Thanks: 41
Dude when I say this I respect your coding skills alright?

Bots that look for "pixels" are lame and are very limited. Bots that search data structures in the memory for NPC'S or Humans are REAL bots.

For instance: Your health value is stored at 0x14B8 so you code a program to read the value from there.

Lets say 0x14B8 = 500.

Here is a function in english: If 0x14B8 > 450, press the key "VK_W".
Else, press the key "VK_S". That is what a real bot does!

or for player position

float X = ReadProcessMemory 0x14C8
float Y = ReadProcessMemory 0x14C9
float Z = ReadProcessMemory 0x14D0

(btw && means "and" in C++)
If X=546.6 && Y=346.9 && Z=34.0 , then press the key "VK_SPACE".

As you noticed 0x14B8 and 0x14C8 are very close together. That is because they are in a player structure. Take a look at this:


Of course this is a basic data structure but im only giving and example.
craby987 is offline  
Old 10/04/2007, 00:41   #28
 
elite*gold: 0
Join Date: May 2006
Posts: 162
Received Thanks: 44
Quote:
Originally Posted by craby987 View Post
Dude when I say this I respect your coding skills alright?

Bots that look for "pixels" are lame and are very limited. Bots that search data structures in the memory for NPC'S or Humans are REAL bots.
Dude, there is nothing like real, lame or limited. These are personal opinions based on expierence and achievement. For some people the usage of memory based bots could be very limited, too since the game itself requests alot of cpu and ram. So the next guy could say all bots beside clientless bots are lame and not real bots. But such arguments are stupid.
Harko is offline  
Old 06/30/2009, 15:37   #29
 
elite*gold: 0
Join Date: Jun 2009
Posts: 14
Received Thanks: 1
Hi Leute
Ich wollte diesen Thread mal wieder auf leben lassen.

Vielleicht antwortet ja einer

Ich möchte gern die Koordinaten des Spiels auslesen(also map koordinaten).Geht das auch irgendwie?
theplake is offline  
Old 06/30/2009, 16:03   #30
 
elite*gold: 0
Join Date: Mar 2008
Posts: 747
Received Thanks: 245
Ja man kann mittels memory sercher wie cheat engine
die variablen in dennen die kordinaten stehen herausfinden. und diese natürlich auch auslesen.
Akorn is offline  
Reply




All times are GMT +1. The time now is 16:39.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.