Results 1 to 8 of 8
  1. #1
    lumpi999's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    15
    My Mood
    Amused

    Logitech LUA recoil reduce Script! - work on every mouse

    Hello,
    This is a LUA Script for BF1 Automatic Weapon and other Games
    J = Enemy Spotted
    Hold to sight = ON
    I use 900 and 450 dpi :lmao:

    With this scritpt you can:
    - pressing Left Mousebutton: Hold Breath, Spotted Enemy, reduce DPI
    - pressing Right Mousebutton: lower recoil

    To activate press Mousewheel to the Leftside!


    I am only insert my x and y value.
    Source is from the Logitechforum :-)
    Code:
    local recoil = false local aim = false
     sleep_duration = 50
     MaxBreak = 1000
     TimeStamp = -MaxBreak-1    -- it's negative 2 seconds
     recoil_coords = {
         { x = -2, y = 5 },        
         { x = -2, y = 5 },        
         { x = -3, y = 5 },        
         { x = -3, y = 5 },        
         { x = -3, y = 5 },
         { x = -3, y = 5 },        
         { x = -3, y = 5 },        
         { x = -3, y = 5 },        
         { x = -3, y = 5 },        
         { x = -3, y = 5 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -5, y = 9 },        
         { x = -5, y = 9 },    
         { x = -5, y = 9 },        
         { x = -5, y = 9 },    
         { x = -5, y = 9 },        
         { x = -5, y = 9 },        
         { x = -5, y = 9 },        
         { x = -5, y = 9 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },            
         { x = -7, y = 10 },        
         { x = -7, y = 10 },            
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },            
         { x = -7, y = 10 },        
         { x = -7, y = 10 },            
         { x = -7, y = 10 },        
         { x = -7, y = 10 },            
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
     }
     recoil_count = # recoil_coords
     LastIndex = 1
     function OnEvent(event, arg)    
         if event == "PROFILE_ACTIVATED" then
             EnablePrimaryMouseButtonEvents(true)
         end
     
    
         
         if (event == "MOUSE_BUTTON_PRESSED" and arg == 11) then -- Press mouse button 3 to toggle recoil
             recoil = not recoil 
             if (recoil == false) then
                 OutputLogMessage("RecoilScript turned OFF\n")
             else 
                 OutputLogMessage("RecoilScript turned ON\n")
             end
     end
         
     
    
         if (event == "MOUSE_BUTTON_PRESSED" and arg == 1) and recoil  then
                          
             if (GetRunningTime() - TimeStamp < MaxBreak) and (LastIndex <= recoil_count) then
                 i = LastIndex
             else
                 i = 1
             end
             while i <= recoil_count do
                 Sleep(sleep_duration)
                 if not IsMouseButtonPressed(1) then
                     LastIndex = i
                     TimeStamp = GetRunningTime()
                     break
                 end
                 MoveMouseRelative( recoil_coords[i].x, recoil_coords[i].y )
                 if not IsMouseButtonPressed(1) then break end
                 i = i + 1
             end
         end
     
    
             
     
    
         if event == "MOUSE_BUTTON_PRESSED" and arg == 2 and recoil then
               
             PressKey("Spacebar")
             PressAndReleaseKey("J") 
             PlayMacro("DPI Down")
             
           else
         
         if event == "MOUSE_BUTTON_RELEASED" and arg == 2 then
              
             ReleaseKey("Spacebar")
             PressAndReleaseKey("J") 
             PlayMacro("DPI Up")
         end
     end
     end

    If you want use this script with a 3rd Party Mouse (Like Zowie) u need only this add at the end:
    -->> gLua Setup - EDIT THE NEXT LINE(s)
    dofile( [[C:\gLua.lua]] ) -- edit your filepath here!!!
    EnableThirdPartyMouseEvents() -- will enable MB1-5
    EnableMouseButton23Switch(true) -- Switch MB2 and 3 => 3rd party is like a G-Mouse

    glua.lua you find at google :-)

    and you need change this:
    from 11 to 3
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 11) then
    to
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 3) then

    Button 11 = Mousewheel to the left side
    Button 3 = Mousewheel Button

    If you want a key for Script ON/OFF you only change the same line :-)
    Last edited by lumpi999; 12-03-2016 at 02:19 AM. Reason: update

  2. #2
    ercivan's Avatar
    Join Date
    May 2009
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    13
    My Mood
    Twisted
    QUİCK VİDEO PLS. Iam g300s.

  3. #3
    lumpi999's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    15
    My Mood
    Amused
    lol no!
    i dont make your work for you!
    read the source.
    Understand and change it for your DPI an Gameplay

  4. #4
    lumpi999's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    15
    My Mood
    Amused
    Update!

    You need Logitech Gaming Software in Englich!

    From my old Thread and extended:
    For Full Auto Weapon
    J = Enemy Spotted
    Spacebar= hold Breath
    Hold to sight = ON
    I use 900 and 450 dpi

    With this scritpt you can:
    - pressing Left Mousebutton: Hold Breath, Spotted Enemy, reduce DPI
    - pressing Right Mousebutton: lower recoil

    To activate press Mousewheel to the Leftside!

    I am only insert my x and y value.
    Source is from the Logitechforum :-)
    Code:
    local recoil = false local aim = false
     sleep_duration = 50
     MaxBreak = 1000
     TimeStamp = -MaxBreak-1    -- it's negative 2 seconds
     recoil_coords = {
         { x = -2, y = 5 },        
         { x = -2, y = 5 },        
         { x = -3, y = 5 },        
         { x = -3, y = 5 },        
         { x = -3, y = 5 },
         { x = -3, y = 5 },        
         { x = -3, y = 5 },        
         { x = -3, y = 5 },        
         { x = -3, y = 5 },        
         { x = -3, y = 5 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -4, y = 8 },        
         { x = -5, y = 9 },        
         { x = -5, y = 9 },    
         { x = -5, y = 9 },        
         { x = -5, y = 9 },    
         { x = -5, y = 9 },        
         { x = -5, y = 9 },        
         { x = -5, y = 9 },        
         { x = -5, y = 9 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },            
         { x = -7, y = 10 },        
         { x = -7, y = 10 },            
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },            
         { x = -7, y = 10 },        
         { x = -7, y = 10 },            
         { x = -7, y = 10 },        
         { x = -7, y = 10 },            
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -7, y = 10 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
         { x = -5, y = 8 },        
     }
     recoil_count = # recoil_coords
     LastIndex = 1
     function OnEvent(event, arg)    
         if event == "PROFILE_ACTIVATED" then
             EnablePrimaryMouseButtonEvents(true)
         end
     
    
         
         if (event == "MOUSE_BUTTON_PRESSED" and arg == 11) then -- Press mouse button 3 to toggle recoil
             recoil = not recoil 
             if (recoil == false) then
                 OutputLogMessage("RecoilScript turned OFF\n")
             else 
                 OutputLogMessage("RecoilScript turned ON\n")
             end
     end
         
     
    
         if (event == "MOUSE_BUTTON_PRESSED" and arg == 1) and recoil  then
                          
             if (GetRunningTime() - TimeStamp < MaxBreak) and (LastIndex <= recoil_count) then
                 i = LastIndex
             else
                 i = 1
             end
             while i <= recoil_count do
                 Sleep(sleep_duration)
                 if not IsMouseButtonPressed(1) then
                     LastIndex = i
                     TimeStamp = GetRunningTime()
                     break
                 end
                 MoveMouseRelative( recoil_coords[i].x, recoil_coords[i].y )
                 if not IsMouseButtonPressed(1) then break end
                 i = i + 1
             end
         end
     
    
             
     
    
         if event == "MOUSE_BUTTON_PRESSED" and arg == 2 and recoil then
               
             PressKey("Spacebar")
             PressAndReleaseKey("J") 
             PlayMacro("DPI Down")
             
           else
         
         if event == "MOUSE_BUTTON_RELEASED" and arg == 2 then
              
             ReleaseKey("Spacebar")
             PressAndReleaseKey("J") 
             PlayMacro("DPI Up")
         end
     end
     end
    Warning!
    This can be detect by Anti Cheat like AAO 2.5 Assist!
    Rapid Key Fire Scripts are not good!!
    For Bolt and Burst Weapon change:
    Code:
    local recoil = false
    
    function OnEvent(event, arg)	
    	if event == "PROFILE_ACTIVATED" then
    		EnablePrimaryMouseButtonEvents(true)
    	end
    
    	
    	if (event == "MOUSE_BUTTON_PRESSED" and arg == 11) then -- Press mouse button 3 to toggle recoil
    		recoil = not recoil 
    		if (recoil == false) then
    			OutputLogMessage("RecoilScript turned OFF\n")
    		else 
    			OutputLogMessage("RecoilScript turned ON\n")
    		end
    end
    	
    
    	if (event == "MOUSE_BUTTON_PRESSED" and arg == 1) and recoil  then
                    if IsMouseButtonPressed(1) then 
    repeat
    PressKey("M")
    Sleep(50)
    ReleaseKey("M")
    MoveMouseRelative(-2,3)
    if not IsMouseButtonPressed(1) then break end
    PressKey("M")
    Sleep(50)
    ReleaseKey("M")
    MoveMouseRelative(-3,5)
    if not IsMouseButtonPressed(1) then break end
    PressKey("M")
    Sleep(50)
    ReleaseKey("M")
    MoveMouseRelative(-4,6)
    if not IsMouseButtonPressed(1) then break end
    until not IsMouseButtonPressed(1) 
     end
    end
    if event == "MOUSE_BUTTON_PRESSED" and arg == 2 and recoil then
        		SetMouseDPITableIndex(1)
    		PressKey("Spacebar")
    		PressAndReleaseKey("J")
    else
    		if event == "MOUSE_BUTTON_RELEASED" and arg == 2 then
       		SetMouseDPITableIndex(2)
    		ReleaseKey("Spacebar")
    		PressAndReleaseKey("J")
    		end
    end
    end
    If you want use this script with a 3rd Party Mouse (Like Zowie) u need only this add at the end:
    -->> gLua Setup - EDIT THE NEXT LINE(s)
    dofile( [[C:\gLua.lua]] ) -- edit your filepath here!!!
    EnableThirdPartyMouseEvents() -- will enable MB1-5
    EnableMouseButton23Switch(true) -- Switch MB2 and 3 => 3rd party is like a G-Mouse

    glua.lua you find at google :-)

    and you need change this:
    from 11 to 3
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 11) then
    to
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 3) then

    Button 11 = Mousewheel to the left side
    Button 3 = Mousewheel Button

  5. #5
    feztm's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    if i wanted to change the toggle for the recoil to "k" do i just change the value of 11 to k?

  6. #6
    lumpi999's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    15
    My Mood
    Amused
    sorry no sir
    key only accept G or M or Mouse by logitech gaming software
    or another way by alt, shift, crtl

  7. #7
    robi54321's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    Hallo!

    The recoil pattern table idea is quite neat. I wondered if you could send me the glua.lua file? I searched online and only found one weird russian site where I would have had to pay to join. I have a logitech keyboard but a Razer mouse

    Thanks,
    robi54321

  8. #8
    kliganN's Avatar
    Join Date
    Mar 2019
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    thx will use it

Similar Threads

  1. [Release] Logitech lua-script no recoil bf4 ( AEK-971 - ACE 23 - Bulldog )
    By theycallmebigbrother in forum Battlefield 4 Hacks & Cheats
    Replies: 22
    Last Post: 08-22-2021, 07:13 PM
  2. [Source Code] Logitech LUA recoil reduce Script! for every Game!
    By lumpi999 in forum Battlefield 4 Hacks & Cheats
    Replies: 2
    Last Post: 02-28-2016, 11:23 PM
  3. [Solved] RECOIL REDUCER SCRIPT UPGRADE HELP NEEDED
    By DjSaniboy in forum Counter-Strike 2 Help
    Replies: 1
    Last Post: 07-02-2015, 06:33 PM
  4. [Solved] AK47 Logitech Mouse No Recoil Script is not moving mouse
    By ares0027 in forum Counter-Strike 2 Help
    Replies: 8
    Last Post: 03-27-2015, 09:42 PM
  5. [Help] How to fix this Recoil Reducer AHK script?
    By Feroztier in forum Counter-Strike 2 Coding & Resources
    Replies: 1
    Last Post: 03-20-2015, 03:03 AM