- click mouse 4 to start boost artifact
- click mouse 4 with left_ctrl if u want use 5 stars artifacts
- click mouse 3 (right button) if u want stop
Last active
December 2, 2022 22:08
-
-
Save 0x79H/294fa712e156301e2019f022e09ef37a to your computer and use it in GitHub Desktop.
genshin artifacts boost for logitech
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function SleepEx(stime, button) | |
loopCount = stime / 50 | |
for i = loopCount, 0, -1 do | |
if IsMouseButtonPressed(button) == true then | |
return false | |
end | |
sleepTime = (i >= 1 and 1 or i) * 50 | |
Sleep(sleepTime) | |
end | |
return true | |
end | |
local function debug_print_all(event, arg) | |
EnablePrimaryMouseButtonEvents(true) | |
local x, y = GetMousePosition() | |
OutputLogMessage("--> %d %s| %d, %d\n", arg, event, x, y) | |
end | |
function OnEvent(event, arg) | |
-- debug_print_all(event, arg); | |
if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then | |
artifact_auto(3, IsModifierPressed("lctrl")) | |
end | |
end | |
function artifact_auto(_stop_button, five_star) | |
_buttons_auto = { | |
-- click auto select | |
{x = 57263, y = 45588}, | |
-- click submit | |
{x = 56495, y = 60161}, | |
-- quick submit | |
{x = 4456, y = 8744}, | |
{x = 4302, y = 13207} | |
} | |
if five_star then | |
_buttons_auto = { | |
-- click plus | |
{x = 62385, y = 53056}, | |
-- select artifacts | |
{x = 2535, y = 11841}, | |
{x = 7555, y = 11477}, | |
{x = 12344, y = 11431}, | |
{x = 17005, y = 11340}, | |
{x = 21666, y = 11431}, | |
{x = 27249, y = 11659}, | |
-- click blank | |
{x = 61207, y = 40942}, | |
{x = 61207, y = 40942}, | |
-- click submit | |
{x = 57775, y = 61709}, | |
{x = 39977, y = 45906}, | |
-- click blank | |
{x = 61207, y = 40942}, | |
{x = 61207, y = 40942}, | |
-- quick submit | |
{x = 3073, y = 9245}, | |
{x = 4610, y = 13025} | |
} | |
end | |
while (true) do | |
local _breakme = false | |
for _index, _value in ipairs(_buttons_auto) do | |
MoveMouseTo(_value.x, _value.y) | |
_breakme = not SleepEx(75, _stop_button) | |
PressAndReleaseMouseButton(1) | |
_breakme = not SleepEx(75, _stop_button) | |
if _breakme then | |
break | |
end | |
end | |
if _breakme then | |
break | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment