Logitech LUA script, no recoil with RAPID FIRE (HELP)
So I use the followed script, it's the no recoil code that @asscold1 posted. I made 2 lines which are simulate the left click continuously. It's working now, but here is my problem:
Sometimes, the script stuck...the mouse moving down automatically and spamms the left button without I pressing the left mouse button. I have to stop the script and activate again if I wanna use it. What is the problem with this? I don't know why it's being stuck sometimes (its fully random).
Please help me find out the problem, or if anybody have a working no recoil with rapid fire script please publish.
The code:
Thank you! Cheers
Sometimes, the script stuck...the mouse moving down automatically and spamms the left button without I pressing the left mouse button. I have to stop the script and activate again if I wanna use it. What is the problem with this? I don't know why it's being stuck sometimes (its fully random).
Please help me find out the problem, or if anybody have a working no recoil with rapid fire script please publish.
The code:
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 == 5) then
recoil = not recoil
spot = not spot
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
--Sleep(35)
if recoil then
repeat
MoveMouseRelative(0, 2)
PressMouseButton(1)
Sleep(7)
ReleaseMouseButton(1)
until not IsMouseButtonPressed(1)
end
end
end