Last active
December 12, 2019 17:55
-
-
Save nirinium/c8812cb0b7dd492f2f7e9e978875d221 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rapid Fire.cpp : Defines the entry point for the console application.// Copyright 2013 @ EPiC REV | |
#include "stdafx.h" | |
#include <iostream> | |
#include <Windows.h> | |
#include <time.h> | |
using namespace std; | |
int main() | |
{ | |
cout << "===============================================================================" << endl; | |
cout << "External Rapid Fire by Nirinium " << endl; | |
cout << "===============================================================================" << endl; | |
cout << "Press right-click in game to rapid fire." << endl; | |
bool RapidFire = false; | |
int AutoFireTimer = clock(); | |
int currentTime; | |
bool MouseDown = false; | |
while(true) | |
{ | |
//Check for right mouse button to be down. | |
if(GetAsyncKeyState(VK_RBUTTON) & 0x8000)RapidFire = true; | |
else RapidFire = false; | |
if(RapidFire) | |
{ | |
//only go if so many milliseconds have passed. | |
if(!MouseDown) | |
{ | |
MouseDown = true; | |
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); // | |
} | |
if(clock() - AutoFireTimer > 21) | |
{ | |
MouseDown = false; | |
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); // | |
AutoFireTimer = clock(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment