From a4f6e11d67ee019b77072fa7127a917ded265ccb Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 4 Apr 2023 11:16:49 +0200 Subject: [PATCH] use named list instead of IDs (#2) --- README.md | 4 ++-- main.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4407da9..2b4de4d 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ python .\main.py --offline - You also can bypass the interactive cheat selector by passing a list to the app. -For instance, using cheats `#1`, `#2`, `#3` and `#4`: +For instance, using `aimbot`, `bhop` and the `radar hack` ```powershell -python .\main.py --list=1,2,3,4 +python .\main.py --list=aimbot,bhop,radarhack ``` Feel free to modify the [run.bat](./run.bat) as you wish. diff --git a/main.py b/main.py index b09f94a..4661773 100644 --- a/main.py +++ b/main.py @@ -20,6 +20,7 @@ def do_on_exit(): if __name__ == "__main__": c_id = [] args = {} + wanted_list = [] if (len(argv) > 1): # User wanna use offline offsets @@ -28,12 +29,15 @@ if __name__ == "__main__": # User gave a list of cheats # Will bypass the interactive selection - c_id = [int(j) - 1 for j in [i for i in argv if i.startswith( + wanted_list = [j for j in [i for i in argv if i.startswith( "--list=")][0][7:].split(",")] # Load cheat class c = Cheat(**args) + # Load user list + c_id = [c.cheats_list.index(cheat) for cheat in wanted_list] + # Interactive selection if (c_id == []): # Cheat list