View previous topic :: View next topic |
Author |
Message |
KK1 How do I cheat?
Reputation: 0
Joined: 27 Nov 2009 Posts: 2
|
Posted: Fri Nov 27, 2009 8:47 am Post subject: C++ Autoclicker |
|
|
Hello,
first off all, i already used the search function
but well, i do not know anything about C++ so i thought about asking you
I know it's cocky to just come here and request help, but you would really do me a favor if you could help me..
I just need a simple clicker for BF 2 (shooting attack choppers TV missiles) which starts clicking when i hold left mousebutton and stops when i release.
ofc as fast as possible
please don't flame me too hard ^^ maybe someone of you could help me out
cheers
|
|
Back to top |
|
 |
igoticecream Grandmaster Cheater Supreme
Reputation: 0
Joined: 23 Apr 2006 Posts: 1807 Location: 0x00400000
|
Posted: Fri Nov 27, 2009 2:01 pm Post subject: |
|
|
i got one
Code: |
int _tmain(int argc, _TCHAR* argv[])
{
INPUT input[2];
input[0].type = INPUT_MOUSE;
input[0].mi.dx = 0;
input[0].mi.dy = 0;
input[0].mi.mouseData = 0;
input[0].mi.time = 0;
puts("Clickkk will start when you press F12");
while(!GetAsyncKeyState(VK_F12)){ Sleep(1); }
puts("Starting...");
Sleep(100);
for(;!GetAsyncKeyState(VK_F12);Sleep(10)){
input[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
SendInput(1, input, sizeof(INPUT));
input[0].mi.dwFlags = MOUSEEVENTF_LEFTUP;
SendInput(1, input, sizeof(INPUT));
}
puts("Done");
system("PAUSE");
return 0;
}
|
_________________
+~ |
|
Back to top |
|
 |
KK1 How do I cheat?
Reputation: 0
Joined: 27 Nov 2009 Posts: 2
|
Posted: Fri Nov 27, 2009 2:42 pm Post subject: |
|
|
Thank you alot that far
What do i have to do with this script now? I downloaded the Dev compiler, do i just have to insert and compile it?
Sorry for my noobiness
Thank you
|
|
Back to top |
|
 |
igoticecream Grandmaster Cheater Supreme
Reputation: 0
Joined: 23 Apr 2006 Posts: 1807 Location: 0x00400000
|
Posted: Fri Nov 27, 2009 4:34 pm Post subject: |
|
|
That is not a script, that is a C source code.
I guess you can compile it with Dev-C... but i made this for visual C++. Download Visual C++ express since is free, or Visual Studio with a crack.
_________________
+~ |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Nov 27, 2009 4:41 pm Post subject: |
|
|
igoticecream wrote: | i got one
Code: |
int _tmain(int argc, _TCHAR* argv[])
{
INPUT input[2];
input[0].type = INPUT_MOUSE;
input[0].mi.dx = 0;
input[0].mi.dy = 0;
input[0].mi.mouseData = 0;
input[0].mi.time = 0;
puts("Clickkk will start when you press F12");
while(!GetAsyncKeyState(VK_F12)){ Sleep(1); }
puts("Starting...");
Sleep(100);
for(;!GetAsyncKeyState(VK_F12);Sleep(10)){
input[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
SendInput(1, input, sizeof(INPUT));
input[0].mi.dwFlags = MOUSEEVENTF_LEFTUP;
SendInput(1, input, sizeof(INPUT));
}
puts("Done");
system("PAUSE");
return 0;
}
|
|
why are you calling SendInput twice?
also system calls are evil.
|
|
Back to top |
|
 |
igoticecream Grandmaster Cheater Supreme
Reputation: 0
Joined: 23 Apr 2006 Posts: 1807 Location: 0x00400000
|
Posted: Fri Nov 27, 2009 8:47 pm Post subject: |
|
|
yea, i always use _getch(), but no this time lol
twice, push mouse button and then release it
_________________
+~ |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Nov 27, 2009 9:21 pm Post subject: |
|
|
Code: | INPUT ip[2] = { 0 };
ip[0].type = INPUT_MOUSE;
ip[0].mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
ip[1].type = INPUT_MOUSE;
ip[1].mi.dwFlags = MOUSEEVENTF_LEFTUP;
...
SendInput(2, ip, sizeof(INPUT)); |
magic.
oh the wonders of what can be accomplished from reading the functions MSDN page:
http://msdn.microsoft.com/en-us/library/ms646310%28VS.85%29.aspx
|
|
Back to top |
|
 |
igoticecream Grandmaster Cheater Supreme
Reputation: 0
Joined: 23 Apr 2006 Posts: 1807 Location: 0x00400000
|
|
Back to top |
|
 |
Fendaril Cheater
Reputation: 0
Joined: 08 Nov 2009 Posts: 27
|
Posted: Sat Nov 28, 2009 11:03 am Post subject: |
|
|
MSDN Owns.
|
|
Back to top |
|
 |
|