Code:
I have this script ahk for bf1 with many options the no recoil works very well but somebody could add the AUTOSPOT ???
#NoEnv
#Persistent
#MaxThreadsPerHotkey 1
SendMode Input
SetWorkingDir %A_ScriptDir%
AuD := 0
BiD := 0
CrP := 1
DrA := 1
ExM := 0
QiS := 0
RaF := 0
ReR := 1
PaS := 0
ViT := 1
VsM := 1
^r::Reload
Norecoil := 1596
~LShift::
CrP := 1
Gosub, Check
return
~x::
if (CrP=2) {
CrP := 1
} else {
CrP := 2
}
Gosub, Check
return
~y::
if (CrP=3) {
CrP := 1
} else {
CrP := 3
}
Gosub, Check
return
~^!V::
SeW := "MP18 (Trench)"
TiP := SeW
VsM := 1
BiD := 0
WiS1 := [2,37,1,21]
WiS2 := [2,22,1,22]
WiS3 := [2,25,1,20]
WiS4 := [2,21,1,14]
NoS := [1,22,1,13]
Gosub, ToP
return
~F2::
SeW := "MP18 (Optical)"
TiP := SeW
VsM := 1
BiD := 0
WiS2 := [2,36,1,22]
WiS3 := [2,21,1,21]
WiS4 := [2,21,2,22]
WiS5 := [2,21,2,20]
NoS := [1,22,1,13]
Gosub, ToP
return
~^!N::
SeW := "Automatico M1918 (Trench)"
TiP := SeW
VsM := 1
BiD := 0
WiS1 := [2,21,1,16]
WiS2 := [2,21,2,20]
WiS3 := [2,20,2,20]
WiS4 := [3,10,2,10]
NoS := [2,22,2,20]
Gosub, ToP
return
~F4::
SeW := "Automatico M1918 (Storm)"
TiP := SeW
VsM := 1
BiD := 0
WiS1 := [2,24,1,21]
WiS2 := [2,20,1,23]
WiS3 := [2,21,1,20]
WiS4 := [2,21,2,19]
NoS := [2,38,2,34]
Gosub, ToP
return
~F5::
SeW := "Automatico M1918 (Factory)"
TiP := SeW
VsM := 1
BiD := 0
WiS1 := [2,19,1,21]
WiS2 := [2,10,1,10]
WiS3 := [3,19,2,21]
WiS4 := [3,10,2,10]
NoS := [2,20,1,21]
Gosub, ToP
return
~^!B::
SeW := "Lewis Gun (Suppressive)"
TiP := SeW
VsM := 1
BiD := 1
WiS4 := [2,36,1,36]
WiS5 := [2,23,1,21]
WiS6 := [2,20,1,22]
WiS7 := [2,21,1,20]
NoS := [1,38,1,37]
WiB4 := [1,160,1,76]
WiB5 := [1,120,1,76]
WiB6 := [1,76,1,76]
WiB7 := [1,56,1,56]
NoB := [1,240,1,240]
Gosub, ToP
return
~F7::
SeW := "Lewis Gun (Optical)"
TiP := SeW
VsM := 1
BiD := 0
WiS2 := [1,37,1,21]
WiS3 := [1,23,1,22]
WiS4 := [1,22,1,10]
WiS5 := [1,21,1,20]
NoS := [1,38,1,37]
Gosub, ToP
return
~F8::
SeW := "Lewis Gun (Low Weight)"
TiP := SeW
VsM := 1
BiD := 1
WiS1 := [1,22,1,22]
WiS2 := [1,24,1,23]
WiS3 := [1,22,1,22]
WiS4 := [1,27,1,27]
NoS := [1,38,1,37]
WiB1 := [1,180,1,100]
WiB2 := [1,170,1,100]
WiB3 := [1,180,1,90]
WiB4 := [1,180,1,90]
NoB := [1,240,1,240]
Gosub, ToP
return
~F9::
SeW := "M1909 Benet-Mercie (Storm)"
TiP := SeW
VsM := 1
BiD := 0
WiS1 := [1,38,1,37]
WiS2 := [1,38,1,37]
WiS3 := [1,37,1,36]
WiS4 := [1,37,1,36]
NoS := [1,55,1,50]
Gosub, ToP
return
~F10::
SeW := "M1909 Benet-Mercie (Optical)"
TiP := SeW
VsM := 1
BiD := 0
WiS2 := [1,31,1,30]
WiS3 := [2,37,1,40]
WiS4 := [2,26,1,22]
WiS5 := [2,26,1,21]
NoS := [1,40,1,36]
Gosub, ToP
return
~^F1::
SeW := "M1909 Benet-Mercie (Telescopic)"
TiP := SeW
VsM := 1
BiD := 1
WiS5 := [2,24,1,21]
WiS6 := [3,38,2,21]
WiS7 := [3,36,2,22]
WiS8 := [3,26,2,21]
NoS := [1,38,1,36]
WiB5 := [2,120,1,130]
WiB6 := [2,114,1,100]
WiB7 := [2,90,1,90]
WiB8 := [2,80,1,74]
NoB := [1,230,1,210]
Gosub, ToP
return
~^F2::
SeW := "Madsen MG (Trench)"
TiP := SeW
VsM := 1
BiD := 0
WiS1 := [1,27,1,20]
WiS2 := [1,21,1,20]
WiS3 := [1,20,1,20]
WiS4 := [2,21,1,20]
NoS := [1,25,1,20]
Gosub, ToP
return
~^F3::
SeW := "Madsen MG (Storm)"
TiP := SeW
VsM := 1
BiD := 0
WiS1 := [1,37,1,32]
WiS2 := [1,22,1,22]
WiS3 := [2,37,1,36]
WiS4 := [2,22,1,21]
NoS := [1,37,1,36]
Gosub, ToP
return
~^F4::
SeW := "Madsen MG (Low Weight)"
TiP := SeW
VsM := 1
BiD := 1
WiS1 := [1,27,1,20]
WiS2 := [1,21,1,20]
WiS3 := [2,23,1,21]
WiS4 := [2,21,1,20]
NoS := [1,22,1,20]
WiB1 := [2,180,1,176]
WiB2 := [2,160,1,150]
WiB3 := [2,136,1,120]
WiB4 := [2,98,1,90]
NoB := [1,150,1,140]
Gosub, ToP
return
~^F5::
SeW := "MG 15 n.A (Suppressive)"
TiP := SeW
VsM := 1
BiD := 1
WiS4 := [2,23,2,23]
WiS5 := [2,21,2,21]
WiS6 := [3,22,2,21]
WiS7 := [3,22,2,20]
NoS := [1,22,1,22,1]
WiB4 := [2,130,1,126]
WiB5 := [2,100,1,96]
WiB6 := [2,80,1,70]
WiB7 := [2,70,1,60]
NoB := [1,150,1,140]
Gosub, ToP
return
~^F6::
SeW := "MG 15 n.A (Storm)"
TiP := SeW
VsM := 1
BiD := 0
WiS1 := [1,38,1,38]
WiS2 := [1,37,1,36]
WiS3 := [1,36,1,34]
WiS4 := [1,24,1,20]
NoS := [1,38,1,38]
Gosub, ToP
return
~^F7::
SeW := "MG 15 n.A (Low Weight)"
TiP := SeW
VsM := 1
BiD := 1
WiS1 := [1,23,1,25]
WiS2 := [1,22,1,20]
WiS3 := [2,22,1,22]
WiS4 := [1,20,1,20]
NoS := [1,22,,1,22]
WiB1 := [2,230,1,210]
WiB2 := [2,190,1,180]
WiB3 := [2,170,1,160]
WiB4 := [2,120,1,116]
NoB := [1,150,1,140]
Gosub, ToP
return
~^F8::
SeW := "BAR M1918 (Trench)"
TiP := SeW
VsM := 1
BiD := 0
WiS1 := [2,22,1,22]
WiS2 := [2,22,1,21]
WiS3 := [2,22,1,18]
WiS4 := [2,20,1,18]
NoS := [1,21,1,20]
Gosub, ToP
return
~^F9::
SeW := "BAR M1918 (Storm)"
TiP := SeW
VsM := 1
BiD := 0
WiS1 := [2,40,1,38]
WiS2 := [2,37,1,30]
WiS3 := [2,34,1,24]
WiS4 := [2,22,1,16]
NoS := [1,30,1,26]
Gosub, ToP
return
~^F10::
SeW := "BAR M1918 (Telescopic)"
TiP := SeW
VsM := 1
BiD := 1
WiS5 := [3,24,3,21]
WiS6 := [3,20,2,21]
WiS7 := [3,20,3,21]
WiS8 := [3,20,3,20]
NoS := [1,21,1,20]
WiB5 := [2,76,1,80]
WiB6 := [2,50,1,60]
WiB7 := [2,50,1,50]
WiB8 := [2,40,1,38]
NoB := [1,100,1,100]
Gosub, ToP
return
~^+A::
if (AfK=1) {
AfK := 0
TiP := "Anti-AFK OFF"
SetTimer, AfKOff, -1
return
} else {
AfK := 1
TiP := "Anti-AFK ON"
SetTimer, AfKOn, 30000
SetTimer, AfKOff, -900000
Gosub, ToP
return
AfKOn:
MouseMove, 2, 2, 2, R
Sleep, 1000
MouseMove, -2, -2, 2, R
Sleep, 1000
MouseMove, 1280, 920, 2
Sleep, 1000
Send {LButton down}
Sleep, 100
Send {LButton up}
Sleep, 100
return
}
AfKOff:
SetTimer, AfKOn, OFF
Gosub, ToP
return
~^+C::
if (AuD=0) {
AuD := 1
TiP := "Auto Dodge: Crouch"
} else if (AuD=1) {
AuD := 2
TiP := "Auto Dodge: Prone"
} else if (AuD=2) {
AuD := 0
TiP := "Auto Dodge: OFF"
}
Gosub, ToP
return
~^+D::
if (DrA=0) {
DrA := 1
TiP := "Direct Aim ON"
} else {
DrA := 0
TiP := "Direct Aim OFF"
}
Gosub, ToP
return
~^+Q::
if (QiS=0) {
QiS := 1
TiP := "Quick Scope Manual"
} else if (QiS=1) {
QiS := 2
TiP := "Quick Scope Auto"
} else if (QiS=2) {
QiS := 0
TiP := "Quick Scope OFF"
}
Gosub, ToP
return
~^+R::
if (RaF=0) {
RaF := 1
TiP := "Rapid Fire Manual"
} else if (RaF=1) {
RaF := 2
TiP := "Rapid Fire Auto"
} else if (RaF=2) {
RaF := 0
TiP := "Rapid Fire OFF"
}
Gosub, ToP
return
~^+V::
if (VsM=1) {
VsM := 2
TiP := "Zoom x 1.25"
} else if (VsM=2) {
VsM := 3
TiP := "Zoom x 1.50"
} else if (VsM=3) {
VsM := 4
TiP := "Zoom x 2.00"
} else if (VsM=4) {
VsM := 5
TiP := "Zoom x 2.50"
} else if (VsM=5) {
VsM := 6
TiP := "Zoom x 3.00"
} else if (VsM=6) {
VsM := 7
TiP := "Zoom x 3.50"
} else if (VsM=7) {
VsM := 8
TiP := "Zoom x 4.00"
} else if (VsM=8) {
VsM := 1
TiP := "Zoom x 1.00"
}
Gosub, ToP
return
~Numpad1::
VsM := 1
TiP := "Zoom x 1.00"
Gosub, ToP
return
~Numpad2::
VsM := 2
TiP := "Zoom x 1.25"
Gosub, ToP
return
~Numpad3::
VsM := 3
TiP := "Zoom x 1.50"
Gosub, ToP
return
~Numpad4::
VsM := 4
TiP := "Zoom x 2.00"
Gosub, ToP
return
~Numpad5::
VsM := 5
TiP := "Zoom x 2.50"
Gosub, ToP
return
~Numpad6::
VsM := 6
TiP := "Zoom x 3.00"
Gosub, ToP
return
~Numpad7::
VsM := 7
TiP := "Zoom x 3.50"
Gosub, ToP
return
~Numpad8::
VsM := 8
TiP := "Zoom x 4.00"
Gosub, ToP
return
~Numpad0::
if (CrP < 3) {
CrX := CrP
CrP := 3
TiP := "Cover Mode ON"
} else {
CrP := CrX
CrX := 0
TiP := "Cover Mode OFF"
}
Gosub, ToP
return
~^+X::
if (ExM=0) {
ExM := 1
TiP := "Extended Macros ON"
} else {
ExM := 0
TiP := "Extended Macros OFF"
}
Gosub, ToP
return
~1::
if (ExM=1) {
if (RaF=1) {
while GetKeyState("1", "P") {
Send {LButton down}
Sleep, 25
Send {LButton up}
Sleep, 25
}
}
}
Gosub, Check
return
~2::
if (ExM=1) {
if (QiS=1) {
while GetKeyState("2", "P") {
Send {RButton down}
Sleep, 240
Send {LButton down}
Sleep, 10
Send {RButton up}
Sleep, 10
Send {LButton up}
Sleep, 10
}
}
}
Gosub, Check
return
~O::
if (ExM=1) {
while GetKeyState("O", "P") {
Send {x down}
Sleep, 111
Send {x up}
Sleep, 111
}
}
Gosub, Check
return
~4::
if (ExM=1) {
while GetKeyState("4", "P") {
Send {a down}
Sleep, 400
Send {a up}
Sleep, 50
Send {d down}
Sleep, 400
Send {d up}
Sleep, 50
Send {d down}
Sleep, 400
Send {d up}
Sleep, 50
Send {a down}
Sleep, 400
Send {a up}
Sleep, 50
if GetKeyState("4", "P") =0 {
break
}
}
}
Gosub, Check
return
~5::
if (ExM=1) {
while GetKeyState("5", "P") {
Send {a down}
Sleep, 400
Send {a up}
Sleep, 50
Send {d down}
Sleep, 400
Send {d up}
Sleep, 50
if GetKeyState("5", "P") =0 {
break
}
}
}
Gosub, Check
return
~^i::
if (AuD=1) {
iAuD := "Crouch"
} else if (AuD=2) {
iAuD := "Prone"
} else {
iAuD := "OFF"
}
if (ExM=1) {
iExM := "ON"
} else {
iExM := "OFF"
}
if (DrA=1) {
iDrA := "ON"
} else {
iDrA := "OFF"
}
if (QiS=1) {
iQiS := "Manual"
} else if (QiS=2) {
iQiS := "Auto"
} else {
iQiS := "OFF"
}
if (RaF=1) {
iRaF := "Manual"
} else if (RaF=2) {
iRaF := "Auto"
} else {
iRaF := "OFF"
}
if (VsM=1) {
iVsM := "1.00"
} else if (VsM=2) {
iVsM := "1.25"
} else if (VsM=3) {
iVsM := "1.50"
} else if (VsM=4) {
iVsM := "2.00"
} else if (VsM=5) {
iVsM := "2.50"
} else if (VsM=6) {
iVsM := "3.00"
} else if (VsM=7) {
iVsM := "3.50"
} else if (VsM=8) {
iVsM := "4.00"
}
TiP = Weapon: %SeW%`nSelected Zoom: %ihVsM%`nDirect Aim: %iDrA%`nQuick Scope: %iQiS%`nRapid Fire: %iRaF%`nAuto Dodge: %iAuD%`nExtended Macros: %iExM%
Gosub, ToP
return
^p::
if (PaS=0) {
PaS := 1
TiP := "Pause ON"
ReR := 0
if (AuD > 0) {
AuD := 0
CrA := %AuD%
}
if (DrA=1) {
DrA := 0
CrB := 1
}
if (QiS > 0) {
QiS := 0
CrC := %QiS%
}
if (RaF > 0) {
RaF := 0
CrD := %RaF%
}
} else {
PaS := 0
TiP := "Pause OFF"
ReR := 1
if (CrA > 0) {
AuD := %CrA%
CrA := 0
}
if (CrB=1) {
DrA := 1
CrB := 0
}
if (CrC > 0) {
QiS := %CrC%
CrC := 0
}
if (CrD > 0) {
RaF := %CrD%
CrD := 0
}
}
Gosub, ToP
return
~Scrolllock::
if GetKeyState("Scrolllock", "T") {
TiP := "Reduced Recoil ON"
} else {
TiP := "Reduced Recoil OFF"
}
Gosub, ToP
return
ToP:
if (ViT=1) {
ToolTip, %TiP%
SetTimer, ToolTip, 1000
return
ToolTip:
SetTimer, ToolTip, Off
ToolTip
return
}
Gosub, Check
return
~^+F1::
TxT := "Text 1"
Gosub, TChat
return
~^+F2::
TxT := "Text 2"
Gosub, TChat
return
~^+F3::
TxT := "Text 3"
Gosub, TChat
return
~^+F4::
TxT := "Text 4"
Gosub, TChat
return
~^+F5::
TxT := "Text 5"
Gosub, TChat
return
~^+F6::
TxT := "Text 1"
Gosub, MChat
return
~^+F7::
TxT := "Text 2"
Gosub, MChat
return
~^+F8::
TxT := "Text 3"
Gosub, MChat
return
~^+F9::
TxT := "Text 4"
Gosub, MChat
return
~^+F10::
TxT := "Text 5"
Gosub, MChat
return
TChat:
if GetKeyState("Capslock", "T") {
Send {j down}
Sleep, 100
Send {j up}
Sleep, 100
Send, %TxT%
Send {Enter down}
Sleep, 100
Send {Enter up}
Sleep, 100
}
Gosub, Check
return
MChat:
if GetKeyState("Capslock", "T") {
Send {k down}
Sleep, 100
Send {k up}
Sleep, 100
Send, %TxT%
Send {Enter down}
Sleep, 100
Send {Enter up}
Sleep, 100
}
Gosub, Check
return
Check:
~LButton::
{
if (PaS=0) {
if (QiS=2) {
while GetKeyState("LButton", "P") {
Send {RButton down}
Sleep, 240
Send {LButton down}
Sleep, 10
Send {RButton up}
Sleep, 10
Send {LButton up}
Sleep, 10
}
} else {
if (DrA=1) {
AiM := 1
} else {
AiM := 0
}
if (AuD > 0 && CrP=1) {
MoV := 1
} else {
MoV := 0
}
if (RaF=2) {
if GetKeyState("LButton", "P") {
if (DrA=1 && AiM=1) {
Send {RButton down}
}
if (AuD > 0 && MoV=1 && CrP=1) {
if (AuD=1) {
if GetKeyState("RButton", "P") =0 {
Send {x down}
Sleep, 25
Send {x up}
CrP := 2
}
} else if (AuD=2) {
if GetKeyState("RButton", "P") =0 {
Send {y down}
Sleep, 25
Send {y up}
CrP := 3
}
}
}
}
while GetKeyState("LButton", "P") {
Send {LButton down}
Sleep, 10
Send {LButton up}
Sleep, 10
if GetKeyState("LButton", "P") =0 {
if (AiM=1) {
if GetKeyState("RButton", "P") =0 {
Send {RButton up}
AiM := 0
}
}
if (MoV=1) {
if (CrP=2) {
if GetKeyState("RButton", "P") =0 {
Send {x down}
Sleep, 25
Send {x up}
MoV := 0
CrP := 1
}
} else if (CrP=3) {
if GetKeyState("RButton", "P") =0 {
Send {y down}
Sleep, 25
Send {y up}
MoV := 0
CrP := 1
}
}
}
break
}
}
}
if GetKeyState("Scrolllock", "T") =0 {
if GetKeyState("LButton", "P") && DrA=1 && AiM=1 {
Send {RButton down}
}
if (AuD > 0 && MoV=1) {
if GetKeyState("LButton", "P") && CrP=1 {
if (AuD=1) {
if GetKeyState("RButton", "P") =0 {
Send {x down}
Sleep, 25
Send {x up}
CrP := 2
}
} else if (AuD=2) {
if GetKeyState("RButton", "P") =0 {
Send {y down}
Sleep, 25
Send {y up}
CrP := 3
}
}
}
}
while GetKeyState("LButton") {
TiN := 1
Sleep, 10
if GetKeyState("LButton", "P") =0 {
if (AiM=1) {
if GetKeyState("RButton", "P") =0 {
Send {RButton up}
AiM := 0
}
}
if (MoV=1) {
if (CrP=2) {
if GetKeyState("RButton", "P") =0 {
Send {x down}
Sleep, 25
Send {x up}
MoV := 0
CrP := 1
}
} else if (CrP=3) {
if GetKeyState("RButton", "P") =0 {
Send {y down}
Sleep, 25
Send {y up}
MoV := 0
CrP := 1
}
}
}
break
}
}
}
if (RaF < 2) {
if GetKeyState("Scrolllock", "T") {
if GetKeyState("RButton", "P") =1 && DrA=0 {
UsS := 1
} else {
UsS := 0
}
if GetKeyState("LButton", "P") {
if (DrA=1 && AiM=1) {
Send {RButton down}
UsS := 1
}
if (AuD > 0 && MoV=1) {
if GetKeyState("LButton", "P") && CrP=1 {
if (AuD=1) {
if GetKeyState("RButton", "P") =0 {
Send {x down}
Sleep, 25
Send {x up}
CrP := 2
}
} else if (AuD=2) {
if GetKeyState("RButton", "P") =0 {
Send {y down}
Sleep, 25
Send {y up}
CrP := 3
}
}
}
}
}
if (UsS=1) {
if (BiD=0) {
ArU := "WiS"
} else if (BiD=1 && CrP < 3) {
ArU := "WiS"
} else if (BiD=1 && CrP=3) {
ArU := "WiB"
}
CoR := 1
Loop, 8 {
if (VsM=CoR) {
Loop, 4 {
UsD%A_Index% := %ArU%%CoR%[A_Index]
}
break
}
CoR +=1
}
while GetKeyState("LButton") && GetKeyState("Scrolllock", "T") && ReR {
DllCall("mouse_event", uint, 1, int, 0, int, UsD1, uint, 0, int, 0)
Sleep, UsD2
DllCall("mouse_event", uint, 1, int, 0, int, UsD3, uint, 0, int, 0)
Sleep, UsD4
if GetKeyState("Scrolllock", "T") =0 || GetKeyState("LButton", "P") =0 {
if (AiM=1) {
if GetKeyState("RButton", "P") =0 {
Send {RButton up}
AiM := 0
UsS := 0
}
}
if (MoV=1) {
if (CrP=2) {
if GetKeyState("RButton", "P") =0 {
Send {x down}
Sleep, 25
Send {x up}
MoV := 0
CrP := 1
}
} else if (CrP=3) {
if GetKeyState("RButton", "P") =0 {
Send {y down}
Sleep, 25
Send {y up}
MoV := 0
CrP := 1
}
}
}
break
}
}
} else {
if (BiD=0) {
ArU := "NoS"
} else if (BiD=1 && CrP < 3) {
ArU := "NoS"
} else if (BiD=1 && CrP=3) {
ArU := "NoB"
}
Loop, 4 {
UsD%A_Index% := %ArU%[A_Index]
}
while GetKeyState("LButton") && GetKeyState("RButton", "P") =0 && GetKeyState("Scrolllock", "T") && ReR {
DllCall("mouse_event", uint, 1, int, 0, int, UsD1, uint, 0, int, 0)
Sleep, UsD2
DllCall("mouse_event", uint, 1, int, 0, int, UsD3, uint, 0, int, 0)
Sleep, UsD4
if GetKeyState("Scrolllock", "T") =0 || GetKeyState("LButton", "P") =0 {
if (MoV=1) {
if (CrP=2) {
if GetKeyState("RButton", "P") =0 {
Send {x down}
Sleep, 25
Send {x up}
MoV := 0
CrP := 1
}
} else if (CrP=3) {
if GetKeyState("RButton", "P") =0 {
Send {y down}
Sleep, 25
Send {y up}
MoV := 0
CrP := 1
}
}
}
break
}
}
}
}
}
}
}
}
return
~RAlt::
if GetKeyState("LButton") {
ON := 0
if (AuD > 0) {
AuD := 0
CrA := %AuD%
}
if (DrA=1) {
DrA := 0
CrB := 1
}
if (QiS > 0) {
QiS := 0
CrC := %QiS%
}
if (RaF > 0) {
RaF := 0
CrD := %RaF%
}
Sleep, 3
MouseClick, Left, , , , , U
ON := 1
if (CrA > 0) {
AuD := %CrA%
CrA := 0
}
if (CrB=1) {
DrA := 1
CrB := 0
}
if (CrC > 0) {
QiS := %CrC%
CrC := 0
}
if (CrD > 0) {
RaF := %CrD%
CrD := 0
}
}
return
~^!x::ExitApp
Last edited by a moderator: