PostUniversal No Recoil for Logitech

Posts 1–7 of 7 · Page 1 of 1
Universal No Recoil for Logitech
Wanting to share what I have used for the last 2+ years.

It is universal and works for any game. You can change the strength of the recoil reduction on the fly, by pressing MouseWheel left/right.
Enjoy.

Code:
-- Universal_Simplified for Logitech GHUB
-- only testet on G604

-- some times you have to close GHUB through Taskmanager and launch it as admin, not my fault

-- main feature :
-- with mousewheel right you can increase NoRecoil strength, with mouse wheel left you can reduce strength
-- change UP,DOWN if you mouse does not support this
-- so you can use it in any game and with any weapon
-- for use in games like PUBG,RainbowSix,SuperPeople...
-- 2+ Years no ban

-- to keep track of you strength values use 
-- the console in LGHUB, 2nd screen required looks like this :
-- https://imgur.com/qoiMpRi
-- or https://docs.microsoft.com/en-us/sysinternals/downloads/debugview and filter for *NR*, can be used as overlay
-- https://imgur.com/3P2GbW2

--Settings--
--General--
UP = 13                     -- to increase NoRecoil strength, toggle Modify to change RapidFire strenght
DOWN = 12                   -- to reduce NoRecoil strength, toggle Modify to change RapidFire strenght
--NoRecoil
NR = 4		                -- distance to pull down, (default) recoil reduction
HorizontalRecoilModifier=0	-- unused, is for left right recoil	 
Sleep_ = 10                    -- delay between pull down, less for smoother
--BINDS--	
--General--                 
UP = 13                     -- to increase NoRecoil strength, + Modify to increase RapidFireNoRecoil
DOWN = 12                   -- to reduce 	
--NoRecoil 									
RC = 3                        -- right click, when you press RC and LC it pulls down
LC = 1                        -- Left click, key boud to shoot ingame 

--FUNCTIONS--						
EnablePrimaryMouseButtonEvents(true);   -- to capture primary (1) klick
OutputDebugMessage("Profil Aktiv")
function NoRecoil()
	repeat
	MoveMouseRelative(0,NR)
	Sleep(Sleep_)
until not IsMouseButtonPressed(LC)
end
--NoRecoilModify
function Add()
    NR=NR+1 	
    if (NR>10) then
        NR=0
    end 		
    OutputLogMessage("NR %d\n", NR)
    OutputDebugMessage("NR %d\n", NR)
end
function Reduce()
    NR=NR-1 	
    if (NR<0) then
        NR=10
    end
    OutputLogMessage("NR %d\n", NR)
    OutputDebugMessage("NR %d\n", NR)
end
--increaseAndReduce
function OnEvent(event, arg)	

    if (event == "MOUSE_BUTTON_PRESSED" and arg == UP) then
        Add() 
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == DOWN) then
        Reduce()
    end
    if IsMouseButtonPressed(RC)then	                           
        repeat
            if IsMouseButtonPressed(LC)  then
                NoRecoil()
            end
        until not IsMouseButtonPressed(RC)
    end
end
Help
Quote Originally Posted by Dr.Hirsch View Post
Wanting to share what I have used for the last 2+ years.

It is universal and works for any game. You can change the strength of the recoil reduction on the fly, by pressing MouseWheel left/right.
Enjoy.

Code:
-- Universal_Simplified for Logitech GHUB
-- only testet on G604

-- some times you have to close GHUB through Taskmanager and launch it as admin, not my fault

-- main feature :
-- with mousewheel right you can increase NoRecoil strength, with mouse wheel left you can reduce strength
-- change UP,DOWN if you mouse does not support this
-- so you can use it in any game and with any weapon
-- for use in games like PUBG,RainbowSix,SuperPeople...
-- 2+ Years no ban

-- to keep track of you strength values use 
-- the console in LGHUB, 2nd screen required looks like this :
-- https://imgur.com/qoiMpRi
-- or https://docs.microsoft.com/en-us/sysinternals/downloads/debugview and filter for *NR*, can be used as overlay
-- https://imgur.com/3P2GbW2

--Settings--
--General--
UP = 13                     -- to increase NoRecoil strength, toggle Modify to change RapidFire strenght
DOWN = 12                   -- to reduce NoRecoil strength, toggle Modify to change RapidFire strenght
--NoRecoil
NR = 4		                -- distance to pull down, (default) recoil reduction
HorizontalRecoilModifier=0	-- unused, is for left right recoil	 
Sleep_ = 10                    -- delay between pull down, less for smoother
--BINDS--	
--General--                 
UP = 13                     -- to increase NoRecoil strength, + Modify to increase RapidFireNoRecoil
DOWN = 12                   -- to reduce 	
--NoRecoil 									
RC = 3                        -- right click, when you press RC and LC it pulls down
LC = 1                        -- Left click, key boud to shoot ingame 

--FUNCTIONS--						
EnablePrimaryMouseButtonEvents(true);   -- to capture primary (1) klick
OutputDebugMessage("Profil Aktiv")
function NoRecoil()
	repeat
	MoveMouseRelative(0,NR)
	Sleep(Sleep_)
until not IsMouseButtonPressed(LC)
end
--NoRecoilModify
function Add()
    NR=NR+1 	
    if (NR>10) then
        NR=0
    end 		
    OutputLogMessage("NR %d\n", NR)
    OutputDebugMessage("NR %d\n", NR)
end
function Reduce()
    NR=NR-1 	
    if (NR<0) then
        NR=10
    end
    OutputLogMessage("NR %d\n", NR)
    OutputDebugMessage("NR %d\n", NR)
end
--increaseAndReduce
function OnEvent(event, arg)	

    if (event == "MOUSE_BUTTON_PRESSED" and arg == UP) then
        Add() 
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == DOWN) then
        Reduce()
    end
    if IsMouseButtonPressed(RC)then	                           
        repeat
            if IsMouseButtonPressed(LC)  then
                NoRecoil()
            end
        until not IsMouseButtonPressed(RC)
    end
end





Which version of ghub does this works? Also how can i change the binds for the recoil strenght ?
Quote Originally Posted by filizao12 View Post
Which version of ghub does this works? Also how can i change the binds for the recoil strenght ?
I wouldn't use G-Hub because the last Version of Logitech G-Hub doesn't work with LUA anymore.

I switched back to Logitech Gaming Software.
Quote Originally Posted by Dr.Hirsch View Post
Wanting to share what I have used for the last 2+ years.

It is universal and works for any game. You can change the strength of the recoil reduction on the fly, by pressing MouseWheel left/right.
Enjoy.

Code:
-- Universal_Simplified for Logitech GHUB
-- only testet on G604

-- some times you have to close GHUB through Taskmanager and launch it as admin, not my fault

-- main feature :
-- with mousewheel right you can increase NoRecoil strength, with mouse wheel left you can reduce strength
-- change UP,DOWN if you mouse does not support this
-- so you can use it in any game and with any weapon
-- for use in games like PUBG,RainbowSix,SuperPeople...
-- 2+ Years no ban

-- to keep track of you strength values use 
-- the console in LGHUB, 2nd screen required looks like this :
-- https://imgur.com/qoiMpRi
-- or https://docs.microsoft.com/en-us/sysinternals/downloads/debugview and filter for *NR*, can be used as overlay
-- https://imgur.com/3P2GbW2

--Settings--
--General--
UP = 13                     -- to increase NoRecoil strength, toggle Modify to change RapidFire strenght
DOWN = 12                   -- to reduce NoRecoil strength, toggle Modify to change RapidFire strenght
--NoRecoil
NR = 4		                -- distance to pull down, (default) recoil reduction
HorizontalRecoilModifier=0	-- unused, is for left right recoil	 
Sleep_ = 10                    -- delay between pull down, less for smoother
--BINDS--	
--General--                 
UP = 13                     -- to increase NoRecoil strength, + Modify to increase RapidFireNoRecoil
DOWN = 12                   -- to reduce 	
--NoRecoil 									
RC = 3                        -- right click, when you press RC and LC it pulls down
LC = 1                        -- Left click, key boud to shoot ingame 

--FUNCTIONS--						
EnablePrimaryMouseButtonEvents(true);   -- to capture primary (1) klick
OutputDebugMessage("Profil Aktiv")
function NoRecoil()
	repeat
	MoveMouseRelative(0,NR)
	Sleep(Sleep_)
until not IsMouseButtonPressed(LC)
end
--NoRecoilModify
function Add()
    NR=NR+1 	
    if (NR>10) then
        NR=0
    end 		
    OutputLogMessage("NR %d\n", NR)
    OutputDebugMessage("NR %d\n", NR)
end
function Reduce()
    NR=NR-1 	
    if (NR<0) then
        NR=10
    end
    OutputLogMessage("NR %d\n", NR)
    OutputDebugMessage("NR %d\n", NR)
end
--increaseAndReduce
function OnEvent(event, arg)	

    if (event == "MOUSE_BUTTON_PRESSED" and arg == UP) then
        Add() 
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == DOWN) then
        Reduce()
    end
    if IsMouseButtonPressed(RC)then	                           
        repeat
            if IsMouseButtonPressed(LC)  then
                NoRecoil()
            end
        until not IsMouseButtonPressed(RC)
    end
end
I can't dynamically adjust the pressing strength with the mouse wheel. Please help me. G502 and G HUB
Quote Originally Posted by 936814398 View Post
I can't dynamically adjust the pressing strength with the mouse wheel. Please help me. G502 and G HUB
same for me and with the new version of g-hub lua scripts are working fine

ok got it:

You have to find out which button number you have for your mouse wheel klick right and left. for my G502x right wheel is 8 (for function add) and left is 7 (function reduce).

add this line to display in the console which button you are pressing

OutputLogMessage("Event: "..event.." Arg: "..arg.."\n")

then before calling the function Add() or Reduce() change value for "arg == UP" to" arg == 8" or "arg==down" to "arg==7"
LuvIt
I have used this for a long time now and i love it. I just miss a on and off button. Would nice to be able to have Capslock as a on/off button for the macro. I have tried to make it myself but cant figure it out, would you like to help me?
Request
Is it possible to have keyboard buttons to increase to change recoil control?
Like, use page up or down to increase and reduce recoil control och num and scrollock?

since i have the logitech G Pro, i dont have any mouse buttons to spare for these macro settings unfortunately
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us