Nothing to do with changing the bytes.
Here's a hint, add a clock timer to the rapidfire.
Hey, I was just wondering how to make rapid fire "more controllable" so instead it being set at max you can set it to a certain speed. Here's the code for rapid fire, so basically what I'm saying is if there is a way to slow rapid fire down by changing the bytes? Oh and ignore the blabla stuff, it's just to help reduce lag.
Code:if(GetAsyncKeyState(VK_LBUTTON)<0 && IRapidfire && Status) { if( !blabla[0] ) { WriteOpCode((PBYTE)RapidFire, (PBYTE)"\x90\x90", 2); blabla[0] = true; } } else { if( blabla[0] ) { WriteOpCode((PBYTE)RapidFire, (PBYTE)"\x74\x3E", 2); blabla[0] = false; } }
Nothing to do with changing the bytes.
Here's a hint, add a clock timer to the rapidfire.
I believe i'm using 90 milliseconds for mine.
arun823 (06-18-2012)
clock_t timer;
if (clock() < timer)
{
deactivate();
}else{
timer = clock () + 0.08 * CLOCKS_PER_SEC ;
activate();
}
arun823 (06-18-2012)
^ Yeah what mat posted.
arun823 (06-18-2012)
It won't stop firing -__-
Code:clock_t timer; if(GetAsyncKeyState(VK_LBUTTON)<0 && IRapidFire && Status) { if(clock() < timer) { WriteOpCode( (PBYTE)RapidFire1, (PBYTE)"\x74\x09", 2); WriteOpCode( (PBYTE)RapidFire2, (PBYTE)"\x80\xBE\xE0\x00\x00\x00\x00", 7); WriteOpCode( (PBYTE)RapidFire3, (PBYTE)"\x7E\x15", 2); WriteOpCode( (PBYTE)RapidFire4, (PBYTE)"\x74\x3E", 2); WriteOpCode( (PBYTE)RapidFire5, (PBYTE)"\x8B\x86\xEC\x00\x00\x00", 6); } else { timer = clock() + 0.09 * CLOCKS_PER_SEC; WriteOpCode((PBYTE)RapidFire1, (PBYTE)"\x90\x90", 2); WriteOpCode((PBYTE)RapidFire2, (PBYTE)"\x90\x90\x90\x90\x90\x90\x90", 7); WriteOpCode((PBYTE)RapidFire3, (PBYTE)"\x90\x90", 2); WriteOpCode((PBYTE)RapidFire4, (PBYTE)"\x90\x90", 2); WriteOpCode((PBYTE)RapidFire5, (PBYTE)"\x90\x90\x90\x90\x90\x90", 6); } }
Here's a Working Rapidfire
https://www.mpgh.net/forum/207-combat...addresses.html
Credits to Atomic,
This also includes a Clock Timer just as @Xipher Stated.
arun823 (06-18-2012)
The most easiest way to create a timer is make a new thread when rapidfire is enabled and dispose of thread when disabled, anyway in the thread you can use the sleep function to set a boolean for rapidfire...
example...
then in your main hack thread you would check the condition of RapidFireWrite..Code:while (True) do begin asm pushad; end; RapidFireWrite:= Not RapidFireWrite; Sleep(90); asm popad; end; end;
While RapidFireWrite = True do
writebytes(rapidfireON);
writebyte(rapidfireOFF);
anyway you get the idea, the extra thread for the "timer" is used to stop lag and make it more readable and easier to implement.
Last edited by Departure; 06-20-2012 at 01:26 AM.