欢迎光临散文网 会员登陆 & 注册

CSGO按键精灵急停

2023-08-29 03:13 作者:雨滴le  | 我要投稿

//绑键,防止peek受影响,把前后左右额外绑定小键盘8546按键
bind "kp_uparrow" " forward"
bind "kp_5" " back"
bind "kp_leftarrow" " moveleft"
bind "kp_rightarrow" " moveright"
//进游戏打开控制台输入 exec *** 自己创建的cfg文件即可

//按键精灵ADS,240ms判定代码。非专业,能力有限,可自行修改。
SetSimMode 2
Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer
ajm1 = 65
ajm2 = 68
ajm3 = 83

Do
aj = WaitKey
If aj = 65 Then
a = Plugin.Sys.GetTime()
       do
           Key = GetAsyncKeyState(ajm1) //按下A键开始计时
           If Key = 0 Then
           b = Plugin.Sys.GetTime() //A键弹起计时结束
           Lapsedtime = b - a  //计算A键按下时间t
           If Lapsedtime <= 240 Then //如果t1240,则t2=120ms固定。下同
            Lapsedtime = Lapsedtime / 2
            ElseIf Lapsedtime > 240 Then
            Lapsedtime = 120
           End If
               KeyDown 102, 1
               Delay Lapsedtime
               Keyup 102, 1
               Exit Do
           End If
       Loop
       
ElseIf aj = 68 Then
a = Plugin.Sys.GetTime()
       do
           Key = GetAsyncKeyState(ajm2)
           If Key = 0 Then
           b = Plugin.Sys.GetTime()
           Lapsedtime = b - a
           If Lapsedtime <= 240 Then
            Lapsedtime = Lapsedtime / 2
            ElseIf Lapsedtime > 240 Then
            Lapsedtime = 120
           End If
               KeyDown 100, 1
               Delay Lapsedtime
               Keyup 100, 1
               Exit Do
           End If
       Loop

ElseIf  aj = 83 Then
a = Plugin.Sys.GetTime()
       do
           Key = GetAsyncKeyState(ajm3)
           If Key = 0 Then
           b = Plugin.Sys.GetTime()
           Lapsedtime = b - a
           If Lapsedtime <= 240 Then
            Lapsedtime = Lapsedtime / 2
            ElseIf Lapsedtime > 240 Then
            Lapsedtime = 120
           End If
               KeyDown 104, 1
               Delay Lapsedtime
               Keyup 104, 1
               Exit Do
           End If
       Loop
End If
Loop

//ADS固定70ms代码
SetSimMode 2
Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer
ajm1 = 65
ajm2 = 68
ajm3 = 83
Do
   aj = WaitKey
   If aj = 65 Then //按下A键
       do
           Key = GetAsyncKeyState(ajm1)
           If Key =  0  Then   //A键弹起
               KeyDownS 102, 1
               Delay 70
               KeyUpS 102, 1
               Exit Do
           End If
       Loop
   ElseIf  aj = 68 Then
       do
           Key = GetAsyncKeyState(ajm2)
           If Key =  0  Then
               KeyDownS 100, 1
               Delay 70
               KeyUpS 100, 1
               Exit Do
           End If
       Loop
   ElseIf  aj = 83 Then
       do
           Key = GetAsyncKeyState(ajm2)
           If Key =  0  Then
               KeyDownS 104, 1
               Delay 70
               KeyUpS 104, 1
               Exit Do
           End If
       Loop
   End If
Loop


CSGO按键精灵急停的评论 (共 条)

分享到微博请遵守国家法律