I just want to connect two funktions on LMB & RMB. When the RMB is pressed the spot script should run until stopped by pressing the LMB. Then when RMB & LMB are pressed together the recoil script should run until LMB is released and if RMB is still held run the spot script again.
The individual scripts run like this, stand alone, but as I said, I would combine both, as described, in one script.
Spot script:
EnablePrimaryMouseButtonEvents(true);
function OnEvent(event, arg)
if IsKeyLockOn("capslock")then
if IsMouseButtonPressed(3)then
repeat
if IsMouseButtonPressed(3)then
PressKey("Q")
Sleep(20)
ReleaseKey("Q")
repeat
Sleep(480)
until not IsMouseButtonPressed(1)
end
until not IsMouseButtonPressed(3)
end
end
end
recoil script
function OnEvent(event, arg)
if IsKeyLockOn("capslock")then
if IsMouseButtonPressed(3)then
repeat
if IsMouseButtonPressed(1)then
repeat
MoveMouseRelative(0,1)
Sleep(33)
until not IsMouseButtonPressed(1)
end
until not IsMouseButtonPressed(3)
end
end
end