CSGO按鍵精靈急停
//綁鍵,防止peek受影響,把前后左右額外綁定小鍵盤8546按鍵
bind "kp_uparrow" " forward"
bind "kp_5" " back"
bind "kp_leftarrow" " moveleft"
bind "kp_rightarrow" " moveright"
//進(jìn)游戲打開控制臺(tái)輸入 exec *** 自己創(chuàng)建的cfg文件即可
//按鍵精靈ADS,240ms判定代碼。非專業(yè),能力有限,可自行修改。
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鍵開始計(jì)時(shí)
? ? ? ? ? ?If Key = 0 Then
? ? ? ? ? ?b = Plugin.Sys.GetTime() //A鍵彈起計(jì)時(shí)結(jié)束
? ? ? ? ? ?Lapsedtime = b - a ?//計(jì)算A鍵按下時(shí)間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