Battlefield 3,4,HardLine / No Recoil. LUA Script. Logitech. mouse (mice) 303G or ALL Models.

byk

Coder
Joined
Jun 10, 2014
Messages
320
Reaction score
36
Points
28
Remove simple recoil. Only autorifle. АЕК-971, Famas, Abakan and e.t.c.
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(suck) on give a fuck ^^ ;)
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
        recoil = not recoil
    end

    if event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil then
        if recoil then
            repeat
                Sleep(20)
                MoveMouseRelative(-0.5,2)
                ReleaseMouseButton(2)
                Sleep(20)
                MoveMouseRelative(-0.5,2)
            until not IsMouseButtonPressed(1)
        end
    end
end
arg == 5 - это ваша кнопка, вкл/выкл. можно поменять на любую другую из вашего арсенала.

like it? ^^​
 

pupkin

Administrator
Staff member
Joined
Jan 30, 2014
Messages
21,020
Reaction score
1,394
Points
125
игра то какая ?
 
  • Like
Reactions: byk

7331uUyNx

king
Joined
Nov 9, 2015
Messages
86
Reaction score
84
Points
18
Age
35
Location
Nuketown
Website
www.z0r.de
Remove simple recoil. Only autorifle. АЕК-971, Famas, Abakan and e.t.c.
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(suck) on give a fuck ^^ ;)
    end
    if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
        recoil = not recoil
    end

    if event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil then
        if recoil then
            repeat
                Sleep(20)
                MoveMouseRelative(-0.5,2)
                ReleaseMouseButton(2)
                Sleep(20)
                MoveMouseRelative(-0.5,2)
            until not IsMouseButtonPressed(1)
        end
    end
end
arg == 5 - это ваша кнопка, вкл/выкл. можно поменять на любую другую из вашего арсенала.

like it? ^^​
Thanks :)
 
  • Like
Reactions: byk

byk

Coder
Joined
Jun 10, 2014
Messages
320
Reaction score
36
Points
28
U a welcome)
All speed rifle.
LUA Script up to date (beta stable):

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(20)
                --MoveMouseRelative(-0.8,3)

                Sleep(21)
                MoveMouseRelative(0, 5)
                MoveMouseRelative(1,0)
                Sleep(21)
                MoveMouseRelative(-3, 5)
                MoveMouseRelative(1, 0)
                Sleep(21)
                MoveMouseRelative(-1, 5)
            until not IsMouseButtonPressed(1)
        end
    end
end
 
  • Like
Reactions: 7331uUyNx

byk

Coder
Joined
Jun 10, 2014
Messages
320
Reaction score
36
Points
28
Pistol DEGLE no-recoil.

PHP:
function OnEvent(event, arg)
    OutputLogMessage("event = %s, arg = %s\n", event, arg)
end
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(21)
                MoveMouseRelative(0,1)
                Sleep(21)
                MoveMouseRelative(0,3)
                Sleep(21)
                MoveMouseRelative(0,8)
       
            until not IsMouseButtonPressed(1)
        end
    end
end
 
  • Like
Reactions: 7331uUyNx

7331uUyNx

king
Joined
Nov 9, 2015
Messages
86
Reaction score
84
Points
18
Age
35
Location
Nuketown
Website
www.z0r.de
Pistol DEGLE no-recoil.

PHP:
function OnEvent(event, arg)
    OutputLogMessage("event = %s, arg = %s\n", event, arg)
end
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(21)
                MoveMouseRelative(0,1)
                Sleep(21)
                MoveMouseRelative(0,3)
                Sleep(21)
                MoveMouseRelative(0,8)
      
            until not IsMouseButtonPressed(1)
        end
    end
end
n1 :-D
 
  • Like
Reactions: byk

Beavounet

Registered
Joined
Oct 5, 2016
Messages
1
Reaction score
0
Points
1
Age
34
Hello guys,

I'm bringing back this post to life.

I have à kind of problem :

I'm trying to use this macro with a proteus core (g502). it works well but only out of the game...
When i'm in game, the macro simply crash :

Out of the game
event = MOUSE_BUTTON_RELEASED, arg = 5
event = MOUSE_BUTTON_PRESSED, arg = 1
event = MOUSE_BUTTON_RELEASED, arg = 1
event = MOUSE_BUTTON_PRESSED, arg = 1


In game :
event = PROFILE_DEACTIVATED, arg = 0
Syntax Error: Line: 1

(12:37:39) Script Loaded (Profil par défaut)

By the way, i followed this thread :
How to Logitech (enable/insert) LUA script



Beavounet

 

alirart

Registered
Joined
Dec 14, 2019
Messages
1
Reaction score
0
Points
1
Age
47
buenas tengo logitech g502 hero y puse el script lua pero no me hace nada dentro del juego en red por favor alguien me puede decir que hacer.gracias