Skip to content

Commit

Permalink
修复卡壳的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsweet committed Mar 4, 2023
1 parent 743ae2a commit bc24c8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
26 changes: 10 additions & 16 deletions AHK/src/apexmaster.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Process, Priority, , A
SetBatchLines, -1
ListLines Off
SetWorkingDir %A_ScriptDir%
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
; SetKeyDelay, -1, -1
; SetMouseDelay, -1
; SetDefaultMouseSpeed, 0
; SetWinDelay, -1
; SetControlDelay, -1
; SendMode Input

RunAsAdmin()

Expand Down Expand Up @@ -460,7 +460,8 @@ DetectAndSetWeapon()

IsAutoClickNeeded()
{
return IsSingleFireAutoWeapon() && auto_fire
global auto_fire
return auto_fire && (current_weapon_type == P2020_WEAPON_TYPE || current_weapon_type == HEMLOK_SINGLE_WEAPON_TYPE)
}

~$*E Up::
Expand Down Expand Up @@ -521,7 +522,7 @@ $*LButton::
if (IsMouseShown() || current_weapon_type == DEFAULT_WEAPON_TYPE || current_weapon_type == SHOTGUN_WEAPON_TYPE || current_weapon_type == SNIPER_WEAPON_TYPE)
return

if (is_single_mode && !(IsSingleFireAutoWeapon() && auto_fire))
if (is_single_mode && !(IsAutoClickNeeded()))
return

if (ads_only && !GetKeyState("RButton"))
Expand Down Expand Up @@ -559,9 +560,8 @@ $*LButton::
interval := compensation[3]
}

if (IsSingleFireAutoWeapon()) {
if (IsAutoClickNeeded()) {
Click
Random, rand, 1, 20
interval := interval + rand
}

Expand All @@ -573,7 +573,6 @@ $*LButton::
Sleep, interval

if (!GetKeyState("LButton","P")) {
DllCall("mouse_event", uint, 4, int, 0, int, 0, uint, 0, int, 0)
break
}
}
Expand Down Expand Up @@ -618,11 +617,6 @@ IniRead:
}
return

IsSingleFireAutoWeapon()
{
return current_weapon_type == P2020_WEAPON_TYPE || current_weapon_type == HEMLOK_SINGLE_WEAPON_TYPE
}

; Suspends the script when mouse is visible ie: inventory, menu, map.
IsMouseShown()
{
Expand Down
2 changes: 1 addition & 1 deletion AHK/src/settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ volume="80"
rate="7"

[other settings]
debug="1"
debug="0"
gold_optics="1"

[trigger settings]
Expand Down

0 comments on commit bc24c8a

Please sign in to comment.