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

Commit

Permalink
Version 1.0.1.
Browse files Browse the repository at this point in the history
Moved from 32-bit to 64-bit executable.
No longer falsely detected by AV.
Added configuration options.
  • Loading branch information
Snaacky committed Sep 26, 2017
1 parent 205f4f3 commit 1609b81
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 16 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,7 @@ ENV/
/site

# mypy
.mypy_cache/
.mypy_cache/

# crouchjump
config.ini
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
A crouch-jump hotkey script for PUBG without having to rely on in-game bugs, autohotkey, and third-party mouse/keyboard drivers.

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

## Information
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.

## Warning
[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.
## Legality of Macros
[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.

## Requirements (source code only)
* [Python 3.x](https://www.python.org/)
Expand Down
2 changes: 1 addition & 1 deletion compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ python %localappdata%\Programs\Python\Python35\Scripts\pyinstaller-script.py src
@RD /S /Q "build"
del /s /q "crouchjump.spec"
cd %~p0/utils/
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"
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"
cd %~p0/src/
@RD /S /Q "__pycache__"
59 changes: 51 additions & 8 deletions src/crouchjump.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,55 @@
import keyboard
import os
from win32gui import GetWindowText, GetForegroundWindow

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

while True:
if "PLAYERUNKNOWN'S BATTLEGROUNDS" in GetWindowText(GetForegroundWindow()):
keyboard.wait("shift+space")
keyboard.press_and_release("space")
keyboard.press_and_release("space")
keyboard.press_and_release("c")
keyboard.press_and_release("c")
def main():
if not does_config_exists():
print("Config not found. Creating one.")
create_config()

result = read_config()
jump = result[0]
crouch = result[1]
toggle = result[2]

start_loop(jump, crouch, toggle)


def start_loop(jump, crouch, toggle):
print("Crouchjump (v1.0.1) loaded. Use {} to crouch jump.".format(toggle))

while True:
if "PLAYERUNKNOWN'S BATTLEGROUNDS" in GetWindowText(GetForegroundWindow()):
keyboard.wait(toggle)
keyboard.press_and_release(jump)
keyboard.press_and_release(jump)
keyboard.press_and_release(crouch)
keyboard.press_and_release(crouch)


def does_config_exists():
if os.path.exists(os.getcwd() + "\config.ini"):
return True


def create_config():
with open("config.ini", "a+") as file:
file.write("jump=space\n")
file.write("crouch=c\n")
file.write("toggle=shift+space")


def read_config():
with open("config.ini", "r") as file:
lines = file.readlines()
jump = lines[0].replace("jump=", "")
jump = jump.replace("\n", "")
crouch = lines[1].replace("crouch=", "")
crouch = crouch.replace("\n", "")
toggle = lines[2].replace("toggle=", "")
return jump, crouch, toggle


if __name__ == '__main__':
main()

0 comments on commit 1609b81

Please sign in to comment.