Skip to content

Instantly share code, notes, and snippets.

@ExtReMLapin
Created March 6, 2021 08:54
Show Gist options
  • Save ExtReMLapin/635fc0d0caaa166018502310fe390aae to your computer and use it in GitHub Desktop.
Save ExtReMLapin/635fc0d0caaa166018502310fe390aae to your computer and use it in GitHub Desktop.
local speed = 3
local speedVertical = 1
local MoveAmountHorizontal = 102 / speed
local MoveAmountVertical = 25 / speedVertical
local ft = true
local delay = 50
function OnEvent(event, arg)
OutputLogMessage("event = %s, arg = %d\n", event, arg)
if (event == "MOUSE_BUTTON_RELEASED") then
if arg == 6 then
PressKey("t")
Sleep(delay)
MoveMouseTo(300, 300)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
Sleep(delay)
if ft == false then
MoveMouseTo(50000, 50000)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
Sleep(delay)
end
MoveMouseTo(50000, 55000)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
ReleaseKey("t")
elseif arg == 5 then
PressKey("t")
Sleep(delay)
MoveMouseTo(300, 300)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
Sleep(delay)
if ft == false then
MoveMouseTo(50000, 50000)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
Sleep(delay)
end
MoveMouseTo(5000, 55000)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
ReleaseKey("t")
end
end
endlocal speed = 3
local speedVertical = 1
local MoveAmountHorizontal = 102 / speed
local MoveAmountVertical = 25 / speedVertical
local ft = true
local delay = 50
function OnEvent(event, arg)
OutputLogMessage("event = %s, arg = %d\n", event, arg)
if (event == "MOUSE_BUTTON_RELEASED") then
if arg == 6 then
PressKey("t")
Sleep(delay)
MoveMouseTo(300, 300)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
Sleep(delay)
if ft == false then
MoveMouseTo(50000, 50000)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
Sleep(delay)
end
MoveMouseTo(50000, 55000)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
ReleaseKey("t")
elseif arg == 5 then
PressKey("t")
Sleep(delay)
MoveMouseTo(300, 300)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
Sleep(delay)
if ft == false then
MoveMouseTo(50000, 50000)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
Sleep(delay)
end
MoveMouseTo(5000, 55000)
Sleep(delay)
PressMouseButton(1)
Sleep(delay)
ReleaseMouseButton(1)
ReleaseKey("t")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment