F2::
#Persistent
#KeyHistory, 0
#NoEnv
#HotKeyInterval 1
#MaxHotkeysPerInterval 127
#InstallKeybdHook
#UseHook
#SingleInstance, Force
SetKeyDelay,-1, 8
SetControlDelay, -1
SetMouseDelay, 0
SetWinDelay,-1
SendMode, InputThenPlay
SetBatchLines,-1
ListLines, Off
CoordMode, Mouse, Client
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, Normal
ZeroX := 800
ZeroY := 440
CFovX := 760
CFovY := 400
ScanL := ZeroX - CFovX
ScanR := ZeroX + CFovX
ScanT := ZeroY - CFovY
ScanB := ZeroY + CFovY
GuiControlget, rX
GuiControlget, xA
GuiControlget, yA
GuiControlget, xrange
GuiControlget, yrange
Loop,
{
if (aimtype=1)
{
GetKeyState, Mouse2, LButton, P
GoSub MouseMoves2
}
Gui,Submit, Nohide
if (aimtype1=1)
{
GetKeyState, Mouse2, RButton, P
GoSub MouseMoves2
}
imageSearch, AimPixelX, AimPixelY, 0 + (A_Screenwidth*(xrange/10)), 0 + (A_Screenheight*(yrange/10)), A_Screenwidth - (A_Screenwidth*(xrange/10)), A_Screenheight - (A_Screenheight*(yrange/10)), *4 hhp.bmp
GoSub GetAimOffset
GoSub GetAimMoves
}
MouseMoves:
If ( Mouse2 == "D" ) {
DllCall("mouse_event", uint, 1, int, MoveX, int, MoveY, uint, 0, int, 0)
}
Return
MouseMoves1:
If ( Mouse2 == "U" ) {
DllCall("mouse_event", uint, 1, int, MoveX, int, MoveY, uint, 0, int, 0)
}
Return
MouseMoves2:
If ( Mouse2 == "D" ) {
DllCall("mouse_event", uint, 1, int, MoveX, int, MoveY, uint, 0, int, 0)
}
GetAimOffset:
Gui,Submit, Nohide
AimX := AimPixelX - ZeroX +xA
AimY := AimPixelY - ZeroY +xY
If ( AimX+5 > 0) {
DirX := rx / 10
}
If ( AimX+5 < 0) {
DirX := (-rx) / 10
}
If ( AimY+2 > 0 ) {
DirY := rX /10 *0.5
}
If ( AimY+2 < 0 ) {
DirY := (-rx) /10 *0.5
}
AimOffsetX := AimX * DirX
AimOffsetY := AimY * DirY
Return
GetAimMoves:
RootX := Ceil(( AimOffsetX ** ( 1/2 )))
RootY := Ceil(( AimOffsetY ** ( 1/2 )))
MoveX := RootX * DirX
MoveY := RootY * DirY
Return
SleepF:
SleepDuration = 1
TimePeriod = 1
DllCall("Winmm\timeBeginPeriod", uint, TimePeriod)
Iterations = 1
StartTime := A_TickCount
Loop, %Iterations% {
DllCall("Sleep", UInt, TimePeriod)
}
DllCall("Winmm\timeEndPeriod", UInt, TimePeriod)
Return
DebugTool:
MouseGetPos, MX, MY
ToolTip, %AimOffsetX% | %AimOffsetY%
ToolTip, %AimX% | %AimY%
ToolTip, %IntAimX% | %IntAimY%
ToolTip, %RootX% | %RootY%
ToolTip, %MoveX% | %MoveY% || %MX% %MY%
Return
DebugTool1:
MouseGetPos, MX, MY
ToolTip, %AimOffsetX% | %AimOffsetY%
ToolTip, %AimX% | %AimY%
ToolTip, %IntAimX% | %IntAimY%
ToolTip, %RootX% | %RootY%
ToolTip, %MoveX% | %MoveY% || %MX% %MY%
Return
ALT::
pause
SoundBEEP
return
F3::
Reload
Return
여기
ZeroX := 800
ZeroY := 440
CFovX := 760
CFovY := 400
중에 ZeroX,Y CFovX,Y 는 어떤 X,Y좌표를 뜻하는지 잘모르겠네요
aim좌표를 말하는건지 픽셀 검색한 좌표를 말하는건지..도통 모르겠네요
간절하게 해답좀 부탁드립니다. ㅠㅠ
소스가 뭔가 빠진 것 같긴한데.. 추측하자면 ZeroX,Y는 게임화면의 정중앙 좌표 같습니다.
아래 소스를 보면 ZeroX,Y 값을 기준으로 상하좌우 4등분으로 스캔값이
있어서 게임화면에서 나가지 않도록 조절하는 듯 합니다.
ZeroX := 800
ZeroY := 440
CFovX := 760
CFovY := 400
ScanL := ZeroX - CFovX
ScanR := ZeroX + CFovX
ScanT := ZeroY - CFovY
ScanB := ZeroY + CFovY