trainerbase 4.0.2__tar.gz → 4.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trainerbase-4.0.2 → trainerbase-4.0.4}/PKG-INFO +1 -1
- {trainerbase-4.0.2 → trainerbase-4.0.4}/pyproject.toml +1 -1
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/tapper.py +11 -8
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/logger.py +4 -4
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/memory.py +1 -1
- {trainerbase-4.0.2 → trainerbase-4.0.4}/LICENSE +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/README.md +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/__init__.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/abc.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/codeinjection.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/common/__init__.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/common/abc.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/common/helpers.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/common/keyboard.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/common/rainbow.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/common/tapper.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/common/teleport.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/config.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gameobject.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/__init__.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/helpers.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/injections.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/misc.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/objects.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/rainbow.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/scripts.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/speedhack.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/teleport.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/gui/types.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/main.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/process.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/scriptengine.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/speedhack.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase/tts.py +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase_vendor/FASM.EXE +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase_vendor/speedhack32.dll +0 -0
- {trainerbase-4.0.2 → trainerbase-4.0.4}/trainerbase_vendor/speedhack64.dll +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from typing import override
|
|
2
|
+
from uuid import uuid4
|
|
2
3
|
|
|
3
4
|
from dearpygui import dearpygui as dpg
|
|
4
5
|
|
|
@@ -10,8 +11,8 @@ from trainerbase.gui.types import AbstractUIComponent
|
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class TapperUI(AbstractUIComponent):
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
DPG_TAG_TAPPER_DELAY_INPUT_PREFIX = "tag_tapper_delay_input"
|
|
15
|
+
DPG_TAG_TAPPER_PRESET_INPUT_PREFIX = "tag_tapper_preset_input"
|
|
15
16
|
|
|
16
17
|
PRESETS: tuple[float, ...] = (0.05, 0.15, 0.25, 0.3, 0.5, 0.7, 1, 2, 5, 10)
|
|
17
18
|
|
|
@@ -29,6 +30,8 @@ class TapperUI(AbstractUIComponent):
|
|
|
29
30
|
self.default_delay = tapper.delay
|
|
30
31
|
|
|
31
32
|
self.key = key
|
|
33
|
+
self.dpg_tag_tapper_delay_input = f"{self.DPG_TAG_TAPPER_DELAY_INPUT_PREFIX}_{uuid4()}"
|
|
34
|
+
self.dpg_tag_tapper_preset_input = f"{self.DPG_TAG_TAPPER_PRESET_INPUT_PREFIX}_{uuid4()}"
|
|
32
35
|
|
|
33
36
|
@override
|
|
34
37
|
def add_to_ui(self) -> None:
|
|
@@ -38,7 +41,7 @@ class TapperUI(AbstractUIComponent):
|
|
|
38
41
|
)
|
|
39
42
|
|
|
40
43
|
dpg.add_input_double(
|
|
41
|
-
tag=self.
|
|
44
|
+
tag=self.dpg_tag_tapper_delay_input,
|
|
42
45
|
label="Tapper Delay",
|
|
43
46
|
min_value=0.0,
|
|
44
47
|
max_value=60.0,
|
|
@@ -49,7 +52,7 @@ class TapperUI(AbstractUIComponent):
|
|
|
49
52
|
)
|
|
50
53
|
|
|
51
54
|
dpg.add_slider_int(
|
|
52
|
-
tag=self.
|
|
55
|
+
tag=self.dpg_tag_tapper_preset_input,
|
|
53
56
|
label="Preset",
|
|
54
57
|
min_value=0,
|
|
55
58
|
max_value=len(self.PRESETS) - 1,
|
|
@@ -59,15 +62,15 @@ class TapperUI(AbstractUIComponent):
|
|
|
59
62
|
)
|
|
60
63
|
|
|
61
64
|
def on_preset_change(self):
|
|
62
|
-
new_delay = self.PRESETS[dpg.get_value(self.
|
|
65
|
+
new_delay = self.PRESETS[dpg.get_value(self.dpg_tag_tapper_preset_input)]
|
|
63
66
|
self.tapper.delay = new_delay
|
|
64
|
-
dpg.set_value(self.
|
|
67
|
+
dpg.set_value(self.dpg_tag_tapper_delay_input, new_delay)
|
|
65
68
|
|
|
66
69
|
def on_delay_change(self):
|
|
67
|
-
new_delay = dpg.get_value(self.
|
|
70
|
+
new_delay = dpg.get_value(self.dpg_tag_tapper_delay_input)
|
|
68
71
|
closest_preset_index = self.get_closest_preset_index(new_delay)
|
|
69
72
|
self.tapper.delay = new_delay
|
|
70
|
-
dpg.set_value(self.
|
|
73
|
+
dpg.set_value(self.dpg_tag_tapper_preset_input, closest_preset_index)
|
|
71
74
|
|
|
72
75
|
def get_closest_preset_index(self, delay: float) -> int:
|
|
73
76
|
closest_preset = min(self.PRESETS, key=lambda preset: abs(preset - delay))
|
|
@@ -26,9 +26,9 @@ if logging_config is None:
|
|
|
26
26
|
"handlers": ["console"],
|
|
27
27
|
},
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
using_default_config = True
|
|
30
30
|
else:
|
|
31
|
-
|
|
31
|
+
using_default_config = False
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
dictConfig(logging_config)
|
|
@@ -36,5 +36,5 @@ getLogger("comtypes").setLevel(ERROR)
|
|
|
36
36
|
|
|
37
37
|
logger = getLogger("TrainerBase")
|
|
38
38
|
|
|
39
|
-
if
|
|
40
|
-
logger.
|
|
39
|
+
if using_default_config:
|
|
40
|
+
logger.debug(f"No logging config in {CONFIG_FILE}! Using default one.")
|
|
@@ -194,7 +194,7 @@ def get_module_address(module_name: str, *, delay: float = 2, retry_limit: int |
|
|
|
194
194
|
module_info = module_from_name(pm.process_handle, module_name)
|
|
195
195
|
|
|
196
196
|
if module_info is not None:
|
|
197
|
-
logger.info(f"Successfully found {module_name} at {module_info.lpBaseOfDll:
|
|
197
|
+
logger.info(f"Successfully found {module_name} at 0x{module_info.lpBaseOfDll:X}")
|
|
198
198
|
return module_info.lpBaseOfDll
|
|
199
199
|
|
|
200
200
|
if try_counter == retry_limit:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|