Results 1 to 3 of 3

Threaded View

  1. #1
    zahk's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    1

    need help with this recoil script

    hello everyone, i have been using this recoil script which is working great for me,but i want to upgrade it and i need help, i want to add 2 functions to the script and dont know how.
    i would like the scroll lock button to turn on and off when i activate and deactivate the script, and i would like to add an ignore button for grenades use(caps lock would be great for that).

    the script is for logitech software
    this is the script im using:
    ----------------------------------------------------------------------------------
    -------------------------------- control settings --------------------------------
    ----------------------------------------------------------------------------------
    ------------------ button 3 - activation/deactivation of SCRIPT ------------------
    ----------------------- button 4 - recoil minus - STEP 15% -----------------------
    ----------------------- button 5 - recoil plus - STEP 15% -----------------------
    ----------------------------------------------------------------------------------
    local activated = 3 -- click wheel mouse
    local minus = 7 -- click button 4 mice
    local plus = 8 -- click button 5 mice
    ----------------------------------------------------------------------------------
    ------------------------------ sensitivity setting -------------------------------
    ------------- inversion - set the "minus" sign before the sensitivity ------------
    ----------------------------------------------------------------------------------
    -------------- the sensitivity setting in the game 50 - change 45-55 -------------
    ------- the default vertical multiplier in the game is 0.7-change 0.7-1.3 --------
    ----------------------------------------------------------------------------------
    local sensitivity_global = 50 -- sensitivity in the game (default is 50)
    local sensitivity_vertical = 1.0 -- the multiplier is vertical (default is 1.0)
    ----------------------------------------------------------------------------------
    ------------------- power of the compensating vertical recoil --------------------
    ----------------------------------------------------------------------------------
    -- SCOPE X1 AKM+0 BARYL+2 M416+0 SCAR.L/QBZ/AUG-1 DP48+0 GROZA+0 M265-1
    -- SCOPE X2 AKM+5 BARYL+5 M416+4 SCAR.L/QBZ/AUG+3 DP48+3 GROZA+4 M265+2
    -- SCOPE X3 AKM+6 BARYL+7 M416+6 SCAR.L/QBZ/AUG+5 DP48+5 GROZA+6 M265+4
    -- SCOPE X4 AKM+8 BARYL+9 M416+8 SCAR.L/QBZ/AUG+7 DP48+7 GROZA+8 M265+6
    -- SCOPE X4 VINTOREZ+4
    -- BURST -- SCOPE X1 M16A4/MUTANT+0
    -- BURST -- SCOPE X2 M16A4/MUTANT+5
    -- BURST -- SCOPE X3 M16A4/MUTANT+6
    -- BURST -- SCOPE X4 M16A4/MUTANT+8
    -- SMG -- SCOPE X1 UMP-2 VECTOR-1 UZI-2 TOMPSON-1 P18C-1 Skorpion-3
    -- SMG -- SCOPE X2 UMP+2 VECTOR+3
    ----------------------------------------------------------------------------------
    ---------------------------------- never no fix ----------------------------------
    ----------------------------------------------------------------------------------
    EnablePrimaryMouseButtonEvents (true)
    function OnEvent(event, arg)
    -- OutputLogMessage("%s - %d\n", event, arg)
    if (event == "PROFILE_ACTIVATED") then
    EnablePrimaryMouseButtonEvents(true)
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == activated) then
    recoil = not recoil
    if (recoil == false) then
    OutputLogMessage("OFF-Recoil\n")
    OutputLCDMessage("OFF-Recoil")
    else
    OutputLogMessage("ON-NoRecoil\n")
    OutputLCDMessage("ON-NoRecoil")
    end
    step_recoil = 5 * 50 / sensitivity_global / sensitivity_vertical
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == plus) then
    step_recoil = step_recoil * 1.18
    OutputLogMessage("Plus\n")
    OutputLCDMessage("Plus")
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == minus) then
    if step_recoil > 1 then
    step_recoil = step_recoil / 1.18
    OutputLogMessage("Minus\n")
    OutputLCDMessage("Minus")
    end
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
    repeat
    Sleep(19)
    MoveMouseRelative(0, step_recoil)
    until not IsMouseButtonPressed(1)
    end
    end



    i know it's linear and not perfect recoil control, but works great for the first 5 bullets, and the rest is pretty easy to compensate

  2. The Following User Says Thank You to zahk For This Useful Post:

    Lostinenternal (09-16-2019)

Similar Threads

  1. {Help Request} Need help with No Recoil Head shot script.
    By comatose702 in forum Black Squad Hacks & Cheats
    Replies: 4
    Last Post: 08-05-2018, 04:24 AM
  2. [Help Request] I need help with this
    By panochito in forum DayZ Help & Requests
    Replies: 0
    Last Post: 04-28-2013, 08:49 PM
  3. [Help Request] Hey need help with No Recoil / No Spread & Super Pistol hack
    By Frogcn in forum Alliance of Valiant Arms (AVA) Help
    Replies: 8
    Last Post: 09-04-2012, 01:03 AM
  4. I need help with this code in C#
    By trevor206 in forum Programming Tutorial Requests
    Replies: 0
    Last Post: 08-18-2009, 05:40 PM
  5. Need help with this error...
    By Screenlooker in forum Combat Arms Hacks & Cheats
    Replies: 6
    Last Post: 12-27-2008, 02:21 PM