全境封锁2 自动连发/自动射击/后坐力补偿 AHK脚本
原作者外网,debug了一下,修复了自动射击开关并且把自动射击的判定按键改为鼠标右键Rbutton原帖搜auto-fire/auto-recoil关键词
将J添加为游戏左键射击按键
侧键mouse-4是自动连发,O/ctrl+O调整连发速度
小键盘+-调整后坐力补偿
F3脚本开关/F4自动射击开关
脚本里调整自动射击的识别范围与颜色
默认1080P下,鼠标中心左右50像素,上下10像素
分辨率越高请增加像素增大识别范围
0x3636F4是颜色R244 G54 B54
如果增大区域依旧不能自动射击,请截图提取准星RGB数值替换
使用方法,下载autohotkey,右键脚本Run Script开启后可测试,点击鼠标左键,会自动往下移动,按住侧键会自动按频率输入JJJJJJJJ
**** Hidden Message *****
全代码如下,可自行复制保存为.ahk文件
;#####################
;#=====Commands====#
;#####################
SetWorkingDir %A_ScriptDir%
#NoEnv
#InstallKeybdHook
#InstallMouseHook
#KeyHistory 0
#UseHook
#MaxThreadsPerHotkey 1
#MaxThreads 30
#MaxThreadsBuffer on
SendMode Input
ListLines, Off
PID := DllCall("GetCurrentProcessId")
Process, Priority, %PID%, High
SendMode Input
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
;#####################
;#====Initialization====#
;#####################
global _enabled := 0
global _autofire := 0
global _downVal = 2
global _rightVal = 0
global _rampdown = 1
global _shotdelay=0
global _readytofire = 1
global _timerRunning = 0
global crosshairX =
global crosshairY =
;####################
;#=====Hotkeys=====#
;####################
~F3:: ; Turn script on/off
_enabled := ! _enabled
_autofire = 0
ShowToolTip("Script Enabled= "_enabled)
return
~F4:: ;Change triggerbot to singleshot OR enable autofire if you also turn up duration with o / ctrl-o
_autofire := ! _autofire
ShowToolTip("Autofire= "_autofire)
return
~NumpadAdd:: ; Adds compensation.
_downVal := _downVal + 1
ShowToolTip("Downward compensation= " . _downVal)
return
~NumpadSub:: ; Substracts compensation.
if _downVal > 0
{
_downVal := _downVal - 1
ShowToolTip("Downward compensation= " . _downVal)
}
return
~^NumpadAdd:: ; Adds right adjust
_rightVal := _rightVal + 1
ShowToolTip("Right(+)/Left(-)= " . _rightVal)
return
~^NumpadSub:: ; Adds left adjust
_rightVal := _rightVal - 1
ShowToolTip("Right(+)/Left(-)= " . _rightVal)
return
~o:: ; Single shot timer up (zero is always fire)
_shotdelay := _shotdelay + 25
ShowToolTip("Single Shot Delay up= " _shotdelay)
Return
~^o:: ; Single shot timer down (zero is always fire)
if _shotdelay > 0
{
_shotdelay := _shotdelay - 25
ShowToolTip("Single Shot Delay down= " _shotdelay)
}
return
~LButton::lessrecoil()
~RButton::lessrecoil_triggerbot();"RButton" is mouse 2.If you change this, make sure you replace every RButton in the script.
~Joy10::lessrecoil_triggerbot_xbox()
;####################
;======Functions======
;####################
lessrecoil()
{
While GetKeyState("LButton")
{
sleep 10
if _enabled
{
ApplyReduction()
}
sleep 10
}
return
}
;==================
lessrecoil_triggerbot()
{
While GetKeyState("RButton")
{
{
if _enabled
{
if CrosshairCheck()
{
TryToFire()
ApplyReduction()
}
}
}
}
Send, {j up}
sleep 10
_timerRunning = 0
_readytofire = 1
return
}
;==================
lessrecoil_triggerbot_xbox()
{
While GetKeyState("Joy10")
{
{
if _enabled
{
if CrosshairCheck()
{
TryToFire()
ApplyReduction()
}
}
}
}
Send, {j up}
sleep 10
_timerRunning = 0
_readytofire = 1
return
}
;==================
ApplyReduction()
{
DllCall("mouse_event",uint,1,int,_rightVal,int,_downVal,uint,0,int,0)
Sleep 20
DllCall("mouse_event",uint,1,int,_rightVal,int,_downVal,uint,0,int,0)
Sleep 20
return
}
;==================
CrosshairCheck() ; returns as "true" if either autofire, or crosshair is found.
{
if _autofire = 0
return false
else
{
crosshairX =
MouseGetPos, mX, mY
x1 :=(mX-50)
x2 :=(mX+50)
y1:=(mY-10)
y2 :=(mY+10)
PixelSearch, crosshairX, crosshairY, x1, y1, x2, y2, 0x3636F4, 0, Fast
}
if crosshairX > 0 ;this will be set to either the x coord of the red found, or "1" if the triggerbot is turned off.
{
return true
}
else{
Send, {j up}
sleep 10
return false
}
}
;==================
TryToFire()
{
if _shotdelay = 0
{
Send, {j down}
return
}
else
{
if _readytofire = 1
{
Send, {j up}
sleep 25
Send, {j down}
_readytofire = 0
ShotTimer()
return
}
else
{
ShotTimer()
return
}
ShotTimer()
if _shotdelay > 0
{
Send, {j up}
ShotTimer()
Sleep 20
}
else
{
_readytofire = 1
}
}
}
;==================
ShotTimer()
{
if _timerRunning = 0
{
SetTimer, ShotWait, %_shotdelay%
_timerRunning = 1
return
}
else
return
ShotWait:
SetTimer, ShotWait, Off
_timerRunning = 0
_readytofire = 1
return
}
;==================
ShowToolTip(Text)
{
ToolTip, %Text%
SetTimer, RemoveToolTip, 3000
return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
}
;==================
感谢分享~!!!~!~!~!~!~! 66666666666666666
666666666666666666666666666666
感谢大佬
感谢分享!!
fefdsfddgfsfdsefwefw
ding。。。。。。。。。。。。
11166666666
111111111111111111
如果您要查看本帖隐藏内容请回复 4545664564566456
666666666666666666 6666666666 kkkkkkkkkkkkkkkkkkkkkkkkkkkkk
感谢分享
66666666666666
666666666666
66666666666
这脚本可以啊,不然单排太难受
{:3_91:}{:3_91:}
111111111111111111111111111111111
6666666666666666666666666666666666666
暗中观察
谢谢分享
阿萨德啊实打实大a
感谢分享
支持一下
感谢分享!