| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| DaNemeziz Master Cheater
 
  Reputation: 0 
 Joined: 29 Sep 2007
 Posts: 430
 
 
 | 
			
				|  Posted: Sat Sep 06, 2008 10:58 am    Post subject: my first c++ tool (hotkeyed auto clicker + source) |   |  
				| 
 |  
				| this is my first c++ tool, an auto clicker i started learn a bit c++ yesterday
 made it with hotkeys; f1 = start, f2 = stop
 
 its patched by game guard =( maybe somebody find a way to get it to working for maplestory?
 
 
 http://rapidshare.com/files/143137421/AutoClicker.exe.html
 
 source
 
  	  | Code: |  	  | #include "windows.h" 
 int main() {
 int autoclicker;
 
 while (true) {
 if ((GetAsyncKeyState(0x70)<0)) {
 autoclicker = 1;
 }
 
 if ((GetAsyncKeyState(0x71)<0)) {
 autoclicker = 0;
 }
 
 if (autoclicker == 1) {
 mouse_event(0x2,0,0,0,0);
 mouse_event(0x4,0,0,0,0);
 }
 
 Sleep(1);
 }
 }
 
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Robotex Master Cheater
 
  Reputation: 0 
 Joined: 05 Sep 2006
 Posts: 378
 Location: The pizza country!
 
 | 
			
				|  Posted: Sat Sep 06, 2008 12:30 pm    Post subject: |   |  
				| 
 |  
				| a small tip: if you need to check something is enabled or not, use booleans (bool) _________________
 
 
ASM/C++ Coder
 Project Speranza lead developer
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| DaNemeziz Master Cheater
 
  Reputation: 0 
 Joined: 29 Sep 2007
 Posts: 430
 
 
 | 
			
				|  Posted: Sat Sep 06, 2008 12:36 pm    Post subject: |   |  
				| 
 |  
				| where's the difference?   |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Hieroglyphics I post too much
 
  Reputation: 0 
 Joined: 06 Dec 2007
 Posts: 2007
 Location: Your bedroom
 
 | 
			
				|  Posted: Sat Sep 06, 2008 12:41 pm    Post subject: |   |  
				| 
 |  
				| You gotta use PostMessage for MS I think I have never tried for MS, but yeah just a tip since you know mouse events know use keybd_event and you can spam keys _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| DaNemeziz Master Cheater
 
  Reputation: 0 
 Joined: 29 Sep 2007
 Posts: 430
 
 
 | 
			
				|  Posted: Sat Sep 06, 2008 12:52 pm    Post subject: |   |  
				| 
 |  
				| yea i know about key spamming, already made an AutoEnter xP i know about PostMessage, never gave a look to it but as far as i know you also need to bypass PostMessage!?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| oib111 I post too much
 
  Reputation: 0 
 Joined: 02 Apr 2007
 Posts: 2947
 Location: you wanna know why?
 
 | 
			
				|  Posted: Sat Sep 06, 2008 1:20 pm    Post subject: |   |  
				| 
 |  
				| PostMessage bypass. 
 
  	  | Code: |  	  | DWORD PMA = (DWORD)GetProcAddress(LoadLibrary("USER32.DLL"), "PostMessageA");
 
 declspec(naked) BOOL PostMessageX(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
 _asm {
 mov edi, edi
 push ebp
 mov ebp, esp
 jmp[PMA]
 }
 }
 
 | 
 _________________
 
   
 
  	  | 8D wrote: |  	  | cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| DaNemeziz Master Cheater
 
  Reputation: 0 
 Joined: 29 Sep 2007
 Posts: 430
 
 
 | 
			
				|  Posted: Sat Sep 06, 2008 1:52 pm    Post subject: |   |  
				| 
 |  
				| hm thanks but where do i have to add it?  sorry, like i said i started c++ yesterday i think before int main()...?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| oib111 I post too much
 
  Reputation: 0 
 Joined: 02 Apr 2007
 Posts: 2947
 Location: you wanna know why?
 
 | 
			
				|  Posted: Sat Sep 06, 2008 1:54 pm    Post subject: |   |  
				| 
 |  
				| Yes. _________________
 
   
 
  	  | 8D wrote: |  	  | cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| DaNemeziz Master Cheater
 
  Reputation: 0 
 Joined: 29 Sep 2007
 Posts: 430
 
 
 | 
			
				|  Posted: Sat Sep 06, 2008 1:55 pm    Post subject: |   |  
				| 
 |  
				| ok then i try to find something about post message now =) thanks 
 edit : do i need any new includes?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| oib111 I post too much
 
  Reputation: 0 
 Joined: 02 Apr 2007
 Posts: 2947
 Location: you wanna know why?
 
 | 
			
				|  Posted: Sat Sep 06, 2008 2:14 pm    Post subject: |   |  
				| 
 |  
				| You don't need any new includes. Here's the MSDN page for PostMessage. _________________
 
   
 
  	  | 8D wrote: |  	  | cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| DaNemeziz Master Cheater
 
  Reputation: 0 
 Joined: 29 Sep 2007
 Posts: 430
 
 
 | 
			
				|  Posted: Sat Sep 06, 2008 2:21 pm    Post subject: |   |  
				| 
 |  
				| i get 2 errors with this postmessage bypass 
  	  | Code: |  	  | DWORD PMA = (DWORD)GetProcAddress(LoadLibrary("USER32.DLL"), "PostMessageA"); 
 declspec(naked) BOOL PostMessageX(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
 _asm {
 mov edi, edi
 push ebp
 mov ebp, esp
 jmp[PMA]
 }
 }
 | 
 
 it says that postmessagex is no parameter and that it miss a , anywhere
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| oib111 I post too much
 
  Reputation: 0 
 Joined: 02 Apr 2007
 Posts: 2947
 Location: you wanna know why?
 
 | 
			
				|  Posted: Sat Sep 06, 2008 2:26 pm    Post subject: |   |  
				| 
 |  
				| I forgot to end an ending parentheses. Change it to this: 
 
  	  | Code: |  	  | DWORD PMA = (DWORD)GetProcAddress(LoadLibrary("USER32.DLL"), "PostMessageA"));
 
 declspec(naked) BOOL PostMessageX(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
 _asm {
 mov edi, edi
 push ebp
 mov ebp, esp
 jmp[PMA]
 }
 }
 | 
 _________________
 
   
 
  	  | 8D wrote: |  	  | cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| DaNemeziz Master Cheater
 
  Reputation: 0 
 Joined: 29 Sep 2007
 Posts: 430
 
 
 | 
			
				|  Posted: Sat Sep 06, 2008 2:36 pm    Post subject: |   |  
				| 
 |  
				| now it gives me 3 errors 
 here's my current code if you want to try out on your own
 
 
  	  | Code: |  	  | #include "windows.h" #include <iostream>
 using namespace std;
 
 DWORD PMA = (DWORD)GetProcAddress(LoadLibrary("USER32.DLL"), "PostMessageA"));
 
 declspec(naked) BOOL PostMessageX(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
 _asm {
 mov edi, edi
 push ebp
 mov ebp, esp
 jmp[PMA]
 }
 }
 
 int main() {
 int autoclicker;
 
 while (true) {
 if ((GetAsyncKeyState(0x71)<0)) {
 autoclicker = 1;
 cout << "started\n";
 }
 
 if ((GetAsyncKeyState(0x72)<0)) {
 autoclicker = 0;
 cout << "stopped\n";
 }
 
 if (autoclicker == 1) {
 //left mouse click
 }
 
 Sleep(1);
 }
 }
 
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| &Vage Grandmaster Cheater Supreme
 
 ![]() Reputation: 0 
 Joined: 25 Jul 2008
 Posts: 1053
 
 
 | 
			
				|  Posted: Sat Sep 06, 2008 2:41 pm    Post subject: |   |  
				| 
 |  
				| Please learn the basics of C++ before continuing, also WIN32 APIs. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| oib111 I post too much
 
  Reputation: 0 
 Joined: 02 Apr 2007
 Posts: 2947
 Location: you wanna know why?
 
 | 
			
				|  Posted: Sat Sep 06, 2008 3:10 pm    Post subject: |   |  
				| 
 |  
				| How about giving us the errors? _________________
 
   
 
  	  | 8D wrote: |  	  | cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |