지허브 칼퇴 스크립트 - jiheobeu kaltoe seukeulibteu

local SCREEN_WIDTH = 1920

local SCREEN_HIGHT = 1080

local TOLERANCE = 4

local INPUT_DELAY = 20

local FUNCTION_DELAY = 10

local PressAndReleaseMouseButton_org = PressAndReleaseMouseButton

local PressAndReleaseKey_org = PressAndReleaseKey

local function PressAndReleaseMouseButton(button)

PressMouseButton(button)

Sleep(INPUT_DELAY)

ReleaseMouseButton(button)

Sleep(INPUT_DELAY)

end

local Sleep_org = Sleep

--author : //www.unknowncheats.me/forum/programming-for-beginners/444300-sleep-function-logitech-lua.html#post3085678

local function Sleep(t)

sleep_start_time = GetRunningTime()

repeat

sleep_end_time = GetRunningTime()

sleep_elapsed = sleep_end_time - sleep_start_time

until(sleep_elapsed>t)

end

local function PressAndReleaseKey(keyname)

PressKey(keyname)

Sleep(INPUT_DELAY)

ReleaseKey(keyname)

Sleep(INPUT_DELAY)

end

local function UseSkillCtrl(key,cnt)

PressKey("lctrl")

Sleep(INPUT_DELAY)

while cnt > 0 do

PressAndReleaseKey(key)

cnt = cnt - 1

end

ReleaseKey("lctrl")

Sleep(INPUT_DELAY)

end

local function GetCurrentPixel()

local coord_x_64K, coord_y_64K = GetMousePosition()

Sleep(1)

local coord_x_pixel = math.floor((coord_x_64K + (0.5 + 2^-16)) * (SCREEN_WIDTH - 1) / 65535)

local coord_y_pixel = math.floor((coord_y_64K + (0.5 + 2^-16)) * (SCREEN_HIGHT - 1) / 65535)

return coord_x_pixel, coord_y_pixel

end

local function MoveMousePixel(target_x_pixel,target_y_pixel)

local current_x_pixel, current_y_pixel, x, y

local maximum_cnt = SCREEN_WIDTH

while true do

current_x_pixel, current_y_pixel = GetCurrentPixel()

if current_x_pixel - target_x_pixel > TOLERANCE then

x = -1

elseif target_x_pixel- current_x_pixel > TOLERANCE then

x = 1

else

x = 0

end

if current_y_pixel - target_y_pixel > TOLERANCE then

y = -1

elseif target_y_pixel - current_y_pixel > TOLERANCE then

y = 1

else

y = 0

end

MoveMouseRelative(x * (TOLERANCE+1) , y * (TOLERANCE+1) )

maximum_cnt = maximum_cnt - 1

if maximum_cnt <0 or (x== 0 and y == 0) then

break

end

end

Sleep(FUNCTION_DELAY)

end

local function Retreat(target_x_pixel,target_y_pixel)

MoveMousePixel(target_x_pixel,target_y_pixel)

PressAndReleaseMouseButton(1)

PressAndReleaseKey("escape")

PressAndReleaseMouseButton(1)

PressAndReleaseMouseButton(1)

Sleep(FUNCTION_DELAY)

end

function OnEvent(event,arg)

if(event=="MOUSE_BUTTON_PRESSED" and arg ==2) then

OutputLogMessage("MoveMousePixel(%d,%d) ", GetCurrentPixel());

end

if(event=="MOUSE_BUTTON_RELEASED" and arg ==2) then

end

if(event=="MOUSE_BUTTON_PRESSED" and arg ==4) then

Retreat(975,609)

end

if(event=="MOUSE_BUTTON_RELE22ASED" and arg ==4) then

end

end

맨위에 두줄은 모니터 해상도

이 스크립트 저장하고 우클릭 하면 스크립트 창에서 좌표 뜸;;;

그걸로 퇴각 하기 좌표 알아내서

밑에서 5번째에 retreat(x,y)에 x,y 입력하면됨;;

나는 g102 기준 왼쪽 키 밑에 걸로 설정함;;

마이너 갤러리 이슈박스, 최근방문 갤러리

마이너 갤러리 소개

갤러리 본문 영역

[일반] 로지텍 칼퇴 스크립트 마우스 느린 얘들 함 봐(해결법 有)

ㅇㅇ(220.86) 2021.05.16 11:52:04

거상 반년 접었다가 복귀 했는데

이전에 내가 올렸던 칼퇴 스크립트(//gall.dcinside.com/mgallery/board/view/?id=gersang&no=481739) 마우스 속도가 엄청 느려졌네.

찾아보니까 윈도우10 2004버전 부터 ㅈㄹ병 하는거 같아서 문제 되는 부분좀 수정 함.

혹시 같은 문제로 고민 하는 얘들 있으면 아래로 스크립트 수정해서 함 해보고 피드백좀.

기존 스크립트에 12 ~ 22줄 까지만 넣으면 됌.

local Sleep_org = Sleep

--author : //www.unknowncheats.me/forum/programming-for-beginners/444300-sleep-function-logitech-lua.html#post3085678

local function Sleep(t)

sleep_start_time = GetRunningTime()

repeat

sleep_end_time = GetRunningTime()

sleep_elapsed = sleep_end_time - sleep_start_time

until(sleep_elapsed>t)

end

굳이 설명을 하자면, 기존 Sleep함수로 지연시간 준걸 위 함수로 대체 한것임.

기존 Sleep 함수를 쓰고 싶다면 Sleep_org로 호출하면 됌.

추천 비추천

2

0

하단 갤러리 리스트 영역

왼쪽 컨텐츠 영역

갤러리 리스트 영역

갤러리 내부 검색

오른쪽 컨텐츠 영역

Toplist

최신 우편물

태그