Best logitech macro for your logitech mouse v1 (never detectable)
today im gonna show you how to create your own logitech mouse macro, scripted by yourself.
i searched many norecoil macros on the internet but they are not for siege, so they are strange af and hard to use. i found a new method to script it for siege, using the Sleep() trick.
i dont wanna type too much now so i will update this thread soon.
i found a thread here which just used other games' macro
Code:
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 == 4) then
recoil = not recoil
spot = not spot
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
if recoil then
repeat
MoveMouseRelative(-2, 5)
Sleep(10)
MoveMouseRelative(2, -5)
Sleep(21)
until not IsMouseButtonPressed(1)
end
end
end
what im using:
1. set a var called Sleeptime
2.Sleep(Sleeptime)
3. mousebtn7 pressed -> Sleeptime + 1 // increase recoil
4. mousebtn8 pressed -> Sleeptime - 1 // decrease recoil
I dont know wtf im saying now my head is fucking painful, sorry, i will edit these shits later.
example code for G402 mouse: ( probably wont work on other mouses except g402)
Code:
--variable definition
sleeptime = 25
btn7down = false
btn8down = false
nextlean = "right"
--func def
function booltostring(mybool)
if mybool then
return "true"
else
return "false"
end
end
function leanleft()
PressAndReleaseKey("e")
Sleep(5)
PressAndReleaseKey("q")
Sleep(5)
end
function leanright()
PressAndReleaseKey("q")
Sleep(5)
PressAndReleaseKey("e")
Sleep(5)
end
function OnEvent(event, arg)
--initialization
OutputLogMessage("event = %s, arg = %d\n", event, arg)
-- profile intialization
if (event == "PROFILE_ACTIVATED") then
OutputLogMessage("profile activated! recoil sleeptime: " .. sleeptime .. "\n")
EnablePrimaryMouseButtonEvents(true)
elseif event == "PROFILE_DEACTIVATED" then
ReleaseMouseButton(2) -- to prevent it from being stuck on
end
--check if btn7 and btn8 down
if (event == "MOUSE_BUTTON_PRESSED" and arg == 7 ) then
btn7down = true
--OutputLogMessage("btn7 :" .. booltostring(btn7down) .. "\n")
end
if (event == "MOUSE_BUTTON_RELEASED" and arg == 7 ) then
btn7down = false
--OutputLogMessage("btn7 :" .. booltostring(btn7down) .. "\n")
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 8 ) then
btn8down = true
--OutputLogMessage("btn8 :" .. booltostring(btn8down) .. "\n")
end
if (event == "MOUSE_BUTTON_RELEASED" and arg == 8 ) then
btn8down = false
--OutputLogMessage("btn8 :" .. booltostring(btn8down) .. "\n")
end
-- set recoil
--btn8 to increase
if (event == "MOUSE_BUTTON_PRESSED" and arg == 8 ) then
sleeptime = sleeptime - 1
OutputLogMessage("current recoil:" .. sleeptime .. "\n")
end
--btn7 to decrease
if (event == "MOUSE_BUTTON_PRESSED" and arg == 7) then
sleeptime = sleeptime + 1
OutputLogMessage("current recoil:" .. sleeptime .. "\n")
end
--reset recoil
if (event == "MOUSE_BUTTON_PRESSED" and arg == 8 and IsModifierPressed("alt")) then
sleeptime = 25
OutputLogMessage("current recoil:" .. sleeptime .. "\n")
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 7 and IsModifierPressed("alt")) then
sleeptime = 25
OutputLogMessage("current recoil:" .. sleeptime .. "\n")
end
--handle recoil
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsMouseButtonPressed(3)) then
repeat
MoveMouseRelative(0, 1)
Sleep(sleeptime)
until not IsMouseButtonPressed(1)
end
--lean tool
--[[if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
if IsMouseButtonPressed(5) then
if nextlean == "right" then
PlayMacro("leanleft")
nextlean = "left"
else
PlayMacro("leanright")
nextlean = "right"
end
end]]
--test
--[[btn5keydown = false
if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
btn5keydown = true
OutputLogMessage(booltostring(btn5keydown) .. "\n")
end
if (event == "MOUSE_BUTTON_RELEASED" and arg == 5) then
btn5keydown = false
OutputLogMessage(booltostring(btn5keydown) .. "\n")
end
]]
end
how to use it :
press G8 button once to reduce recoil by 1
press G7 button once to increase recoil by 1
(test them in custom games)
(default recoil : 25)
Alt + G8 or Alt + G7 = reset recoil to 25
aim and shoot will activate it ( right mouse btn + left mouse btn pressed together)
there is a lot of trash code sorry.
this is the first version so i will continue improving it soon( like special recoil helper for suppressor )
Good bye im gonna sleep first
- - - Updated - - -
how to install it :
dl logitech gaming software , right click your profile icon, scripting, delete everycode there and paste the new one.
if you are using other logitech mouses, comment here i will customize the code for ya

