I’m currently using a workaround script for burst fire using the “p” key of the keyboard because I want to use the left mouse click to shoot in auto/burst mode, for this i call the action with EVENT == "MOUSE_BUTTON_PRESSED and arg == 1
and IsMouseButtonPressed(1)
So, i’m wondering if there is an alternative to only call and use the same button (mouse button 1 , LMB) to call and execute the script instead of “p” button. I’ve read a suggestion to use a “fake button press” variable but i’ve not been able to make it work.
EnablePrimaryMouseButtonEvents(true)
function OnEvent(event, arg)
-------------------------------------------------------
OutputLogMessage("Event: "..event.." Arg: "..arg.."n")
-------------------------------------------------------
--- Autoclicker/bind "p" fire ---
if IsKeyLockOn("scrolllock") then
if event == "MOUSE_BUTTON_PRESSED" and arg == 1 then
repeat
PressKey("p")
Sleep(1)
ReleaseKey("p")
Sleep(75)
PressKey("p")
Sleep(1)
ReleaseKey("p")
Sleep(75)
PressKey("p")
Sleep(1)
ReleaseKey("p")
Sleep(150)
until not IsMouseButtonPressed(1)
--------------------------------------
OutputLogMessage("Burst fire shootn")
--------------------------------------
end
else
if event == "MOUSE_BUTTON_PRESSED" and arg == 1 then
PressKey("p")
elseif event == "MOUSE_BUTTON_RELEASED" and arg == 1 then
ReleaseKey("p")
---------------------------------------
OutputLogMessage("Normal fire shootn")
---------------------------------------
end
end
For some reason this script also uses to freeze and bug all Logitech ghub program after a while when tabbing between desktop and the game. I’m not sure if it is because of the program itself or the script is not optimized/done correctly.
xsaikou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.