Well, I'm really interested in this subj. I can't find info about how it works. Maybe I should hook MoveMouse or SetCursorPos, i'm not sure. Please help?!
zdacom (12-19-2012)
Just to elaborate on what ctpsolo said about no recoil, "No Recoil" is just NOP'd (No Operation) bytes inside the game. You use the address to jump to that area in the game, and then nop the specific bytes there. NOPing the bytes in that specific area basically replaces the normal code and says "Hey, you won't do anything here". That's the jist of the "No Recoil" hack.
Currently coding applications in Java and C++.
"It is change, continuing change, inevitable change, that is the dominant factor in society today. No sensible decision can be made any longer without taking into account not only the world as it is, but the world as it will be." -Isaac Asimov
No Recoil:
Everything said above is correct. When you "NOP" something you are giving that location in memory "No Operation". This means that the location in memory will not do anything anymore. It wont do what its meant to do.
When we give our recoil addresses no operation, it disables the recoil effect since the location in memory which is supposed to add that effect is now doing nothing. This is because we give it no operation (NOP).
Example:
You need to restore the original memory of the location when the user wants to disable the featureCode:#define ADDR_RECOIL1 0x374BDF40 #define ADDR_RECOIL2 0x374061D9 #define ADDR_RECOIL3 0x374BDF54 #define ADDR_RECOIL4 0x374BDF57 #define ADDR_RECOIL5 0x374BDF60 void cMisc::NoRecoil(bool OnOff) { if( OnOff && InGame ) { Tools.MemoryEdit((void*)(Addresses->Address[ADDR_RECOIL1].Value), (void*)"\x90\x90\x90", 3); Tools.MemoryEdit((void*)(Addresses->Address[ADDR_RECOIL2].Value), (void*)"\x90\x90\x90", 3); Tools.MemoryEdit((void*)(Addresses->Address[ADDR_RECOIL3].Value), (void*)"\x90\x90\x90", 3); Tools.MemoryEdit((void*)(Addresses->Address[ADDR_RECOIL4].Value), (void*)"\x90\x90\x90", 3); Tools.MemoryEdit((void*)(Addresses->Address[ADDR_RECOIL5].Value), (void*)"\x90\x90\x90", 3); } else { Tools.MemoryEdit((void*)(Addresses->Address[ADDR_RECOIL1].Value), (void*)"\xD8\x66\x54", 3); Tools.MemoryEdit((void*)(Addresses->Address[ADDR_RECOIL2].Value), (void*)"\xD9\x46\x54", 3); Tools.MemoryEdit((void*)(Addresses->Address[ADDR_RECOIL3].Value), (void*)"\xD9\x5E\x54", 3); Tools.MemoryEdit((void*)(Addresses->Address[ADDR_RECOIL4].Value), (void*)"\xD9\x46\x48", 3); Tools.MemoryEdit((void*)(Addresses->Address[ADDR_RECOIL5].Value), (void*)"\xD9\x5E\x48", 3); } }
That'll bring back the recoil effect.
--------------------------------------
No Spread:
No spread is done by accessing the console command system built into the game. We can call the function and send our own values to achieve what we desire.
The game defines the spread effect through about 5 different console commands. Each of them have a value that is set. We send push those commands with our set of values, disabling the effect.
Example:
The values in brackets are the default values.Code:PerturbRotationEffect 0.000000 (3.000000) PerturbIncreaseSpeed 0.000000 (3.000000) PerturbWalkPercent 0.000000 (9.000000) PerturbFiringIncreaseSpeed 0.000000 (0.500000) PerturbRecoil 0.000000 (9.000000) FireMovePerturb 0.000000 (9.000000) ZoomedFireMoveDuckPerturb 0.000000 (9.000000) ZoomedFireMovePerturb 0.000000 (9.000000) ZoomedFireDuckPerturb 0.000000 (9.000000)
Good luck
Last edited by Flengo; 12-19-2012 at 09:21 AM.
I Read All Of My PM's & VM'sIf you need help with anything, just let me know.
Staff Administrator Since 10.13.2019
Publicist Since 04.04.2015
Middleman Since 04.14.2014
Global Moderator Since 08.01.2013
Premium Since 05.29.2013
Minion+ Since 04.18.2013
Combat Arms Minion Since 12.26.2012
Contributor Since 11.16.2012
Member Since 05.11.2010
zdacom (12-19-2012)
Saying how no recoil works by saying "The game defines the spread effect through about 5 different console commands. Each of them have a value that is set. We send push those commands with our set of values, disabling the effect." isn't going to help him as he won't understand how the console works...
So lets me elaborate that:
Accessing the built in engine console(present in all fear Games(That's what engine CA use's)) is done in two steps, Accessing and Setting: He went into very little detail on the Setting but i'll elaborate that more.
Calling:
Lets take this ptc for example purposes,
as you can see we access it VIA assembly(The closest we can get to programming in binary). Now lets take a look at how it worksCode:void ptCommand(const char* Command){ _asm { pushad push Command mov eax, LTClientEXE call eax add esp, 0x4 popad }}
Code:void ptCommand(const char* Command){ _asm { //Declares we will work with ASM pushad push Command //Pushes out string to the Stack mov eax, LTClientEXE //Copies EAX(Register) to our Address call eax //Calls the register add esp, 0x4 //Adds 0x4 to ESP popad //Pops all registers }}
If you don't understand what registers, or even what basic ASM is, i'd recommend reading a book on it as it's a fascinating structure for programming
Now the Setting:
It can be though of like a bool and a int.
if(mybool) do something;
if(!mybool) don't do it;
This is esentailly how it works because when we call it we use either the bool side in sense or set a number to it like so:
ptCommand("FogEnable 1" ); //Bool Example on
ptCommand("FogEnable 0" ); //Bool Example off
BUT this one has to be thought about logically, Fog enabled 1 will make it so there IS fog
Flengo_Backup (12-19-2012),zdacom (12-20-2012)
Thanks for detailed comments, I'm masm32 programmer, I know asm. I was thinking about universal norecoil thats why I asked about how it works. I was Thinking about to hook Mousemove functions and to save position on click (hook onclick event). So if it is allready done in console I'm going to see cshell.dll for details dumped it already.
Flengo_Backup (12-19-2012)