Recoil Macro for Logitech Gaming Mouse

Posts 115 of 215 · Page 1 of 15
Recoil Macro for Logitech Gaming Mouse
Recently I founded this code and added this script in my mouse.
Code:
function OnEvent(event, arg)
    OutputLogMessage("event = %s, arg = %d\n", event, arg)
    if (event == "PROFILE_ACTIVATED") then
        EnablePrimaryMouseButtonEvents(true)
    elseif event == "PROFILE_DEACTIVATED" then
        ReleaseMouseButton(2)  -- to prevent it from being stuck on
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
        recoil = not recoil
        spot = not spot
    end
   if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
        if recoil then
            repeat
                --Sleep(35)
                Sleep(8)
                MoveMouseRelative(0, 2)
               
            until not IsMouseButtonPressed(1)
        end
    end
end
This code manage to control all type of AR and SMG recoil while tap or spray with normal scope, dot scope, and holographic.

But I wasn't able to make 4x scope and 8x scope's recoil steady. Can someone help me out with this and I am trying to make it when I press a certain key it will switch between all type of scope recoil.
It would take testing, but depending on the amount of recoil you want adjusted, raise or lower the Sleep(X) to get more recovery or less recovery.

Higher number of sleep will mean it has less recovery and lower number will mean it has more, like i said tho, it will take testing to get it perfect for 4 and 8 times scopes.

If it isnt enough you can also raise or lower the MoveMouseRelative(0, X) to increase the amount it jumps every time the seconds tick, but i would focus more on the Sleep and less on the Distance otherwise it wont be so smooth when it adjusts
while testing the 4x scope, when every I tap more then 3 times the scope move to left or right. How can I keep it to the center? I am not understanding how "MoveMouseRelative(0, 2)" this really work.
Quote Originally Posted by asscold1 View Post
while testing the 4x scope, when every I tap more then 3 times the scope move to left or right. How can I keep it to the center? I am not understanding how "MoveMouseRelative(0, 2)" this really work.
Find out which direction its going then u can make 0,2 into 1,2 or -1,2 Depending on the direction

Basically what it means is:

--Sleep(35) // Makes it wait 35 Miliseconds
Sleep(8) // Makes it wait 8 Miliseconds
MoveMouseRelative(0, 2) // Makes the mouse move 2 pixels down (although I would think -2 would be down and 2 would be up)

In MoveMouseRelative(X, Y) the first number would be ur left or right and the second number would be up and down.
What did i need to use this?
Quote Originally Posted by AbaCafe27 View Post
What did i need to use this?
Starting with a brain.exe followed by a mouse thats from logitech?

smh..
Should not use scripts as Battleeye will ban you, and especially public ones. Just drag down lol, its ez.
Quote Originally Posted by Calimeister View Post
Should not use scripts as Battleeye will ban you, and especially public ones. Just drag down lol, its ez.
In this case no, the macro is at driver side (inside the logitech software), it's not at autoit script, it cannot be found by BE.
On the other side, it makes the "manually" shots too exact timed, so you could be caught (but not because of the macro).
In BF (especially BF3) this type of macro were widely used and they started to trace it (with the method above), but I doubt they'll do anything similar here.
Nope, BE does not ban this type of scripts.

- - - Updated - - -

Quote Originally Posted by Syruz View Post
Find out which direction its going then u can make 0,2 into 1,2 or -1,2 Depending on the direction

Basically what it means is:

--Sleep(35) // Makes it wait 35 Miliseconds
Sleep(8) // Makes it wait 8 Miliseconds
MoveMouseRelative(0, 2) // Makes the mouse move 2 pixels down (although I would think -2 would be down and 2 would be up)

In MoveMouseRelative(X, Y) the first number would be ur left or right and the second number would be up and down.
Code:
function OnEvent(event, arg)
    OutputLogMessage("event = %s, arg = %d\n", event, arg)
    if (event == "PROFILE_ACTIVATED") then
        EnablePrimaryMouseButtonEvents(true)
    elseif event == "PROFILE_DEACTIVATED" then
        ReleaseMouseButton(2)  -- to prevent it from being stuck on
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
        recoil = not recoil
        spot = not spot
    end
   if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
        if recoil then
            repeat
                --Sleep(35)
                Sleep(8)
                MoveMouseRelative(0, 2)
            until not IsMouseButtonPressed(1)
        end
    end

	if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
        recoil = not recoil
        spot = not spot
    end
   if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
        if recoil then
            repeat
                --Sleep(35)
                Sleep(8)
                MoveMouseRelative(0, 6)
	        Sleep(8)
                MoveMouseRelative(-2, 4)
            until not IsMouseButtonPressed(1)
        end
    end
end
I am trying to make it when Press mouse button 4 it will activate "MoveMouseRelative(0, 2)" and press mouse button 5 will activate "MoveMouseRelative(0, 6) MoveMouseRelative(-2, 4)"
But in when I press 4 or 5 it still doing "(0, 2)".
Quote Originally Posted by giusis00 View Post
In this case no, the macro is at driver side (inside the logitech software), it's not at autoit script, it cannot be found by BE.
On the other side, it makes the "manually" shots too exact timed, so you could be caught (but not because of the macro).
In BF (especially BF3) this type of macro were widely used and they started to trace it (with the method above), but I doubt they'll do anything similar here.
Scripts are scripts, whether they are run through drivers or though programs or injected into the game, if they give an advantage to the player over other players they are bannable, and if BE can scan your computer and all running processes (you agreed to it when installing the game), they can easily scan for something like this running, just look at overwatch, all those people got banned for using that Autohotkey aimbot script, but using autohotkey in general didnt get you banned, thats because it was the script, not the program, same as this, its just running through logitech program instead of autohotkey.
Quote Originally Posted by Syruz View Post
Scripts are scripts, whether they are run through drivers or though programs or injected into the game, if they give an advantage to the player over other players they are bannable, and if BE can scan your computer and all running processes (you agreed to it when installing the game), they can easily scan for something like this running, just look at overwatch, all those people got banned for using that Autohotkey aimbot script, but using autohotkey in general didnt get you banned, thats because it was the script, not the program, same as this, its just running through logitech program instead of autohotkey.
You could be banned for using an external scripting engine (as I specified in my previous post), such as AHK.
The embed software used by Logitech is at driver level, it is a macro, and it is transparent: the command are like being sent by the mouse itself (imagine a hardware macro), that's why it cannot be detected by BE or any other anti-cheat software, neither by scanning your PC (there's no executable or compiled script): there's no additional software running apart the official driver, that could be scanned or intercepted.
When Logitech released the G-Series, on most fps forums, many users start to moaning about it and about the impossibility to block or trace it: you should block the whole Logitech Gaming Software, and it wouldn't be possibile for obvious reasons.

But... as I mentioned in the previous post, you can trace a macro user with other methods (like it was done in BF3)... I doubt they would lose their time doing a such check, it would be simpler to make the recoil completely unpredictable (that is the solution used by most fps to nullify the macro-recoil cheaters) to resolve or mitigate the issue.
I tried it out and it works perfectly! Didn't even know that something like this is possible with my G502
Therefore, lets hope this will stay safe but i think so
Quote Originally Posted by asscold1 View Post
Recently I founded this code and added this script in my mouse.
Code:
function OnEvent(event, arg)
    OutputLogMessage("event = %s, arg = %d\n", event, arg)
    if (event == "PROFILE_ACTIVATED") then
        EnablePrimaryMouseButtonEvents(true)
    elseif event == "PROFILE_DEACTIVATED" then
        ReleaseMouseButton(2)  -- to prevent it from being stuck on
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
        recoil = not recoil
        spot = not spot
    end
   if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
        if recoil then
            repeat
                --Sleep(35)
                Sleep(8)
                MoveMouseRelative(0, 2)
               
            until not IsMouseButtonPressed(1)
        end
    end
end
This code manage to control all type of AR and SMG recoil while tap or spray with normal scope, dot scope, and holographic.

But I wasn't able to make 4x scope and 8x scope's recoil steady. Can someone help me out with this and I am trying to make it when I press a certain key it will switch between all type of scope recoil.


I have a g402 but i dont know how to use this macro... How do i do it ?
Quote Originally Posted by asscold1 View Post
Recently I founded this code and added this script in my mouse.
Code:
function OnEvent(event, arg)
    OutputLogMessage("event = %s, arg = %d\n", event, arg)
    if (event == "PROFILE_ACTIVATED") then
        EnablePrimaryMouseButtonEvents(true)
    elseif event == "PROFILE_DEACTIVATED" then
        ReleaseMouseButton(2)  -- to prevent it from being stuck on
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
        recoil = not recoil
        spot = not spot
    end
   if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
        if recoil then
            repeat
                --Sleep(35)
                Sleep(8)
                MoveMouseRelative(0, 2)
               
            until not IsMouseButtonPressed(1)
        end
    end
end
This code manage to control all type of AR and SMG recoil while tap or spray with normal scope, dot scope, and holographic.

But I wasn't able to make 4x scope and 8x scope's recoil steady. Can someone help me out with this and I am trying to make it when I press a certain key it will switch between all type of scope recoil.
would this work for razer mouses? or just logitech?
Posts 115 of 215 · Page 1 of 15
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?