'서든어택매크로'에 해당되는 글 2건
- 2020.04.11 :: [서든어택] 오토핫키 소스 1
- 2020.04.11 :: [서든어택] 오토샷 소스 2
SetKeyDelay,-1, 8
SetControlDelay, -1
SetMouseDelay, -1
SetWinDelay,-1
SendMode, InputThenPlay
SetBatchLines,-1
ListLines, Off
CoordMode, Pixel, Screen, RGB
CoordMode, Mouse, Screen
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, NormalGui ,Color, A4A4A4
Gui, Font, Bold cBlack, Arial
Gui, Font, Bold cBlack, Arial
Gui, Add, GroupBox, x12 y129 w240 h120 , 인식범위 조절
Gui, Font, Bold cBlack, Arial
Gui, Add, GroupBox, x12 y259 w240 h70 , 떨림보정
Gui, Add, GroupBox, x12 y9 w240 h120 , 해상도
Gui, Font, Bold, Arial
Gui, Font, s10 Bold cBlack, Arial
Gui, Font, s8 Bold cBlack, Arial
Gui, Add, Slider, x22 y279 w170 h40 center altsubmit range1-20 gloop vlpcou, %lpcou%
Gui, Font, s15 Bold c0x000000, Arial
Gui, Add, Text, x202 y289 w40 h20 vloopcou +0x200, %lpcou%
Gui, Font, s8 Bold cBlack, Arial
Gui, Font, Bold Underline cRed, Arial
Gui, Add, CheckBox, x272 y189 w70 h20 vta1, 팀구분
Gui, Add, CheckBox, x342 y189 w70 h20 vta2, 일반
Gui, Font, Bold Underline cblue, Arial
Gui, Add, CheckBox, x412 y189 w70 h20 vta3, A T
Gui, Font, Bold, Arial
Gui, Add, GroupBox, x262 y9 w230 h70 ,67
Gui, Add, Slider, x272 y29 w160 h40 center altsubmit range0-120 g슬라이더 v오차범위, %오차범위%
Gui, Font, s15 Bold c0x000000, Arial
Gui, Add, Text, x442 y29 w40 h40 v오차범위숫자 +0x200, %오차범위%
Gui, Font, Bold혻c0x000000, Arial
Gui, Add, GroupBox, x262 y79 w230 h80 , 배속
Gui, Add, Text, x642 y149 w190 h30 , Recommend value 15~20
Gui, Add, Slider, x272 y109 w160 h40 center altsubmit range1-30 gAMS vAimcount, %aimcount%
Gui, Font, s15 Bold c0x000000, Arial
Gui, Add, Text, x442 y109 w40 h40 vAimsc +0x200, %aimcount%
Gui, Font, s8 Bold, Tahoma
Gui, Add, Button, x262 y289 w50 h40 gSave1, Save1
Gui, Add, Button, x322 y289 w50 h40 gLoad1, Load1
Gui, Font, s10 Bold cblack, Arial
Gui, Add, Text, x22 y159 w40 h20 , 좌 우
Gui, Add, Text, x22 y209 w40 h20 , 상 하
Gui, Add, Text, x22 y39 w10 h20 , X
Gui, Add, Text, x22 y89 w10 h20 , Y
Gui, Add, Slider, x72 y149 w120 h40 center altsubmit range1-200 gscanX vFoX, %fox%
Gui, Add, Slider, x72 y199 w120 h40 center altsubmit range1-200 gscanY vFoY, %foy%
Gui, Add, Slider, x42 y29 w150 h40 center altsubmit range394-510 gaxisXX vaxisX, %axisX%
Gui, Add, Slider, x42 y79 w150 h40 center altsubmit range296-395 gaxisYY vaxisY, %axisY%
Gui, Font, s15 Bold c0x000000, Arial
Gui, Add, Text, x202 y39 w30 h20 vaxisXcou +0x200, %axisX%
Gui, Add, Text, x202 y89 w30 h20 vaxisYcou +0x200, %axisY%
Gui, Add, Text, x202 y159 w30 h20 vScanXcou +0x200, %FoX%
Gui, Add, Text, x202 y209 w30 h20 vScanYcou +0x200, %FoY%
Gui, Font, S8 CDefault, Verdana
Gui, Add, CheckBox, x272 y219 w80 h20 vLc gMouseMoves, LeftClick
Gui, Add, CheckBox, x362 y219 w90 h20 VRc gMouseMoves, RightClick
Gui, Font, S8 CRed Bold, Verdana
Gui, Add, Button, x382 y289 w50 h40 , Save2
Gui, Add, Button, x442 y289 w50 h40 , Load2
Gui, Font, S8 CGreen, Verdana
Gui, Add, Text, x282 y249 w190 h20 , 엘자와 쀼까
Gui, Font, S9 CGreen, Verdana
Gui, Font, S10 CGreen, Verdana
Gui, Font, S12 CGreen, Verdana
Gui, Font, S12 CGreen, Arial
Gui, Font, S12 CGreen Bold, Arial
Gui, Font, S12 CGreen Bold, Arial
Gui, Add, GroupBox, x262 y159 w230 h120 , 모 드
Gui, Show, x259 y242 h343 w508, YouTube
Gui, color, A4A4A4
gui,3:color, A4A4A4
suspend,off
ON = 0
ON2 = 0
Loop
{
ZeroX :=axisX
ZeroY :=axisY
ZeroX2 :=axisX
ZeroY2 :=axisY
XFoV := FoX
Yfov := FoY
ScanL := ZeroX-XFoV
ScanR :=ZeroX+Xfov
ScanT := ZeroY-Yfov
ScanB := ZeroY+Yfov
ScanL2 := ZeroX2-15
ScanR2 := ZeroX2+15
ScanT2 := ZeroY2-15
ScanB2 := ZeroY2+15
guicontrolget,foy
guicontrolget,fox
guicontrolget,axisX
guicontrolget,axisY
GetKeyState, Operate,%op%
GuiControlGet, Lc,,Lc
if Lc = 1
{
GetKeyState, Mouse_1, Lbutton, P
GuiControlGet, ta2,,ta2
if ta2 = 1
{
if Mouse_1 = D
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0xFF00DD, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
loop
{
PixelSearch, AimPixelX, AimPixelY, ScanL2, ScanT2, ScanR2, ScanB2, 0x720072, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
}
else
{
break
}
}
}
}
}
}
GuiControlGet, Rc,,Rc
if Rc = 1
{
GetKeyState, Mouse_1, Rbutton, P
GuiControlGet, ta2,,ta2
if ta2 = 1
{
if Mouse_1 = D
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0xFF00DD, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
loop
{
PixelSearch, AimPixelX, AimPixelY, ScanL2, ScanT2, ScanR2, ScanB2, 0x720072, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
}
else
{
break
}
}
}
}
}
}
GuiControlGet, ta3,,ta3
if ta3 = 1
{
if Mouse_1 = D
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0x720072, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
MouseClick, left
GoSub SleepF
}
}
}
GuiControlGet, ta1,,ta1
if ta1 = 1
{
if Mouse_1 = D
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0xFF0000, 10, Fast RGB
if errorlevel = 0
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0xFF00DD, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset2
GoSub GetAimMoves
GoSub MouseMoves
loop
{
PixelSearch, AimPixelX, AimPixelY, ScanL2, ScanT2, ScanR2, ScanB2, 0x720072, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset2
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
}
else
{
break
}
}
}
else errorlevel = 1
{
GoSub sleepF
}
}
}
}
}
Search:
{
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, 0x720072, %오차범위%, Fast RGB
if errorlevel = 0
{
GoSub GetAimOffset
GoSub GetAimMoves
GoSub MouseMoves
GoSub SleepF
}
}
GetAimOffset:
AimX := AimPixelX - ZeroX
AimY := AimPixelY - ZeroY
If ( AimX > 1 ) {
DirX := 0.8
}
If ( AimX < 1 ) {
DirX := -0.8
}
If ( AimY > 1 ) {
DirY := 0.8
}
If ( AimY < 1 ) {
DirY := -0.8
}
AimOffsetX := AimX * DirX
AimOffsetY := AimY * DirY
Return
GetAimOffset2:
AimX := AimPixelX - ZeroX
AimY := AimPixelY - ZeroY
If ( AimX > 1 ) {
DirX := 0.98
}
If ( AimX < 1 ) {
DirX := -0.98
}
If ( AimY > 1 ) {
DirY := 0.98
}
If ( AimY < 1 ) {
DirY := -0.98
}
AimOffsetX := AimX * DirX
AimOffsetY := AimY * DirY
Return
GetAimMoves:
Fx =7
Zx=%Aimcount%
AimA:=Fx/Zx
RootX := Ceil(( AimOffsetX ** (AimA)))
RootY := Ceil(( AimOffsetY ** (AimA)))
MoveX := RootX * DirX
MoveY := RootY * DirY
return
MouseMoves:
If (Mouse_1 == "D" ){
DllCall("mouse_event", uint, 1, int, MoveX, int, MoveY, uint, 0, int, 0)
}
Return
SleepF:
SleepDuration = 6
TimePeriod = 1
DllCall("Winmm\timeBeginPeriod", uint, TimePeriod)
Iterations =%lpcou%
StartTime := A_TickCount
Loop, %Iterations% {
DllCall("Sleep", UInt, TimePeriod)
}
DllCall("Winmm\timeEndPeriod", UInt, TimePeriod)
Return
DebugTool:
ToolTip, %MoveX% | %MoveY% || %MX% %MY%
Return
f1::
ON = 1
splashimage 1:,B c1 X1 Y1 W240 H45 CW000000 CTFF5A5A Fs25 ws800, ON
sleep,1000
splashimage, 1: off
return
f2::
ON = 0
splashimage 1:,B c1 X1 Y1 W240 H45 CW000000 CTA748FF Fs25 ws1000, OFF
sleep,1000
splashimage, 1: off
return
3guiclose:
gui,3: Destroy
suspend,off
return
save1:
Gui,submit,nohide
IniWrite,%오차범위%,setting1.ini,Error range,Error range
IniWrite,%Aimcount%,setting1.ini,AimMoveSpeed,AimMoveSpeed
IniWrite,%FoX%,setting1.ini,ScanX,ScanX
IniWrite,%FoY%,setting1.ini,ScanY,ScanY
IniWrite,%Lpcou%,setting1.ini,Lpcount,Lpcount
IniWrite,%axisX%,setting1.ini,axisX,axisX
IniWrite,%axisY%,setting1.ini,axisY,axisY
Msgbox, 64 , 알림,Error Range"%오차범위%" , AMS"%Aimcount%" Scan Range XY"%FoX%,%FoY%", Iteration"%Lpcou%"
return
save2:
Gui,submit,nohide
IniWrite,%오차범위%, setting2.ini,Error range,Error range
IniWrite,%Aimcount%, setting2.ini,AimMoveSpeed,AimMoveSpeed
IniWrite,%FoX%, setting2.ini,ScanX,ScanX
IniWrite,%FoY%, setting2.ini,ScanY,ScanY
IniWrite,%Lpcou%, setting2.ini,Lpcount,Lpcount
IniWrite,%axisX%, setting2.ini,axisX,axisX
IniWrite,%axisY%, setting2.ini,axisY,axisY
Msgbox, 64 , 알림,Error Range"%오차범위%" , AMS"%Aimcount%" Scan Range XY"%FoX%,%FoY%", Iteration"%Lpcou%"
return
load1:
{
ifexist, %A_scriptDir%\setting1.ini
{
Gui,submit,nohide
IniRead,오차범위,setting1.ini,Error range,Error range
IniRead,Aimcount,setting1.ini,AimMoveSpeed,AimMoveSpeed
IniRead,FoX,setting1.ini,ScanX,ScanX
IniRead,foY,setting1.ini,FOVX,FOVX
IniRead,foy,setting1.ini,ScanY,ScanY
IniRead,Lpcou,setting1.ini,Lpcount,Lpcount
IniRead,axisX,setting1.ini,axisX,axisX
IniRead,axisY,setting1.ini,axisY,axisY
Guicontrol,,오차범위,%오차범위%
Guicontrol,,오차범위숫자,%오차범위%
Guicontrol,,Aimcount,%Aimcount%
guicontrol,,Aimsc,%Aimcount%
Guicontrol,,FoX,%FoX%
guicontrol,,ScanXcou,%FoX%
Guicontrol,,FoY,%FoY%
guicontrol,,ScanYcou,%FoY%
Guicontrol,,Lpcou,%Lpcou%
guicontrol,,LoopCou,%Lpcou%
Guicontrol,,axisX,%axisX%
Guicontrol,,axisY,%axisY%
Guicontrol,,axisXcou,%axisX%
Guicontrol,,axisYcou,%axisY%
msgbox, 64,알림,Open Setting1.ini
return
}
else
{
MsgBox, 16,Caution ini read fail,설정 값을 새로 저장해 주시기 바랍니다.
}
}
return
load2:
{
ifexist, %A_scriptDir%\setting2.ini
{
Gui,submit,nohide
IniRead,오차범위,setting2.ini,Error range,Error range
IniRead,Aimcount,setting2.ini,AimMoveSpeed,AimMoveSpeed
IniRead,FoX,setting2.ini,ScanX,ScanX
IniRead,foY,setting2.ini,FOVX,FOVX
IniRead,foy,setting2.ini,ScanY,ScanY
IniRead,Lpcou,setting2.ini,Lpcount,Lpcount
IniRead,axisX,setting2.ini,axisX,axisX
IniRead,axisY,setting2.ini,axisY,axisY
Guicontrol,,오차범위,%오차범위%
Guicontrol,,오차범위숫자,%오차범위%
Guicontrol,,Aimcount,%Aimcount%
guicontrol,,Aimsc,%Aimcount%
Guicontrol,,FoX,%FoX%
guicontrol,,ScanXcou,%FoX%
Guicontrol,,FoY,%FoY%
guicontrol,,ScanYcou,%FoY%
Guicontrol,,Lpcou,%Lpcou%
guicontrol,,LoopCou,%Lpcou%
Guicontrol,,axisX,%axisX%
Guicontrol,,axisY,%axisY%
Guicontrol,,axisXcou,%axisX%
Guicontrol,,axisYcou,%axisY%
msgbox, 64,알림,Open Setting2.ini
return
}
else
{
MsgBox, 16,Caution ini read fail,설정 값을 새로 저장해 주시기 바랍니다.
}
}
return
return
슬라이더:
gui, submit,nohide
guicontrol,,오차범위숫자,%오차범위%
return
AMS:
gui, submit,nohide
guicontrol,,Aimsc,%Aimcount%
return
ScanX:
gui, submit,nohide
guicontrol,,ScanXcou,%FoX%
return
ScanY:
gui, submit,nohide
guicontrol,,ScanYcou,%FoY%
return
Loop:
gui, submit,nohide
guicontrol,,LoopCou,%Lpcou%
return
axisXX:
gui, submit,nohide
guicontrol,,axisXcou,%axisX%
return
axisYY:
gui, submit,nohide
guicontrol,,axisYcou,%axisY%
return
return
GetOut:
GuiClose:
Gui, Hide
ExitApp
exitapp
'게임 코드 자료실' 카테고리의 다른 글
[서든어택] 오토샷 소스 (2) | 2020.04.11 |
---|---|
[오버워치] 매크로 소스 (2019Ver) (0) | 2020.04.11 |
[서든어택] 쉘값&H코드값 (자료코드) (2) | 2020.04.11 |
[서든어택] 월H 소스 (C++) (0) | 2020.04.10 |
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
CoordMode, ToolTip, Screen
ListLines Off
SendMode InputThenPlay
SetBatchLines -1
SetControlDelay, -1
SetKeyDelay, -1, 0
SetMouseDelay, -1
SetWinDelay, -1
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, Normal
global X1, Y1, X2, Y2, 돌격소총, 빨간색, 저격소총, 배경색, 전경색
global FPGCBufferDC = 0
global FPGCReady = 0
global FPGCWait = 1
Gui, Color, FFFFFF
Gui, Font,, 맑은 고딕
Gui, Add, Text,, 해상도
Gui, Add, DropDownList, AltSubmit g설정 v해상도 w200, 1024 × 768||1280 × 1024
Gui, Show,, Bomchattack
Gui, 2: +LastFound +AlwaysOnTop -Caption +ToolWindow
Gui, 2: Color, 000000
Gui, 2: Font, cffffff s12 bold, 굴림
Gui, 2: Margin, 0, 0
Gui, 2: Add, Text, v상태표시줄 w200
gosub, 설정열기
return
설정:
Gui, Submit, NoHide
if (해상도 = 1) {
X1 = 481
Y1 = 448
X2 = 513
Y2 = 385
상태표시줄Y := 768 - 66
Gui, 2: Show, x211 y%상태표시줄Y% NA, Secondary Bomchattack OSD
} else if (해상도 = 2) {
X1 = 609
Y1 = 596
X2 = 640
Y2 = 513
상태표시줄Y := 1024 - 66
Gui, 2: Show, x211 y%상태표시줄Y% NA, Secondary Bomchattack OSD
}
return
설정저장:
Gui, Submit, NoHide
IniWrite, %해상도%, bomchattack.ini, Bomchattack 설정, 해상도
return
설정열기:
if (FileExist("bomchattack.ini")) {
IniRead, 해상도, bomchattack.ini, Bomchattack 설정, 해상도, 1
GuiControl, Choose, 해상도, %해상도%
gosub, 설정
} else {
GuiControl, Choose, 해상도, 1
gosub, 설정
}
return
End::
Suspend, Off
Gosub, GuiClose
return
GuiClose:
gosub, 설정저장
ExitApp
return
돌격소총사격실행:
SetTimer, 돌격소총사격실행, Off
while (돌격소총 = 1) {
updateFPGC()
빨간색 := FPGC(X1, Y1)
if (빨간색 = 0x0000ff) {
DllCall("mouse_event", "UInt", 0x02)
DllCall("Sleep", UInt, 768)
DllCall("mouse_event", "UInt", 0x04)
DllCall("Sleep", UInt, 256)
}
}
while (돌격소총 = 0) {
updateFPGC()
빨간색 := FPGC(X1, Y1)
if (빨간색 = 0x0000FF) {
DllCall("mouse_event", "UInt", 0x02)
DllCall("Sleep", UInt, 16)
DllCall("mouse_event", "UInt", 0x04)
DllCall("Sleep", UInt, 16)
}
}
return
저격소총사격실행:
SetTimer, 저격소총사격실행, Off
updateFPGC()
전경색 := FPGC(X2, Y2)
while (저격소총 = 1) {
updateFPGC()
배경색 := FPGC(X2, Y2)
if (전경색 <> 배경색) {
저격소총 = 0
DllCall("mouse_event", "UInt", 0x02)
DllCall("Sleep", UInt, 16)
DllCall("mouse_event", "UInt", 0x04)
DllCall("Sleep", UInt, 1)
GuiControl, 2: , 상태표시줄, 저격소총 사격
break
}
}
return
FPGC(x, y) {
global FPGCBufferDC, FPGCReady, FPGCWait
global FPGCScreenLeft, FPGCScreenTop
; check if there is a valid data buffer
if (!FPGCReady) {
if (FPGCWait) {
Start := A_TickCount
While !FPGCReady {
Sleep, 10
if (A_TickCount - Start > 5000)
return -3 ; time out if data is not ready after 5 seconds
}
}
else
return -2 ; return an invalid color if waiting is disabled
}
return DllCall("GetPixel", "Uint", FPGCBufferDC, "int", x - FPGCScreenLeft, "int", y - FPGCScreenTop)
}
updateFPGC() {
global FPGCReady, FPGCBufferDC
static oldObject = 0, hBuffer = 0
static screenWOld = 0, screenHOld = 0
; get screen dimensions
global FPGCScreenLeft, FPGCScreenTop
SysGet, FPGCScreenLeft, 76
SysGet, FPGCScreenTop, 77
SysGet, screenW, 78
SysGet, screenH, 79
FPGCReady = 0
; determine whether the old buffer can be reused
bufferInvalid := screenW <> screenWOld OR screenH <> screenHOld OR FPGCBufferDC = 0 OR hBuffer = 0
screenWOld := screenW
screenHOld := screenH
if (bufferInvalid) {
; cleanly discard the old buffer
DllCall("SelectObject", "Uint", FPGCBufferDC, "Uint", oldObject)
DllCall("DeleteDC", "Uint", FPGCBufferDC)
DllCall("DeleteObject", "Uint", hBuffer)
; create a new empty buffer
FPGCBufferDC := DllCall("CreateCompatibleDC", "Uint", 0)
hBuffer := CreateDIBSection(FPGCBufferDC, screenW, screenH)
oldObject := DllCall("SelectObject", "Uint", FPGCBufferDC, "Uint", hBuffer)
}
screenDC := DllCall("GetDC", "Uint", 0)
; retrieve the whole screen into the newly created buffer
DllCall("BitBlt", "Uint", FPGCBufferDC, "int", 0, "int", 0, "int", screenW, "int", screenH, "Uint", screenDC, "int", FPGCScreenLeft, "int", FPGCScreenTop, "Uint", 0x40000000 | 0x00CC0020)
; important: release the DC of the screen
DllCall("ReleaseDC", "Uint", 0, "Uint", screenDC)
FPGCReady = 1
}
'게임 코드 자료실' 카테고리의 다른 글
[서든어택] 오토핫키 소스 (1) | 2020.04.11 |
---|---|
[오버워치] 매크로 소스 (2019Ver) (0) | 2020.04.11 |
[서든어택] 쉘값&H코드값 (자료코드) (2) | 2020.04.11 |
[서든어택] 월H 소스 (C++) (0) | 2020.04.10 |