Captain Awesome 17 fev. 2016 às 20:35
LUA Scrit Help
Hi there i know this probably isn't the right place but havn't had much luck anywhere else, So i'm turning to the gamming comunity who usually has a better knowledge base when it comes to things like this.

I'm trying to create a lua script for my g710+ a quality of life thing for my single player games. But i'm no scripter and havn't a clue what I am doing. I tried copying and pasting some different snippits of code but it won't work. If someone could re-write it so it would I would greatly appreciate that.

here's my script

function OnEvent(event, arg, family) if event == "PROFILE_DEACTIVATED" then ReleaseMouseButton(1) end if event == "G_PRESSED" and arg == 6 then toggle = not toggle if toggle then PressMouseButton(1) else ReleaseMouseButton(1) end end end function OnEvent(event, arg, family) if event == "G_PRESSED" and arg == 1 then -- arg is the mouse button number pressed toggle = not toggle if toggle then PressKey("w+lshift") -- Key pressed on toggle, change to what is needed else ReleaseKey("w+lshift") -- release the key you pressed on toggle end end end

The basic idea is to have g6 Hold down the left mouse button for thos tedious clicky tasks and g1 hold down the w and shift key for those long journey's across a map.

unfortunatly my attempt to create what I want did not work, neither did using the gamming software as it doesn't seem to support the holding down of a button or key... go figure.
Postado a: 17 fev. 2016 às 20:35
Comentários: 0