Rust - NoRecoil (Logitech)

xKitoReckz0r

Registered
Joined
Jun 7, 2015
Messages
69
Reaction score
20
Points
8
Location
Caniço, Madeira
NoRecoil for Rust Only AK atm
Credits goes to byk because he made the script.

AK No Attachments NoRecoil

PHP:
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 == 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(19)
                Sleep(19)
                MoveMouseRelative(0, 6)
                Sleep(19)
                MoveMouseRelative(-7, 7)
                Sleep(19)
                MoveMouseRelative(-6, 7)
                Sleep(19)
                MoveMouseRelative(5, 7)
                Sleep(19)
                MoveMouseRelative(8, 7)
            until not IsMouseButtonPressed(1)
        end
    end
end

AK with Muzzle, Laser Sight and Holosight
PHP:
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 == 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(19)
                Sleep(19)
                MoveMouseRelative(0, 2)
                Sleep(19)
                MoveMouseRelative(-1, 3)
                Sleep(19)
                MoveMouseRelative(2, 4)
                Sleep(19)
                MoveMouseRelative(0, 4)
            until not IsMouseButtonPressed(1)
        end
    end
end
 

xKitoReckz0r

Registered
Joined
Jun 7, 2015
Messages
69
Reaction score
20
Points
8
Location
Caniço, Madeira
LR 300 No Attachments
PHP:
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 == 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(19)
                Sleep(19)
                MoveMouseRelative(0, 2)
                Sleep(19)
                MoveMouseRelative(-2, 4)
                Sleep(19)
                MoveMouseRelative(-3, 6)
                Sleep(19)
                MoveMouseRelative(-1, 7)
            until not IsMouseButtonPressed(1)
        end
    end
end

LR 300 Muzzle, Laser Sight, Holosight
PHP:
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 == 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(19)
                Sleep(19)
                MoveMouseRelative(0, 2)
                Sleep(19)
                MoveMouseRelative(-2, 2)
                Sleep(19)
                MoveMouseRelative(-1, 2)
                Sleep(19)
                MoveMouseRelative(0, 3)
            until not IsMouseButtonPressed(1)
        end
    end
end
Semi Automatic Rifle No Attachments
PHP:
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 == 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(19)
                Sleep(19)
                MoveMouseRelative(-1, 4)
                Sleep(19)
                MoveMouseRelative(-2, 6)
                Sleep(19)
                MoveMouseRelative(-3, 6)
                Sleep(19)
                MoveMouseRelative(-3, 9)
            until not IsMouseButtonPressed(1)
        end
    end
end

Semi Automatic Rifle Muzzle, Laser Sight, Holosight
PHP:
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 == 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(19)
                Sleep(19)
                MoveMouseRelative(-1, 2)
                Sleep(19)
                MoveMouseRelative(-2, 2)
                Sleep(19)
                MoveMouseRelative(2, 3)
                Sleep(19)
                MoveMouseRelative(-3, 4)
            until not IsMouseButtonPressed(1)
        end
    end
end
M92 Pistol (Script can be used with attachments and without)
PHP:
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 == 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(19)
                Sleep(19)
                MoveMouseRelative(-1, 4)
                Sleep(19)
                MoveMouseRelative(-1, 4)
                Sleep(19)
                MoveMouseRelative(-1, 2)
                Sleep(19)
                MoveMouseRelative(-2, 4)
            until not IsMouseButtonPressed(1)
        end
    end
end
 
  • Like
Reactions: pupkin

Malaxian

Registered
Joined
Feb 16, 2017
Messages
1
Reaction score
0
Points
1
Age
28
With this script, there is 0 recoil ?
I tried out AutoHotKey, but enable to remove the horizontal recoil of ak.

If yes, can we translate the logitech script to autohotkey?
 

foxi327

Registered
Joined
Mar 27, 2017
Messages
1
Reaction score
0
Points
1
Age
33
Hello, ı can't do it, ı editing script file and ı delete everything and ctrl+v but ı have error Syntax Error: Line: 18 . how can ı fix? please help me
 

Shadow1143

Registered
Joined
Jul 15, 2017
Messages
1
Reaction score
0
Points
1
Age
33
So i tried the AK script and it works with my mouse logitech g400s but not that way i want. it recoils it too fast and then it shoots the ground. But when i press W (move forward) and shoot same time recoil is nearly perfect.
Can i get your mouse sensitivy and other information so then it will work better.
 

byk

Coder
Joined
Jun 10, 2014
Messages
320
Reaction score
36
Points
28
You need to turn off the acceleration of the pointer. Increase/lower the dpi, the optimal value is 1200 - 1600. Make sure that the profile activates the script. For echo in the debug window, you will see the output text.
DPI - 1200 - 1600 edge/possible
Pointer acceleration - turn off
In game mouse sensitivy = 2.5/3 edge

I'm back. I"M HOME!!!))))
 

Ronx88

Registered
Joined
Nov 24, 2017
Messages
1
Reaction score
0
Points
1
Age
35
Hey guys, appreciate your script and the work involved! I'm having the same issue as the user shadow. The ak shoots towards the ground. I noticed you mentioned in game mouse sensitivity at 2.5/3 but the game only has a 0-2 option. I have everything else set as you described (DPI 1300, Accel off). If you could please give me some help/advice it would be much appreciated! thanks!
 

vsdqsd

Registered
Joined
Jan 4, 2018
Messages
1
Reaction score
0
Points
1
Age
33
Bonjour, je ne peux pas le faire, ı éditer le fichier script et ı supprimer tout et ctrl + v mais j'ai une erreur Erreur de syntaxe: Ligne: 18. comment peux-je réparer? Aidez-moi, s'il vous plaît