Skip to content
This repository was archived by the owner on Jun 22, 2022. It is now read-only.

Commit 1609b81

Browse files
committed
Version 1.0.1.
Moved from 32-bit to 64-bit executable. No longer falsely detected by AV. Added configuration options.
1 parent 205f4f3 commit 1609b81

File tree

4 files changed

+59
-16
lines changed

4 files changed

+59
-16
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,7 @@ ENV/
9898
/site
9999

100100
# mypy
101-
.mypy_cache/
101+
.mypy_cache/
102+
103+
# crouchjump
104+
config.ini

README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
A crouch-jump hotkey script for PUBG without having to rely on in-game bugs, autohotkey, and third-party mouse/keyboard drivers.
33

44
## Download
5-
[You may click here to go to the download page.](https://github.com/Snaacky/Crouchjump/releases/tag/v1.0)
5+
[You may click here to go to the download page.](https://github.com/Snaacky/Crouchjump/releases/)
66

7-
## Information
8-
In the current state, Crouchjump requires you to have space bound to jump and C bound to crouch. If there is demand for it, I will add configuration options to the compiled version so you can set your binds freely.
9-
10-
## Warning
11-
[poopieQueen](https://twitter.com/poopiequeen), community lead for PUBG, has stated [in her AMA](https://www.reddit.com/r/PUBATTLEGROUNDS/comments/72396a/iama_poopiequeen_ama/dnfg087/) that "at the moment" Bluehole are not banning users for macros so this should be safe to use. If there becomes a time in which it is unsafe, I will update this statement.
7+
## Legality of Macros
8+
[poopieQueen](https://twitter.com/poopiequeen), community lead for PUBG, has stated [in her AMA](https://www.reddit.com/r/PUBATTLEGROUNDS/comments/72396a/iama_poopiequeen_ama/dnfg087/) that "at the moment" Bluehole are not banning users for macros so this should be safe to use.
129

1310
## Requirements (source code only)
1411
* [Python 3.x](https://www.python.org/)

compile.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ python %localappdata%\Programs\Python\Python35\Scripts\pyinstaller-script.py src
44
@RD /S /Q "build"
55
del /s /q "crouchjump.spec"
66
cd %~p0/utils/
7-
verpatch.exe ../dist/crouchjump.exe 1.0.0.0 /va /pv 1.0.0.0 /s description "A crouch-jump hotkey script for PUBG." /s product "Crouchjump" /s copyright "No copyright applied." /s company "https://github.com/snaacky"
7+
verpatch.exe ../dist/crouchjump.exe 1.0.1.0 /va /pv 1.0.1.0 /s description "A crouch-jump hotkey script for PUBG." /s product "Crouchjump" /s copyright "No copyright applied." /s company "https://github.com/snaacky"
88
cd %~p0/src/
99
@RD /S /Q "__pycache__"

src/crouchjump.py

+51-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,55 @@
11
import keyboard
2+
import os
23
from win32gui import GetWindowText, GetForegroundWindow
34

4-
print("Crouchjump.py loaded. Use shift+space to crouch jump.")
55

6-
while True:
7-
if "PLAYERUNKNOWN'S BATTLEGROUNDS" in GetWindowText(GetForegroundWindow()):
8-
keyboard.wait("shift+space")
9-
keyboard.press_and_release("space")
10-
keyboard.press_and_release("space")
11-
keyboard.press_and_release("c")
12-
keyboard.press_and_release("c")
6+
def main():
7+
if not does_config_exists():
8+
print("Config not found. Creating one.")
9+
create_config()
10+
11+
result = read_config()
12+
jump = result[0]
13+
crouch = result[1]
14+
toggle = result[2]
15+
16+
start_loop(jump, crouch, toggle)
17+
18+
19+
def start_loop(jump, crouch, toggle):
20+
print("Crouchjump (v1.0.1) loaded. Use {} to crouch jump.".format(toggle))
21+
22+
while True:
23+
if "PLAYERUNKNOWN'S BATTLEGROUNDS" in GetWindowText(GetForegroundWindow()):
24+
keyboard.wait(toggle)
25+
keyboard.press_and_release(jump)
26+
keyboard.press_and_release(jump)
27+
keyboard.press_and_release(crouch)
28+
keyboard.press_and_release(crouch)
29+
30+
31+
def does_config_exists():
32+
if os.path.exists(os.getcwd() + "\config.ini"):
33+
return True
34+
35+
36+
def create_config():
37+
with open("config.ini", "a+") as file:
38+
file.write("jump=space\n")
39+
file.write("crouch=c\n")
40+
file.write("toggle=shift+space")
41+
42+
43+
def read_config():
44+
with open("config.ini", "r") as file:
45+
lines = file.readlines()
46+
jump = lines[0].replace("jump=", "")
47+
jump = jump.replace("\n", "")
48+
crouch = lines[1].replace("crouch=", "")
49+
crouch = crouch.replace("\n", "")
50+
toggle = lines[2].replace("toggle=", "")
51+
return jump, crouch, toggle
52+
53+
54+
if __name__ == '__main__':
55+
main()

0 commit comments

Comments
 (0)