Lostinenternal (09-16-2019)
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
Lostinenternal (09-16-2019)
what program do u use to complie this and how to use it
can u help me
tks <3
How to do this teach me